Chromium Code Reviews

Side by Side Diff: generated/googleapis/test/webfonts/v1_test.dart

Issue 2695743002: Api-roll 45: 2017-02-13 (Closed)
Patch Set: reverted local changes to pubspec file Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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;
(...skipping 33 matching lines...)
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) { 49 core.int status, core.Map headers, core.String body) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 51 return new http.StreamedResponse(stream, status, headers: headers);
52 } 52 }
53 53
54 buildUnnamed1638() { 54 buildUnnamed1650() {
55 var o = new core.Map<core.String, core.String>(); 55 var o = new core.Map<core.String, core.String>();
56 o["x"] = "foo"; 56 o["x"] = "foo";
57 o["y"] = "foo"; 57 o["y"] = "foo";
58 return o; 58 return o;
59 } 59 }
60 60
61 checkUnnamed1638(core.Map<core.String, core.String> o) { 61 checkUnnamed1650(core.Map<core.String, core.String> o) {
62 unittest.expect(o, unittest.hasLength(2)); 62 unittest.expect(o, unittest.hasLength(2));
63 unittest.expect(o["x"], unittest.equals('foo')); 63 unittest.expect(o["x"], unittest.equals('foo'));
64 unittest.expect(o["y"], unittest.equals('foo')); 64 unittest.expect(o["y"], unittest.equals('foo'));
65 } 65 }
66 66
67 buildUnnamed1639() { 67 buildUnnamed1651() {
68 var o = new core.List<core.String>(); 68 var o = new core.List<core.String>();
69 o.add("foo"); 69 o.add("foo");
70 o.add("foo"); 70 o.add("foo");
71 return o; 71 return o;
72 } 72 }
73 73
74 checkUnnamed1639(core.List<core.String> o) { 74 checkUnnamed1651(core.List<core.String> o) {
75 unittest.expect(o, unittest.hasLength(2)); 75 unittest.expect(o, unittest.hasLength(2));
76 unittest.expect(o[0], unittest.equals('foo')); 76 unittest.expect(o[0], unittest.equals('foo'));
77 unittest.expect(o[1], unittest.equals('foo')); 77 unittest.expect(o[1], unittest.equals('foo'));
78 } 78 }
79 79
80 buildUnnamed1640() { 80 buildUnnamed1652() {
81 var o = new core.List<core.String>(); 81 var o = new core.List<core.String>();
82 o.add("foo"); 82 o.add("foo");
83 o.add("foo"); 83 o.add("foo");
84 return o; 84 return o;
85 } 85 }
86 86
87 checkUnnamed1640(core.List<core.String> o) { 87 checkUnnamed1652(core.List<core.String> o) {
88 unittest.expect(o, unittest.hasLength(2)); 88 unittest.expect(o, unittest.hasLength(2));
89 unittest.expect(o[0], unittest.equals('foo')); 89 unittest.expect(o[0], unittest.equals('foo'));
90 unittest.expect(o[1], unittest.equals('foo')); 90 unittest.expect(o[1], unittest.equals('foo'));
91 } 91 }
92 92
93 core.int buildCounterWebfont = 0; 93 core.int buildCounterWebfont = 0;
94 buildWebfont() { 94 buildWebfont() {
95 var o = new api.Webfont(); 95 var o = new api.Webfont();
96 buildCounterWebfont++; 96 buildCounterWebfont++;
97 if (buildCounterWebfont < 3) { 97 if (buildCounterWebfont < 3) {
98 o.category = "foo"; 98 o.category = "foo";
99 o.family = "foo"; 99 o.family = "foo";
100 o.files = buildUnnamed1638(); 100 o.files = buildUnnamed1650();
101 o.kind = "foo"; 101 o.kind = "foo";
102 o.lastModified = core.DateTime.parse("2002-02-27T14:01:02Z"); 102 o.lastModified = core.DateTime.parse("2002-02-27T14:01:02Z");
103 o.subsets = buildUnnamed1639(); 103 o.subsets = buildUnnamed1651();
104 o.variants = buildUnnamed1640(); 104 o.variants = buildUnnamed1652();
105 o.version = "foo"; 105 o.version = "foo";
106 } 106 }
107 buildCounterWebfont--; 107 buildCounterWebfont--;
108 return o; 108 return o;
109 } 109 }
110 110
111 checkWebfont(api.Webfont o) { 111 checkWebfont(api.Webfont o) {
112 buildCounterWebfont++; 112 buildCounterWebfont++;
113 if (buildCounterWebfont < 3) { 113 if (buildCounterWebfont < 3) {
114 unittest.expect(o.category, unittest.equals('foo')); 114 unittest.expect(o.category, unittest.equals('foo'));
115 unittest.expect(o.family, unittest.equals('foo')); 115 unittest.expect(o.family, unittest.equals('foo'));
116 checkUnnamed1638(o.files); 116 checkUnnamed1650(o.files);
117 unittest.expect(o.kind, unittest.equals('foo')); 117 unittest.expect(o.kind, unittest.equals('foo'));
118 unittest.expect(o.lastModified, unittest.equals(core.DateTime.parse("2002-02 -27T00:00:00"))); 118 unittest.expect(o.lastModified, unittest.equals(core.DateTime.parse("2002-02 -27T00:00:00")));
119 checkUnnamed1639(o.subsets); 119 checkUnnamed1651(o.subsets);
120 checkUnnamed1640(o.variants); 120 checkUnnamed1652(o.variants);
121 unittest.expect(o.version, unittest.equals('foo')); 121 unittest.expect(o.version, unittest.equals('foo'));
122 } 122 }
123 buildCounterWebfont--; 123 buildCounterWebfont--;
124 } 124 }
125 125
126 buildUnnamed1641() { 126 buildUnnamed1653() {
127 var o = new core.List<api.Webfont>(); 127 var o = new core.List<api.Webfont>();
128 o.add(buildWebfont()); 128 o.add(buildWebfont());
129 o.add(buildWebfont()); 129 o.add(buildWebfont());
130 return o; 130 return o;
131 } 131 }
132 132
133 checkUnnamed1641(core.List<api.Webfont> o) { 133 checkUnnamed1653(core.List<api.Webfont> o) {
134 unittest.expect(o, unittest.hasLength(2)); 134 unittest.expect(o, unittest.hasLength(2));
135 checkWebfont(o[0]); 135 checkWebfont(o[0]);
136 checkWebfont(o[1]); 136 checkWebfont(o[1]);
137 } 137 }
138 138
139 core.int buildCounterWebfontList = 0; 139 core.int buildCounterWebfontList = 0;
140 buildWebfontList() { 140 buildWebfontList() {
141 var o = new api.WebfontList(); 141 var o = new api.WebfontList();
142 buildCounterWebfontList++; 142 buildCounterWebfontList++;
143 if (buildCounterWebfontList < 3) { 143 if (buildCounterWebfontList < 3) {
144 o.items = buildUnnamed1641(); 144 o.items = buildUnnamed1653();
145 o.kind = "foo"; 145 o.kind = "foo";
146 } 146 }
147 buildCounterWebfontList--; 147 buildCounterWebfontList--;
148 return o; 148 return o;
149 } 149 }
150 150
151 checkWebfontList(api.WebfontList o) { 151 checkWebfontList(api.WebfontList o) {
152 buildCounterWebfontList++; 152 buildCounterWebfontList++;
153 if (buildCounterWebfontList < 3) { 153 if (buildCounterWebfontList < 3) {
154 checkUnnamed1641(o.items); 154 checkUnnamed1653(o.items);
155 unittest.expect(o.kind, unittest.equals('foo')); 155 unittest.expect(o.kind, unittest.equals('foo'));
156 } 156 }
157 buildCounterWebfontList--; 157 buildCounterWebfontList--;
158 } 158 }
159 159
160 160
161 main() { 161 main() {
162 unittest.group("obj-schema-Webfont", () { 162 unittest.group("obj-schema-Webfont", () {
163 unittest.test("to-json--from-json", () { 163 unittest.test("to-json--from-json", () {
164 var o = buildWebfont(); 164 var o = buildWebfont();
(...skipping 58 matching lines...)
223 res.list(sort: arg_sort).then(unittest.expectAsync(((api.WebfontList respo nse) { 223 res.list(sort: arg_sort).then(unittest.expectAsync(((api.WebfontList respo nse) {
224 checkWebfontList(response); 224 checkWebfontList(response);
225 }))); 225 })));
226 }); 226 });
227 227
228 }); 228 });
229 229
230 230
231 } 231 }
232 232
OLDNEW
« no previous file with comments | « generated/googleapis/test/vision/v1_test.dart ('k') | generated/googleapis/test/webmasters/v3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine