OLD | NEW |
1 library googleapis_beta.taskqueue.v1beta2.test; | 1 library googleapis_beta.taskqueue.v1beta2.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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 unittest.expect(o.kind, unittest.equals('foo')); | 77 unittest.expect(o.kind, unittest.equals('foo')); |
78 unittest.expect(o.leaseTimestamp, unittest.equals('foo')); | 78 unittest.expect(o.leaseTimestamp, unittest.equals('foo')); |
79 unittest.expect(o.payloadBase64, unittest.equals('foo')); | 79 unittest.expect(o.payloadBase64, unittest.equals('foo')); |
80 unittest.expect(o.queueName, unittest.equals('foo')); | 80 unittest.expect(o.queueName, unittest.equals('foo')); |
81 unittest.expect(o.retryCount, unittest.equals(42)); | 81 unittest.expect(o.retryCount, unittest.equals(42)); |
82 unittest.expect(o.tag, unittest.equals('foo')); | 82 unittest.expect(o.tag, unittest.equals('foo')); |
83 } | 83 } |
84 buildCounterTask--; | 84 buildCounterTask--; |
85 } | 85 } |
86 | 86 |
87 buildUnnamed3561() { | 87 buildUnnamed3653() { |
88 var o = new core.List<core.String>(); | 88 var o = new core.List<core.String>(); |
89 o.add("foo"); | 89 o.add("foo"); |
90 o.add("foo"); | 90 o.add("foo"); |
91 return o; | 91 return o; |
92 } | 92 } |
93 | 93 |
94 checkUnnamed3561(core.List<core.String> o) { | 94 checkUnnamed3653(core.List<core.String> o) { |
95 unittest.expect(o, unittest.hasLength(2)); | 95 unittest.expect(o, unittest.hasLength(2)); |
96 unittest.expect(o[0], unittest.equals('foo')); | 96 unittest.expect(o[0], unittest.equals('foo')); |
97 unittest.expect(o[1], unittest.equals('foo')); | 97 unittest.expect(o[1], unittest.equals('foo')); |
98 } | 98 } |
99 | 99 |
100 buildUnnamed3562() { | 100 buildUnnamed3654() { |
101 var o = new core.List<core.String>(); | 101 var o = new core.List<core.String>(); |
102 o.add("foo"); | 102 o.add("foo"); |
103 o.add("foo"); | 103 o.add("foo"); |
104 return o; | 104 return o; |
105 } | 105 } |
106 | 106 |
107 checkUnnamed3562(core.List<core.String> o) { | 107 checkUnnamed3654(core.List<core.String> o) { |
108 unittest.expect(o, unittest.hasLength(2)); | 108 unittest.expect(o, unittest.hasLength(2)); |
109 unittest.expect(o[0], unittest.equals('foo')); | 109 unittest.expect(o[0], unittest.equals('foo')); |
110 unittest.expect(o[1], unittest.equals('foo')); | 110 unittest.expect(o[1], unittest.equals('foo')); |
111 } | 111 } |
112 | 112 |
113 buildUnnamed3563() { | 113 buildUnnamed3655() { |
114 var o = new core.List<core.String>(); | 114 var o = new core.List<core.String>(); |
115 o.add("foo"); | 115 o.add("foo"); |
116 o.add("foo"); | 116 o.add("foo"); |
117 return o; | 117 return o; |
118 } | 118 } |
119 | 119 |
120 checkUnnamed3563(core.List<core.String> o) { | 120 checkUnnamed3655(core.List<core.String> o) { |
121 unittest.expect(o, unittest.hasLength(2)); | 121 unittest.expect(o, unittest.hasLength(2)); |
122 unittest.expect(o[0], unittest.equals('foo')); | 122 unittest.expect(o[0], unittest.equals('foo')); |
123 unittest.expect(o[1], unittest.equals('foo')); | 123 unittest.expect(o[1], unittest.equals('foo')); |
124 } | 124 } |
125 | 125 |
126 core.int buildCounterTaskQueueAcl = 0; | 126 core.int buildCounterTaskQueueAcl = 0; |
127 buildTaskQueueAcl() { | 127 buildTaskQueueAcl() { |
128 var o = new api.TaskQueueAcl(); | 128 var o = new api.TaskQueueAcl(); |
129 buildCounterTaskQueueAcl++; | 129 buildCounterTaskQueueAcl++; |
130 if (buildCounterTaskQueueAcl < 3) { | 130 if (buildCounterTaskQueueAcl < 3) { |
131 o.adminEmails = buildUnnamed3561(); | 131 o.adminEmails = buildUnnamed3653(); |
132 o.consumerEmails = buildUnnamed3562(); | 132 o.consumerEmails = buildUnnamed3654(); |
133 o.producerEmails = buildUnnamed3563(); | 133 o.producerEmails = buildUnnamed3655(); |
134 } | 134 } |
135 buildCounterTaskQueueAcl--; | 135 buildCounterTaskQueueAcl--; |
136 return o; | 136 return o; |
137 } | 137 } |
138 | 138 |
139 checkTaskQueueAcl(api.TaskQueueAcl o) { | 139 checkTaskQueueAcl(api.TaskQueueAcl o) { |
140 buildCounterTaskQueueAcl++; | 140 buildCounterTaskQueueAcl++; |
141 if (buildCounterTaskQueueAcl < 3) { | 141 if (buildCounterTaskQueueAcl < 3) { |
142 checkUnnamed3561(o.adminEmails); | 142 checkUnnamed3653(o.adminEmails); |
143 checkUnnamed3562(o.consumerEmails); | 143 checkUnnamed3654(o.consumerEmails); |
144 checkUnnamed3563(o.producerEmails); | 144 checkUnnamed3655(o.producerEmails); |
145 } | 145 } |
146 buildCounterTaskQueueAcl--; | 146 buildCounterTaskQueueAcl--; |
147 } | 147 } |
148 | 148 |
149 core.int buildCounterTaskQueueStats = 0; | 149 core.int buildCounterTaskQueueStats = 0; |
150 buildTaskQueueStats() { | 150 buildTaskQueueStats() { |
151 var o = new api.TaskQueueStats(); | 151 var o = new api.TaskQueueStats(); |
152 buildCounterTaskQueueStats++; | 152 buildCounterTaskQueueStats++; |
153 if (buildCounterTaskQueueStats < 3) { | 153 if (buildCounterTaskQueueStats < 3) { |
154 o.leasedLastHour = "foo"; | 154 o.leasedLastHour = "foo"; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 if (buildCounterTaskQueue < 3) { | 191 if (buildCounterTaskQueue < 3) { |
192 checkTaskQueueAcl(o.acl); | 192 checkTaskQueueAcl(o.acl); |
193 unittest.expect(o.id, unittest.equals('foo')); | 193 unittest.expect(o.id, unittest.equals('foo')); |
194 unittest.expect(o.kind, unittest.equals('foo')); | 194 unittest.expect(o.kind, unittest.equals('foo')); |
195 unittest.expect(o.maxLeases, unittest.equals(42)); | 195 unittest.expect(o.maxLeases, unittest.equals(42)); |
196 checkTaskQueueStats(o.stats); | 196 checkTaskQueueStats(o.stats); |
197 } | 197 } |
198 buildCounterTaskQueue--; | 198 buildCounterTaskQueue--; |
199 } | 199 } |
200 | 200 |
201 buildUnnamed3564() { | 201 buildUnnamed3656() { |
202 var o = new core.List<api.Task>(); | 202 var o = new core.List<api.Task>(); |
203 o.add(buildTask()); | 203 o.add(buildTask()); |
204 o.add(buildTask()); | 204 o.add(buildTask()); |
205 return o; | 205 return o; |
206 } | 206 } |
207 | 207 |
208 checkUnnamed3564(core.List<api.Task> o) { | 208 checkUnnamed3656(core.List<api.Task> o) { |
209 unittest.expect(o, unittest.hasLength(2)); | 209 unittest.expect(o, unittest.hasLength(2)); |
210 checkTask(o[0]); | 210 checkTask(o[0]); |
211 checkTask(o[1]); | 211 checkTask(o[1]); |
212 } | 212 } |
213 | 213 |
214 core.int buildCounterTasks = 0; | 214 core.int buildCounterTasks = 0; |
215 buildTasks() { | 215 buildTasks() { |
216 var o = new api.Tasks(); | 216 var o = new api.Tasks(); |
217 buildCounterTasks++; | 217 buildCounterTasks++; |
218 if (buildCounterTasks < 3) { | 218 if (buildCounterTasks < 3) { |
219 o.items = buildUnnamed3564(); | 219 o.items = buildUnnamed3656(); |
220 o.kind = "foo"; | 220 o.kind = "foo"; |
221 } | 221 } |
222 buildCounterTasks--; | 222 buildCounterTasks--; |
223 return o; | 223 return o; |
224 } | 224 } |
225 | 225 |
226 checkTasks(api.Tasks o) { | 226 checkTasks(api.Tasks o) { |
227 buildCounterTasks++; | 227 buildCounterTasks++; |
228 if (buildCounterTasks < 3) { | 228 if (buildCounterTasks < 3) { |
229 checkUnnamed3564(o.items); | 229 checkUnnamed3656(o.items); |
230 unittest.expect(o.kind, unittest.equals('foo')); | 230 unittest.expect(o.kind, unittest.equals('foo')); |
231 } | 231 } |
232 buildCounterTasks--; | 232 buildCounterTasks--; |
233 } | 233 } |
234 | 234 |
235 buildUnnamed3565() { | 235 buildUnnamed3657() { |
236 var o = new core.List<api.Task>(); | 236 var o = new core.List<api.Task>(); |
237 o.add(buildTask()); | 237 o.add(buildTask()); |
238 o.add(buildTask()); | 238 o.add(buildTask()); |
239 return o; | 239 return o; |
240 } | 240 } |
241 | 241 |
242 checkUnnamed3565(core.List<api.Task> o) { | 242 checkUnnamed3657(core.List<api.Task> o) { |
243 unittest.expect(o, unittest.hasLength(2)); | 243 unittest.expect(o, unittest.hasLength(2)); |
244 checkTask(o[0]); | 244 checkTask(o[0]); |
245 checkTask(o[1]); | 245 checkTask(o[1]); |
246 } | 246 } |
247 | 247 |
248 core.int buildCounterTasks2 = 0; | 248 core.int buildCounterTasks2 = 0; |
249 buildTasks2() { | 249 buildTasks2() { |
250 var o = new api.Tasks2(); | 250 var o = new api.Tasks2(); |
251 buildCounterTasks2++; | 251 buildCounterTasks2++; |
252 if (buildCounterTasks2 < 3) { | 252 if (buildCounterTasks2 < 3) { |
253 o.items = buildUnnamed3565(); | 253 o.items = buildUnnamed3657(); |
254 o.kind = "foo"; | 254 o.kind = "foo"; |
255 } | 255 } |
256 buildCounterTasks2--; | 256 buildCounterTasks2--; |
257 return o; | 257 return o; |
258 } | 258 } |
259 | 259 |
260 checkTasks2(api.Tasks2 o) { | 260 checkTasks2(api.Tasks2 o) { |
261 buildCounterTasks2++; | 261 buildCounterTasks2++; |
262 if (buildCounterTasks2 < 3) { | 262 if (buildCounterTasks2 < 3) { |
263 checkUnnamed3565(o.items); | 263 checkUnnamed3657(o.items); |
264 unittest.expect(o.kind, unittest.equals('foo')); | 264 unittest.expect(o.kind, unittest.equals('foo')); |
265 } | 265 } |
266 buildCounterTasks2--; | 266 buildCounterTasks2--; |
267 } | 267 } |
268 | 268 |
269 | 269 |
270 main() { | 270 main() { |
271 unittest.group("obj-schema-Task", () { | 271 unittest.group("obj-schema-Task", () { |
272 unittest.test("to-json--from-json", () { | 272 unittest.test("to-json--from-json", () { |
273 var o = buildTask(); | 273 var o = buildTask(); |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 res.update(arg_request, arg_project, arg_taskqueue, arg_task, arg_newLease
Seconds).then(unittest.expectAsync(((api.Task response) { | 697 res.update(arg_request, arg_project, arg_taskqueue, arg_task, arg_newLease
Seconds).then(unittest.expectAsync(((api.Task response) { |
698 checkTask(response); | 698 checkTask(response); |
699 }))); | 699 }))); |
700 }); | 700 }); |
701 | 701 |
702 }); | 702 }); |
703 | 703 |
704 | 704 |
705 } | 705 } |
706 | 706 |
OLD | NEW |