| OLD | NEW |
| 1 library googleapis.webfonts.v1.test; | 1 library googleapis.webfonts.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| 11 import 'package:googleapis/common/common.dart' as common; | 11 import 'package:googleapis/common/common.dart' as common; |
| 12 import 'package:googleapis/src/common_internal.dart' as common_internal; | 12 import 'package:googleapis/src/common_internal.dart' as common_internal; |
| 13 import '../common/common_internal_test.dart' as common_test; | 13 import '../common/common_internal_test.dart' as common_test; |
| 14 | 14 |
| 15 import 'package:googleapis/webfonts/v1.dart' as api; | 15 import 'package:googleapis/webfonts/v1.dart' as api; |
| 16 | 16 |
| 17 | 17 |
| 18 | 18 |
| 19 buildUnnamed817() { | 19 buildUnnamed1124() { |
| 20 var o = new core.Map<core.String, core.String>(); | 20 var o = new core.Map<core.String, core.String>(); |
| 21 o["x"] = "foo"; | 21 o["x"] = "foo"; |
| 22 o["y"] = "foo"; | 22 o["y"] = "foo"; |
| 23 return o; | 23 return o; |
| 24 } | 24 } |
| 25 | 25 |
| 26 checkUnnamed817(core.Map<core.String, core.String> o) { | 26 checkUnnamed1124(core.Map<core.String, core.String> o) { |
| 27 unittest.expect(o, unittest.hasLength(2)); | 27 unittest.expect(o, unittest.hasLength(2)); |
| 28 unittest.expect(o["x"], unittest.equals('foo')); | 28 unittest.expect(o["x"], unittest.equals('foo')); |
| 29 unittest.expect(o["y"], unittest.equals('foo')); | 29 unittest.expect(o["y"], unittest.equals('foo')); |
| 30 } | 30 } |
| 31 | 31 |
| 32 buildUnnamed818() { | 32 buildUnnamed1125() { |
| 33 var o = new core.List<core.String>(); | 33 var o = new core.List<core.String>(); |
| 34 o.add("foo"); | 34 o.add("foo"); |
| 35 o.add("foo"); | 35 o.add("foo"); |
| 36 return o; | 36 return o; |
| 37 } | 37 } |
| 38 | 38 |
| 39 checkUnnamed818(core.List<core.String> o) { | 39 checkUnnamed1125(core.List<core.String> o) { |
| 40 unittest.expect(o, unittest.hasLength(2)); | 40 unittest.expect(o, unittest.hasLength(2)); |
| 41 unittest.expect(o[0], unittest.equals('foo')); | 41 unittest.expect(o[0], unittest.equals('foo')); |
| 42 unittest.expect(o[1], unittest.equals('foo')); | 42 unittest.expect(o[1], unittest.equals('foo')); |
| 43 } | 43 } |
| 44 | 44 |
| 45 buildUnnamed819() { | 45 buildUnnamed1126() { |
| 46 var o = new core.List<core.String>(); | 46 var o = new core.List<core.String>(); |
| 47 o.add("foo"); | 47 o.add("foo"); |
| 48 o.add("foo"); | 48 o.add("foo"); |
| 49 return o; | 49 return o; |
| 50 } | 50 } |
| 51 | 51 |
| 52 checkUnnamed819(core.List<core.String> o) { | 52 checkUnnamed1126(core.List<core.String> o) { |
| 53 unittest.expect(o, unittest.hasLength(2)); | 53 unittest.expect(o, unittest.hasLength(2)); |
| 54 unittest.expect(o[0], unittest.equals('foo')); | 54 unittest.expect(o[0], unittest.equals('foo')); |
| 55 unittest.expect(o[1], unittest.equals('foo')); | 55 unittest.expect(o[1], unittest.equals('foo')); |
| 56 } | 56 } |
| 57 | 57 |
| 58 core.int buildCounterWebfont = 0; | 58 core.int buildCounterWebfont = 0; |
| 59 buildWebfont() { | 59 buildWebfont() { |
| 60 var o = new api.Webfont(); | 60 var o = new api.Webfont(); |
| 61 buildCounterWebfont++; | 61 buildCounterWebfont++; |
| 62 if (buildCounterWebfont < 3) { | 62 if (buildCounterWebfont < 3) { |
| 63 o.category = "foo"; | 63 o.category = "foo"; |
| 64 o.family = "foo"; | 64 o.family = "foo"; |
| 65 o.files = buildUnnamed817(); | 65 o.files = buildUnnamed1124(); |
| 66 o.kind = "foo"; | 66 o.kind = "foo"; |
| 67 o.lastModified = core.DateTime.parse("2002-02-27T14:01:02Z"); | 67 o.lastModified = core.DateTime.parse("2002-02-27T14:01:02Z"); |
| 68 o.subsets = buildUnnamed818(); | 68 o.subsets = buildUnnamed1125(); |
| 69 o.variants = buildUnnamed819(); | 69 o.variants = buildUnnamed1126(); |
| 70 o.version = "foo"; | 70 o.version = "foo"; |
| 71 } | 71 } |
| 72 buildCounterWebfont--; | 72 buildCounterWebfont--; |
| 73 return o; | 73 return o; |
| 74 } | 74 } |
| 75 | 75 |
| 76 checkWebfont(api.Webfont o) { | 76 checkWebfont(api.Webfont o) { |
| 77 buildCounterWebfont++; | 77 buildCounterWebfont++; |
| 78 if (buildCounterWebfont < 3) { | 78 if (buildCounterWebfont < 3) { |
| 79 unittest.expect(o.category, unittest.equals('foo')); | 79 unittest.expect(o.category, unittest.equals('foo')); |
| 80 unittest.expect(o.family, unittest.equals('foo')); | 80 unittest.expect(o.family, unittest.equals('foo')); |
| 81 checkUnnamed817(o.files); | 81 checkUnnamed1124(o.files); |
| 82 unittest.expect(o.kind, unittest.equals('foo')); | 82 unittest.expect(o.kind, unittest.equals('foo')); |
| 83 unittest.expect(o.lastModified, unittest.equals(core.DateTime.parse("2002-02
-27T00:00:00"))); | 83 unittest.expect(o.lastModified, unittest.equals(core.DateTime.parse("2002-02
-27T00:00:00"))); |
| 84 checkUnnamed818(o.subsets); | 84 checkUnnamed1125(o.subsets); |
| 85 checkUnnamed819(o.variants); | 85 checkUnnamed1126(o.variants); |
| 86 unittest.expect(o.version, unittest.equals('foo')); | 86 unittest.expect(o.version, unittest.equals('foo')); |
| 87 } | 87 } |
| 88 buildCounterWebfont--; | 88 buildCounterWebfont--; |
| 89 } | 89 } |
| 90 | 90 |
| 91 buildUnnamed820() { | 91 buildUnnamed1127() { |
| 92 var o = new core.List<api.Webfont>(); | 92 var o = new core.List<api.Webfont>(); |
| 93 o.add(buildWebfont()); | 93 o.add(buildWebfont()); |
| 94 o.add(buildWebfont()); | 94 o.add(buildWebfont()); |
| 95 return o; | 95 return o; |
| 96 } | 96 } |
| 97 | 97 |
| 98 checkUnnamed820(core.List<api.Webfont> o) { | 98 checkUnnamed1127(core.List<api.Webfont> o) { |
| 99 unittest.expect(o, unittest.hasLength(2)); | 99 unittest.expect(o, unittest.hasLength(2)); |
| 100 checkWebfont(o[0]); | 100 checkWebfont(o[0]); |
| 101 checkWebfont(o[1]); | 101 checkWebfont(o[1]); |
| 102 } | 102 } |
| 103 | 103 |
| 104 core.int buildCounterWebfontList = 0; | 104 core.int buildCounterWebfontList = 0; |
| 105 buildWebfontList() { | 105 buildWebfontList() { |
| 106 var o = new api.WebfontList(); | 106 var o = new api.WebfontList(); |
| 107 buildCounterWebfontList++; | 107 buildCounterWebfontList++; |
| 108 if (buildCounterWebfontList < 3) { | 108 if (buildCounterWebfontList < 3) { |
| 109 o.items = buildUnnamed820(); | 109 o.items = buildUnnamed1127(); |
| 110 o.kind = "foo"; | 110 o.kind = "foo"; |
| 111 } | 111 } |
| 112 buildCounterWebfontList--; | 112 buildCounterWebfontList--; |
| 113 return o; | 113 return o; |
| 114 } | 114 } |
| 115 | 115 |
| 116 checkWebfontList(api.WebfontList o) { | 116 checkWebfontList(api.WebfontList o) { |
| 117 buildCounterWebfontList++; | 117 buildCounterWebfontList++; |
| 118 if (buildCounterWebfontList < 3) { | 118 if (buildCounterWebfontList < 3) { |
| 119 checkUnnamed820(o.items); | 119 checkUnnamed1127(o.items); |
| 120 unittest.expect(o.kind, unittest.equals('foo')); | 120 unittest.expect(o.kind, unittest.equals('foo')); |
| 121 } | 121 } |
| 122 buildCounterWebfontList--; | 122 buildCounterWebfontList--; |
| 123 } | 123 } |
| 124 | 124 |
| 125 | 125 |
| 126 main() { | 126 main() { |
| 127 unittest.group("obj-schema-Webfont", () { | 127 unittest.group("obj-schema-Webfont", () { |
| 128 unittest.test("to-json--from-json", () { | 128 unittest.test("to-json--from-json", () { |
| 129 var o = buildWebfont(); | 129 var o = buildWebfont(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 res.list(sort: arg_sort).then(unittest.expectAsync(((api.WebfontList respo
nse) { | 188 res.list(sort: arg_sort).then(unittest.expectAsync(((api.WebfontList respo
nse) { |
| 189 checkWebfontList(response); | 189 checkWebfontList(response); |
| 190 }))); | 190 }))); |
| 191 }); | 191 }); |
| 192 | 192 |
| 193 }); | 193 }); |
| 194 | 194 |
| 195 | 195 |
| 196 } | 196 } |
| 197 | 197 |
| OLD | NEW |