OLD | NEW |
1 library googleapis.runtimeconfig.v1.test; | 1 library googleapis.runtimeconfig.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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 return o; | 78 return o; |
79 } | 79 } |
80 | 80 |
81 checkEmpty(api.Empty o) { | 81 checkEmpty(api.Empty o) { |
82 buildCounterEmpty++; | 82 buildCounterEmpty++; |
83 if (buildCounterEmpty < 3) { | 83 if (buildCounterEmpty < 3) { |
84 } | 84 } |
85 buildCounterEmpty--; | 85 buildCounterEmpty--; |
86 } | 86 } |
87 | 87 |
88 buildUnnamed1876() { | 88 buildUnnamed1646() { |
89 var o = new core.List<api.Operation>(); | 89 var o = new core.List<api.Operation>(); |
90 o.add(buildOperation()); | 90 o.add(buildOperation()); |
91 o.add(buildOperation()); | 91 o.add(buildOperation()); |
92 return o; | 92 return o; |
93 } | 93 } |
94 | 94 |
95 checkUnnamed1876(core.List<api.Operation> o) { | 95 checkUnnamed1646(core.List<api.Operation> o) { |
96 unittest.expect(o, unittest.hasLength(2)); | 96 unittest.expect(o, unittest.hasLength(2)); |
97 checkOperation(o[0]); | 97 checkOperation(o[0]); |
98 checkOperation(o[1]); | 98 checkOperation(o[1]); |
99 } | 99 } |
100 | 100 |
101 core.int buildCounterListOperationsResponse = 0; | 101 core.int buildCounterListOperationsResponse = 0; |
102 buildListOperationsResponse() { | 102 buildListOperationsResponse() { |
103 var o = new api.ListOperationsResponse(); | 103 var o = new api.ListOperationsResponse(); |
104 buildCounterListOperationsResponse++; | 104 buildCounterListOperationsResponse++; |
105 if (buildCounterListOperationsResponse < 3) { | 105 if (buildCounterListOperationsResponse < 3) { |
106 o.nextPageToken = "foo"; | 106 o.nextPageToken = "foo"; |
107 o.operations = buildUnnamed1876(); | 107 o.operations = buildUnnamed1646(); |
108 } | 108 } |
109 buildCounterListOperationsResponse--; | 109 buildCounterListOperationsResponse--; |
110 return o; | 110 return o; |
111 } | 111 } |
112 | 112 |
113 checkListOperationsResponse(api.ListOperationsResponse o) { | 113 checkListOperationsResponse(api.ListOperationsResponse o) { |
114 buildCounterListOperationsResponse++; | 114 buildCounterListOperationsResponse++; |
115 if (buildCounterListOperationsResponse < 3) { | 115 if (buildCounterListOperationsResponse < 3) { |
116 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 116 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
117 checkUnnamed1876(o.operations); | 117 checkUnnamed1646(o.operations); |
118 } | 118 } |
119 buildCounterListOperationsResponse--; | 119 buildCounterListOperationsResponse--; |
120 } | 120 } |
121 | 121 |
122 buildUnnamed1877() { | 122 buildUnnamed1647() { |
123 var o = new core.Map<core.String, core.Object>(); | 123 var o = new core.Map<core.String, core.Object>(); |
124 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 124 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
125 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 125 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
126 return o; | 126 return o; |
127 } | 127 } |
128 | 128 |
129 checkUnnamed1877(core.Map<core.String, core.Object> o) { | 129 checkUnnamed1647(core.Map<core.String, core.Object> o) { |
130 unittest.expect(o, unittest.hasLength(2)); | 130 unittest.expect(o, unittest.hasLength(2)); |
131 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); | 131 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); |
132 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); | 132 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); |
133 } | 133 } |
134 | 134 |
135 buildUnnamed1878() { | 135 buildUnnamed1648() { |
136 var o = new core.Map<core.String, core.Object>(); | 136 var o = new core.Map<core.String, core.Object>(); |
137 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 137 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
138 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 138 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
139 return o; | 139 return o; |
140 } | 140 } |
141 | 141 |
142 checkUnnamed1878(core.Map<core.String, core.Object> o) { | 142 checkUnnamed1648(core.Map<core.String, core.Object> o) { |
143 unittest.expect(o, unittest.hasLength(2)); | 143 unittest.expect(o, unittest.hasLength(2)); |
144 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); | 144 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); |
145 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); | 145 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); |
146 } | 146 } |
147 | 147 |
148 core.int buildCounterOperation = 0; | 148 core.int buildCounterOperation = 0; |
149 buildOperation() { | 149 buildOperation() { |
150 var o = new api.Operation(); | 150 var o = new api.Operation(); |
151 buildCounterOperation++; | 151 buildCounterOperation++; |
152 if (buildCounterOperation < 3) { | 152 if (buildCounterOperation < 3) { |
153 o.done = true; | 153 o.done = true; |
154 o.error = buildStatus(); | 154 o.error = buildStatus(); |
155 o.metadata = buildUnnamed1877(); | 155 o.metadata = buildUnnamed1647(); |
156 o.name = "foo"; | 156 o.name = "foo"; |
157 o.response = buildUnnamed1878(); | 157 o.response = buildUnnamed1648(); |
158 } | 158 } |
159 buildCounterOperation--; | 159 buildCounterOperation--; |
160 return o; | 160 return o; |
161 } | 161 } |
162 | 162 |
163 checkOperation(api.Operation o) { | 163 checkOperation(api.Operation o) { |
164 buildCounterOperation++; | 164 buildCounterOperation++; |
165 if (buildCounterOperation < 3) { | 165 if (buildCounterOperation < 3) { |
166 unittest.expect(o.done, unittest.isTrue); | 166 unittest.expect(o.done, unittest.isTrue); |
167 checkStatus(o.error); | 167 checkStatus(o.error); |
168 checkUnnamed1877(o.metadata); | 168 checkUnnamed1647(o.metadata); |
169 unittest.expect(o.name, unittest.equals('foo')); | 169 unittest.expect(o.name, unittest.equals('foo')); |
170 checkUnnamed1878(o.response); | 170 checkUnnamed1648(o.response); |
171 } | 171 } |
172 buildCounterOperation--; | 172 buildCounterOperation--; |
173 } | 173 } |
174 | 174 |
175 buildUnnamed1879() { | 175 buildUnnamed1649() { |
176 var o = new core.Map<core.String, core.Object>(); | 176 var o = new core.Map<core.String, core.Object>(); |
177 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 177 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
178 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 178 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
179 return o; | 179 return o; |
180 } | 180 } |
181 | 181 |
182 checkUnnamed1879(core.Map<core.String, core.Object> o) { | 182 checkUnnamed1649(core.Map<core.String, core.Object> o) { |
183 unittest.expect(o, unittest.hasLength(2)); | 183 unittest.expect(o, unittest.hasLength(2)); |
184 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 184 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); |
185 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 185 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); |
186 } | 186 } |
187 | 187 |
188 buildUnnamed1880() { | 188 buildUnnamed1650() { |
189 var o = new core.List<core.Map<core.String, core.Object>>(); | 189 var o = new core.List<core.Map<core.String, core.Object>>(); |
190 o.add(buildUnnamed1879()); | 190 o.add(buildUnnamed1649()); |
191 o.add(buildUnnamed1879()); | 191 o.add(buildUnnamed1649()); |
192 return o; | 192 return o; |
193 } | 193 } |
194 | 194 |
195 checkUnnamed1880(core.List<core.Map<core.String, core.Object>> o) { | 195 checkUnnamed1650(core.List<core.Map<core.String, core.Object>> o) { |
196 unittest.expect(o, unittest.hasLength(2)); | 196 unittest.expect(o, unittest.hasLength(2)); |
197 checkUnnamed1879(o[0]); | 197 checkUnnamed1649(o[0]); |
198 checkUnnamed1879(o[1]); | 198 checkUnnamed1649(o[1]); |
199 } | 199 } |
200 | 200 |
201 core.int buildCounterStatus = 0; | 201 core.int buildCounterStatus = 0; |
202 buildStatus() { | 202 buildStatus() { |
203 var o = new api.Status(); | 203 var o = new api.Status(); |
204 buildCounterStatus++; | 204 buildCounterStatus++; |
205 if (buildCounterStatus < 3) { | 205 if (buildCounterStatus < 3) { |
206 o.code = 42; | 206 o.code = 42; |
207 o.details = buildUnnamed1880(); | 207 o.details = buildUnnamed1650(); |
208 o.message = "foo"; | 208 o.message = "foo"; |
209 } | 209 } |
210 buildCounterStatus--; | 210 buildCounterStatus--; |
211 return o; | 211 return o; |
212 } | 212 } |
213 | 213 |
214 checkStatus(api.Status o) { | 214 checkStatus(api.Status o) { |
215 buildCounterStatus++; | 215 buildCounterStatus++; |
216 if (buildCounterStatus < 3) { | 216 if (buildCounterStatus < 3) { |
217 unittest.expect(o.code, unittest.equals(42)); | 217 unittest.expect(o.code, unittest.equals(42)); |
218 checkUnnamed1880(o.details); | 218 checkUnnamed1650(o.details); |
219 unittest.expect(o.message, unittest.equals('foo')); | 219 unittest.expect(o.message, unittest.equals('foo')); |
220 } | 220 } |
221 buildCounterStatus--; | 221 buildCounterStatus--; |
222 } | 222 } |
223 | 223 |
224 | 224 |
225 main() { | 225 main() { |
226 unittest.group("obj-schema-CancelOperationRequest", () { | 226 unittest.group("obj-schema-CancelOperationRequest", () { |
227 unittest.test("to-json--from-json", () { | 227 unittest.test("to-json--from-json", () { |
228 var o = buildCancelOperationRequest(); | 228 var o = buildCancelOperationRequest(); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize, filte
r: arg_filter).then(unittest.expectAsync(((api.ListOperationsResponse response)
{ | 412 res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize, filte
r: arg_filter).then(unittest.expectAsync(((api.ListOperationsResponse response)
{ |
413 checkListOperationsResponse(response); | 413 checkListOperationsResponse(response); |
414 }))); | 414 }))); |
415 }); | 415 }); |
416 | 416 |
417 }); | 417 }); |
418 | 418 |
419 | 419 |
420 } | 420 } |
421 | 421 |
OLD | NEW |