OLD | NEW |
1 library googleapis_beta.logging.v2beta1.test; | 1 library googleapis_beta.logging.v2beta1.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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 core.int buildCounterHttpRequest = 0; | 71 core.int buildCounterHttpRequest = 0; |
72 buildHttpRequest() { | 72 buildHttpRequest() { |
73 var o = new api.HttpRequest(); | 73 var o = new api.HttpRequest(); |
74 buildCounterHttpRequest++; | 74 buildCounterHttpRequest++; |
75 if (buildCounterHttpRequest < 3) { | 75 if (buildCounterHttpRequest < 3) { |
76 o.cacheFillBytes = "foo"; | 76 o.cacheFillBytes = "foo"; |
77 o.cacheHit = true; | 77 o.cacheHit = true; |
78 o.cacheLookup = true; | 78 o.cacheLookup = true; |
79 o.cacheValidatedWithOriginServer = true; | 79 o.cacheValidatedWithOriginServer = true; |
| 80 o.latency = "foo"; |
80 o.referer = "foo"; | 81 o.referer = "foo"; |
81 o.remoteIp = "foo"; | 82 o.remoteIp = "foo"; |
82 o.requestMethod = "foo"; | 83 o.requestMethod = "foo"; |
83 o.requestSize = "foo"; | 84 o.requestSize = "foo"; |
84 o.requestUrl = "foo"; | 85 o.requestUrl = "foo"; |
85 o.responseSize = "foo"; | 86 o.responseSize = "foo"; |
| 87 o.serverIp = "foo"; |
86 o.status = 42; | 88 o.status = 42; |
87 o.userAgent = "foo"; | 89 o.userAgent = "foo"; |
88 } | 90 } |
89 buildCounterHttpRequest--; | 91 buildCounterHttpRequest--; |
90 return o; | 92 return o; |
91 } | 93 } |
92 | 94 |
93 checkHttpRequest(api.HttpRequest o) { | 95 checkHttpRequest(api.HttpRequest o) { |
94 buildCounterHttpRequest++; | 96 buildCounterHttpRequest++; |
95 if (buildCounterHttpRequest < 3) { | 97 if (buildCounterHttpRequest < 3) { |
96 unittest.expect(o.cacheFillBytes, unittest.equals('foo')); | 98 unittest.expect(o.cacheFillBytes, unittest.equals('foo')); |
97 unittest.expect(o.cacheHit, unittest.isTrue); | 99 unittest.expect(o.cacheHit, unittest.isTrue); |
98 unittest.expect(o.cacheLookup, unittest.isTrue); | 100 unittest.expect(o.cacheLookup, unittest.isTrue); |
99 unittest.expect(o.cacheValidatedWithOriginServer, unittest.isTrue); | 101 unittest.expect(o.cacheValidatedWithOriginServer, unittest.isTrue); |
| 102 unittest.expect(o.latency, unittest.equals('foo')); |
100 unittest.expect(o.referer, unittest.equals('foo')); | 103 unittest.expect(o.referer, unittest.equals('foo')); |
101 unittest.expect(o.remoteIp, unittest.equals('foo')); | 104 unittest.expect(o.remoteIp, unittest.equals('foo')); |
102 unittest.expect(o.requestMethod, unittest.equals('foo')); | 105 unittest.expect(o.requestMethod, unittest.equals('foo')); |
103 unittest.expect(o.requestSize, unittest.equals('foo')); | 106 unittest.expect(o.requestSize, unittest.equals('foo')); |
104 unittest.expect(o.requestUrl, unittest.equals('foo')); | 107 unittest.expect(o.requestUrl, unittest.equals('foo')); |
105 unittest.expect(o.responseSize, unittest.equals('foo')); | 108 unittest.expect(o.responseSize, unittest.equals('foo')); |
| 109 unittest.expect(o.serverIp, unittest.equals('foo')); |
106 unittest.expect(o.status, unittest.equals(42)); | 110 unittest.expect(o.status, unittest.equals(42)); |
107 unittest.expect(o.userAgent, unittest.equals('foo')); | 111 unittest.expect(o.userAgent, unittest.equals('foo')); |
108 } | 112 } |
109 buildCounterHttpRequest--; | 113 buildCounterHttpRequest--; |
110 } | 114 } |
111 | 115 |
112 core.int buildCounterLabelDescriptor = 0; | 116 core.int buildCounterLabelDescriptor = 0; |
113 buildLabelDescriptor() { | 117 buildLabelDescriptor() { |
114 var o = new api.LabelDescriptor(); | 118 var o = new api.LabelDescriptor(); |
115 buildCounterLabelDescriptor++; | 119 buildCounterLabelDescriptor++; |
116 if (buildCounterLabelDescriptor < 3) { | 120 if (buildCounterLabelDescriptor < 3) { |
117 o.description = "foo"; | 121 o.description = "foo"; |
118 o.key = "foo"; | 122 o.key = "foo"; |
119 o.valueType = "foo"; | 123 o.valueType = "foo"; |
120 } | 124 } |
121 buildCounterLabelDescriptor--; | 125 buildCounterLabelDescriptor--; |
122 return o; | 126 return o; |
123 } | 127 } |
124 | 128 |
125 checkLabelDescriptor(api.LabelDescriptor o) { | 129 checkLabelDescriptor(api.LabelDescriptor o) { |
126 buildCounterLabelDescriptor++; | 130 buildCounterLabelDescriptor++; |
127 if (buildCounterLabelDescriptor < 3) { | 131 if (buildCounterLabelDescriptor < 3) { |
128 unittest.expect(o.description, unittest.equals('foo')); | 132 unittest.expect(o.description, unittest.equals('foo')); |
129 unittest.expect(o.key, unittest.equals('foo')); | 133 unittest.expect(o.key, unittest.equals('foo')); |
130 unittest.expect(o.valueType, unittest.equals('foo')); | 134 unittest.expect(o.valueType, unittest.equals('foo')); |
131 } | 135 } |
132 buildCounterLabelDescriptor--; | 136 buildCounterLabelDescriptor--; |
133 } | 137 } |
134 | 138 |
135 buildUnnamed4149() { | 139 buildUnnamed3986() { |
136 var o = new core.List<core.String>(); | 140 var o = new core.List<core.String>(); |
137 o.add("foo"); | 141 o.add("foo"); |
138 o.add("foo"); | 142 o.add("foo"); |
139 return o; | 143 return o; |
140 } | 144 } |
141 | 145 |
142 checkUnnamed4149(core.List<core.String> o) { | 146 checkUnnamed3986(core.List<core.String> o) { |
143 unittest.expect(o, unittest.hasLength(2)); | 147 unittest.expect(o, unittest.hasLength(2)); |
144 unittest.expect(o[0], unittest.equals('foo')); | 148 unittest.expect(o[0], unittest.equals('foo')); |
145 unittest.expect(o[1], unittest.equals('foo')); | 149 unittest.expect(o[1], unittest.equals('foo')); |
| 150 } |
| 151 |
| 152 buildUnnamed3987() { |
| 153 var o = new core.List<core.String>(); |
| 154 o.add("foo"); |
| 155 o.add("foo"); |
| 156 return o; |
| 157 } |
| 158 |
| 159 checkUnnamed3987(core.List<core.String> o) { |
| 160 unittest.expect(o, unittest.hasLength(2)); |
| 161 unittest.expect(o[0], unittest.equals('foo')); |
| 162 unittest.expect(o[1], unittest.equals('foo')); |
146 } | 163 } |
147 | 164 |
148 core.int buildCounterListLogEntriesRequest = 0; | 165 core.int buildCounterListLogEntriesRequest = 0; |
149 buildListLogEntriesRequest() { | 166 buildListLogEntriesRequest() { |
150 var o = new api.ListLogEntriesRequest(); | 167 var o = new api.ListLogEntriesRequest(); |
151 buildCounterListLogEntriesRequest++; | 168 buildCounterListLogEntriesRequest++; |
152 if (buildCounterListLogEntriesRequest < 3) { | 169 if (buildCounterListLogEntriesRequest < 3) { |
153 o.filter = "foo"; | 170 o.filter = "foo"; |
154 o.orderBy = "foo"; | 171 o.orderBy = "foo"; |
155 o.pageSize = 42; | 172 o.pageSize = 42; |
156 o.pageToken = "foo"; | 173 o.pageToken = "foo"; |
157 o.partialSuccess = true; | 174 o.projectIds = buildUnnamed3986(); |
158 o.projectIds = buildUnnamed4149(); | 175 o.resourceNames = buildUnnamed3987(); |
159 } | 176 } |
160 buildCounterListLogEntriesRequest--; | 177 buildCounterListLogEntriesRequest--; |
161 return o; | 178 return o; |
162 } | 179 } |
163 | 180 |
164 checkListLogEntriesRequest(api.ListLogEntriesRequest o) { | 181 checkListLogEntriesRequest(api.ListLogEntriesRequest o) { |
165 buildCounterListLogEntriesRequest++; | 182 buildCounterListLogEntriesRequest++; |
166 if (buildCounterListLogEntriesRequest < 3) { | 183 if (buildCounterListLogEntriesRequest < 3) { |
167 unittest.expect(o.filter, unittest.equals('foo')); | 184 unittest.expect(o.filter, unittest.equals('foo')); |
168 unittest.expect(o.orderBy, unittest.equals('foo')); | 185 unittest.expect(o.orderBy, unittest.equals('foo')); |
169 unittest.expect(o.pageSize, unittest.equals(42)); | 186 unittest.expect(o.pageSize, unittest.equals(42)); |
170 unittest.expect(o.pageToken, unittest.equals('foo')); | 187 unittest.expect(o.pageToken, unittest.equals('foo')); |
171 unittest.expect(o.partialSuccess, unittest.isTrue); | 188 checkUnnamed3986(o.projectIds); |
172 checkUnnamed4149(o.projectIds); | 189 checkUnnamed3987(o.resourceNames); |
173 } | 190 } |
174 buildCounterListLogEntriesRequest--; | 191 buildCounterListLogEntriesRequest--; |
175 } | 192 } |
176 | 193 |
177 buildUnnamed4150() { | 194 buildUnnamed3988() { |
178 var o = new core.List<api.LogEntry>(); | 195 var o = new core.List<api.LogEntry>(); |
179 o.add(buildLogEntry()); | 196 o.add(buildLogEntry()); |
180 o.add(buildLogEntry()); | 197 o.add(buildLogEntry()); |
181 return o; | 198 return o; |
182 } | 199 } |
183 | 200 |
184 checkUnnamed4150(core.List<api.LogEntry> o) { | 201 checkUnnamed3988(core.List<api.LogEntry> o) { |
185 unittest.expect(o, unittest.hasLength(2)); | 202 unittest.expect(o, unittest.hasLength(2)); |
186 checkLogEntry(o[0]); | 203 checkLogEntry(o[0]); |
187 checkLogEntry(o[1]); | 204 checkLogEntry(o[1]); |
188 } | 205 } |
189 | 206 |
190 buildUnnamed4151() { | |
191 var o = new core.Map<core.String, api.Status>(); | |
192 o["x"] = buildStatus(); | |
193 o["y"] = buildStatus(); | |
194 return o; | |
195 } | |
196 | |
197 checkUnnamed4151(core.Map<core.String, api.Status> o) { | |
198 unittest.expect(o, unittest.hasLength(2)); | |
199 checkStatus(o["x"]); | |
200 checkStatus(o["y"]); | |
201 } | |
202 | |
203 core.int buildCounterListLogEntriesResponse = 0; | 207 core.int buildCounterListLogEntriesResponse = 0; |
204 buildListLogEntriesResponse() { | 208 buildListLogEntriesResponse() { |
205 var o = new api.ListLogEntriesResponse(); | 209 var o = new api.ListLogEntriesResponse(); |
206 buildCounterListLogEntriesResponse++; | 210 buildCounterListLogEntriesResponse++; |
207 if (buildCounterListLogEntriesResponse < 3) { | 211 if (buildCounterListLogEntriesResponse < 3) { |
208 o.entries = buildUnnamed4150(); | 212 o.entries = buildUnnamed3988(); |
209 o.nextPageToken = "foo"; | 213 o.nextPageToken = "foo"; |
210 o.projectIdErrors = buildUnnamed4151(); | |
211 } | 214 } |
212 buildCounterListLogEntriesResponse--; | 215 buildCounterListLogEntriesResponse--; |
213 return o; | 216 return o; |
214 } | 217 } |
215 | 218 |
216 checkListLogEntriesResponse(api.ListLogEntriesResponse o) { | 219 checkListLogEntriesResponse(api.ListLogEntriesResponse o) { |
217 buildCounterListLogEntriesResponse++; | 220 buildCounterListLogEntriesResponse++; |
218 if (buildCounterListLogEntriesResponse < 3) { | 221 if (buildCounterListLogEntriesResponse < 3) { |
219 checkUnnamed4150(o.entries); | 222 checkUnnamed3988(o.entries); |
220 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 223 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
221 checkUnnamed4151(o.projectIdErrors); | |
222 } | 224 } |
223 buildCounterListLogEntriesResponse--; | 225 buildCounterListLogEntriesResponse--; |
224 } | 226 } |
225 | 227 |
226 buildUnnamed4152() { | 228 buildUnnamed3989() { |
227 var o = new core.List<api.LogMetric>(); | 229 var o = new core.List<api.LogMetric>(); |
228 o.add(buildLogMetric()); | 230 o.add(buildLogMetric()); |
229 o.add(buildLogMetric()); | 231 o.add(buildLogMetric()); |
230 return o; | 232 return o; |
231 } | 233 } |
232 | 234 |
233 checkUnnamed4152(core.List<api.LogMetric> o) { | 235 checkUnnamed3989(core.List<api.LogMetric> o) { |
234 unittest.expect(o, unittest.hasLength(2)); | 236 unittest.expect(o, unittest.hasLength(2)); |
235 checkLogMetric(o[0]); | 237 checkLogMetric(o[0]); |
236 checkLogMetric(o[1]); | 238 checkLogMetric(o[1]); |
237 } | 239 } |
238 | 240 |
239 core.int buildCounterListLogMetricsResponse = 0; | 241 core.int buildCounterListLogMetricsResponse = 0; |
240 buildListLogMetricsResponse() { | 242 buildListLogMetricsResponse() { |
241 var o = new api.ListLogMetricsResponse(); | 243 var o = new api.ListLogMetricsResponse(); |
242 buildCounterListLogMetricsResponse++; | 244 buildCounterListLogMetricsResponse++; |
243 if (buildCounterListLogMetricsResponse < 3) { | 245 if (buildCounterListLogMetricsResponse < 3) { |
244 o.metrics = buildUnnamed4152(); | 246 o.metrics = buildUnnamed3989(); |
245 o.nextPageToken = "foo"; | 247 o.nextPageToken = "foo"; |
246 } | 248 } |
247 buildCounterListLogMetricsResponse--; | 249 buildCounterListLogMetricsResponse--; |
248 return o; | 250 return o; |
249 } | 251 } |
250 | 252 |
251 checkListLogMetricsResponse(api.ListLogMetricsResponse o) { | 253 checkListLogMetricsResponse(api.ListLogMetricsResponse o) { |
252 buildCounterListLogMetricsResponse++; | 254 buildCounterListLogMetricsResponse++; |
253 if (buildCounterListLogMetricsResponse < 3) { | 255 if (buildCounterListLogMetricsResponse < 3) { |
254 checkUnnamed4152(o.metrics); | 256 checkUnnamed3989(o.metrics); |
255 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 257 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
256 } | 258 } |
257 buildCounterListLogMetricsResponse--; | 259 buildCounterListLogMetricsResponse--; |
258 } | 260 } |
259 | 261 |
260 buildUnnamed4153() { | 262 buildUnnamed3990() { |
261 var o = new core.List<api.MonitoredResourceDescriptor>(); | 263 var o = new core.List<api.MonitoredResourceDescriptor>(); |
262 o.add(buildMonitoredResourceDescriptor()); | 264 o.add(buildMonitoredResourceDescriptor()); |
263 o.add(buildMonitoredResourceDescriptor()); | 265 o.add(buildMonitoredResourceDescriptor()); |
264 return o; | 266 return o; |
265 } | 267 } |
266 | 268 |
267 checkUnnamed4153(core.List<api.MonitoredResourceDescriptor> o) { | 269 checkUnnamed3990(core.List<api.MonitoredResourceDescriptor> o) { |
268 unittest.expect(o, unittest.hasLength(2)); | 270 unittest.expect(o, unittest.hasLength(2)); |
269 checkMonitoredResourceDescriptor(o[0]); | 271 checkMonitoredResourceDescriptor(o[0]); |
270 checkMonitoredResourceDescriptor(o[1]); | 272 checkMonitoredResourceDescriptor(o[1]); |
271 } | 273 } |
272 | 274 |
273 core.int buildCounterListMonitoredResourceDescriptorsResponse = 0; | 275 core.int buildCounterListMonitoredResourceDescriptorsResponse = 0; |
274 buildListMonitoredResourceDescriptorsResponse() { | 276 buildListMonitoredResourceDescriptorsResponse() { |
275 var o = new api.ListMonitoredResourceDescriptorsResponse(); | 277 var o = new api.ListMonitoredResourceDescriptorsResponse(); |
276 buildCounterListMonitoredResourceDescriptorsResponse++; | 278 buildCounterListMonitoredResourceDescriptorsResponse++; |
277 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { | 279 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { |
278 o.nextPageToken = "foo"; | 280 o.nextPageToken = "foo"; |
279 o.resourceDescriptors = buildUnnamed4153(); | 281 o.resourceDescriptors = buildUnnamed3990(); |
280 } | 282 } |
281 buildCounterListMonitoredResourceDescriptorsResponse--; | 283 buildCounterListMonitoredResourceDescriptorsResponse--; |
282 return o; | 284 return o; |
283 } | 285 } |
284 | 286 |
285 checkListMonitoredResourceDescriptorsResponse(api.ListMonitoredResourceDescripto
rsResponse o) { | 287 checkListMonitoredResourceDescriptorsResponse(api.ListMonitoredResourceDescripto
rsResponse o) { |
286 buildCounterListMonitoredResourceDescriptorsResponse++; | 288 buildCounterListMonitoredResourceDescriptorsResponse++; |
287 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { | 289 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { |
288 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 290 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
289 checkUnnamed4153(o.resourceDescriptors); | 291 checkUnnamed3990(o.resourceDescriptors); |
290 } | 292 } |
291 buildCounterListMonitoredResourceDescriptorsResponse--; | 293 buildCounterListMonitoredResourceDescriptorsResponse--; |
292 } | 294 } |
293 | 295 |
294 buildUnnamed4154() { | 296 buildUnnamed3991() { |
295 var o = new core.List<api.LogSink>(); | 297 var o = new core.List<api.LogSink>(); |
296 o.add(buildLogSink()); | 298 o.add(buildLogSink()); |
297 o.add(buildLogSink()); | 299 o.add(buildLogSink()); |
298 return o; | 300 return o; |
299 } | 301 } |
300 | 302 |
301 checkUnnamed4154(core.List<api.LogSink> o) { | 303 checkUnnamed3991(core.List<api.LogSink> o) { |
302 unittest.expect(o, unittest.hasLength(2)); | 304 unittest.expect(o, unittest.hasLength(2)); |
303 checkLogSink(o[0]); | 305 checkLogSink(o[0]); |
304 checkLogSink(o[1]); | 306 checkLogSink(o[1]); |
305 } | 307 } |
306 | 308 |
307 core.int buildCounterListSinksResponse = 0; | 309 core.int buildCounterListSinksResponse = 0; |
308 buildListSinksResponse() { | 310 buildListSinksResponse() { |
309 var o = new api.ListSinksResponse(); | 311 var o = new api.ListSinksResponse(); |
310 buildCounterListSinksResponse++; | 312 buildCounterListSinksResponse++; |
311 if (buildCounterListSinksResponse < 3) { | 313 if (buildCounterListSinksResponse < 3) { |
312 o.nextPageToken = "foo"; | 314 o.nextPageToken = "foo"; |
313 o.sinks = buildUnnamed4154(); | 315 o.sinks = buildUnnamed3991(); |
314 } | 316 } |
315 buildCounterListSinksResponse--; | 317 buildCounterListSinksResponse--; |
316 return o; | 318 return o; |
317 } | 319 } |
318 | 320 |
319 checkListSinksResponse(api.ListSinksResponse o) { | 321 checkListSinksResponse(api.ListSinksResponse o) { |
320 buildCounterListSinksResponse++; | 322 buildCounterListSinksResponse++; |
321 if (buildCounterListSinksResponse < 3) { | 323 if (buildCounterListSinksResponse < 3) { |
322 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 324 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
323 checkUnnamed4154(o.sinks); | 325 checkUnnamed3991(o.sinks); |
324 } | 326 } |
325 buildCounterListSinksResponse--; | 327 buildCounterListSinksResponse--; |
326 } | 328 } |
327 | 329 |
328 buildUnnamed4155() { | 330 buildUnnamed3992() { |
329 var o = new core.Map<core.String, core.Object>(); | 331 var o = new core.Map<core.String, core.Object>(); |
330 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 332 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
331 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 333 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
332 return o; | 334 return o; |
333 } | 335 } |
334 | 336 |
335 checkUnnamed4155(core.Map<core.String, core.Object> o) { | 337 checkUnnamed3992(core.Map<core.String, core.Object> o) { |
336 unittest.expect(o, unittest.hasLength(2)); | 338 unittest.expect(o, unittest.hasLength(2)); |
337 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')); | 339 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')); |
338 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')); | 340 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')); |
339 } | 341 } |
340 | 342 |
341 buildUnnamed4156() { | 343 buildUnnamed3993() { |
342 var o = new core.Map<core.String, core.String>(); | 344 var o = new core.Map<core.String, core.String>(); |
343 o["x"] = "foo"; | 345 o["x"] = "foo"; |
344 o["y"] = "foo"; | 346 o["y"] = "foo"; |
345 return o; | 347 return o; |
346 } | 348 } |
347 | 349 |
348 checkUnnamed4156(core.Map<core.String, core.String> o) { | 350 checkUnnamed3993(core.Map<core.String, core.String> o) { |
349 unittest.expect(o, unittest.hasLength(2)); | 351 unittest.expect(o, unittest.hasLength(2)); |
350 unittest.expect(o["x"], unittest.equals('foo')); | 352 unittest.expect(o["x"], unittest.equals('foo')); |
351 unittest.expect(o["y"], unittest.equals('foo')); | 353 unittest.expect(o["y"], unittest.equals('foo')); |
352 } | 354 } |
353 | 355 |
354 buildUnnamed4157() { | 356 buildUnnamed3994() { |
355 var o = new core.Map<core.String, core.Object>(); | 357 var o = new core.Map<core.String, core.Object>(); |
356 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 358 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
357 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 359 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
358 return o; | 360 return o; |
359 } | 361 } |
360 | 362 |
361 checkUnnamed4157(core.Map<core.String, core.Object> o) { | 363 checkUnnamed3994(core.Map<core.String, core.Object> o) { |
362 unittest.expect(o, unittest.hasLength(2)); | 364 unittest.expect(o, unittest.hasLength(2)); |
363 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')); | 365 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')); |
364 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')); | 366 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')); |
365 } | 367 } |
366 | 368 |
367 core.int buildCounterLogEntry = 0; | 369 core.int buildCounterLogEntry = 0; |
368 buildLogEntry() { | 370 buildLogEntry() { |
369 var o = new api.LogEntry(); | 371 var o = new api.LogEntry(); |
370 buildCounterLogEntry++; | 372 buildCounterLogEntry++; |
371 if (buildCounterLogEntry < 3) { | 373 if (buildCounterLogEntry < 3) { |
372 o.httpRequest = buildHttpRequest(); | 374 o.httpRequest = buildHttpRequest(); |
373 o.insertId = "foo"; | 375 o.insertId = "foo"; |
374 o.jsonPayload = buildUnnamed4155(); | 376 o.jsonPayload = buildUnnamed3992(); |
375 o.labels = buildUnnamed4156(); | 377 o.labels = buildUnnamed3993(); |
376 o.logName = "foo"; | 378 o.logName = "foo"; |
377 o.operation = buildLogEntryOperation(); | 379 o.operation = buildLogEntryOperation(); |
378 o.protoPayload = buildUnnamed4157(); | 380 o.protoPayload = buildUnnamed3994(); |
379 o.resource = buildMonitoredResource(); | 381 o.resource = buildMonitoredResource(); |
380 o.severity = "foo"; | 382 o.severity = "foo"; |
381 o.textPayload = "foo"; | 383 o.textPayload = "foo"; |
382 o.timestamp = "foo"; | 384 o.timestamp = "foo"; |
383 } | 385 } |
384 buildCounterLogEntry--; | 386 buildCounterLogEntry--; |
385 return o; | 387 return o; |
386 } | 388 } |
387 | 389 |
388 checkLogEntry(api.LogEntry o) { | 390 checkLogEntry(api.LogEntry o) { |
389 buildCounterLogEntry++; | 391 buildCounterLogEntry++; |
390 if (buildCounterLogEntry < 3) { | 392 if (buildCounterLogEntry < 3) { |
391 checkHttpRequest(o.httpRequest); | 393 checkHttpRequest(o.httpRequest); |
392 unittest.expect(o.insertId, unittest.equals('foo')); | 394 unittest.expect(o.insertId, unittest.equals('foo')); |
393 checkUnnamed4155(o.jsonPayload); | 395 checkUnnamed3992(o.jsonPayload); |
394 checkUnnamed4156(o.labels); | 396 checkUnnamed3993(o.labels); |
395 unittest.expect(o.logName, unittest.equals('foo')); | 397 unittest.expect(o.logName, unittest.equals('foo')); |
396 checkLogEntryOperation(o.operation); | 398 checkLogEntryOperation(o.operation); |
397 checkUnnamed4157(o.protoPayload); | 399 checkUnnamed3994(o.protoPayload); |
398 checkMonitoredResource(o.resource); | 400 checkMonitoredResource(o.resource); |
399 unittest.expect(o.severity, unittest.equals('foo')); | 401 unittest.expect(o.severity, unittest.equals('foo')); |
400 unittest.expect(o.textPayload, unittest.equals('foo')); | 402 unittest.expect(o.textPayload, unittest.equals('foo')); |
401 unittest.expect(o.timestamp, unittest.equals('foo')); | 403 unittest.expect(o.timestamp, unittest.equals('foo')); |
402 } | 404 } |
403 buildCounterLogEntry--; | 405 buildCounterLogEntry--; |
404 } | 406 } |
405 | 407 |
406 core.int buildCounterLogEntryOperation = 0; | 408 core.int buildCounterLogEntryOperation = 0; |
407 buildLogEntryOperation() { | 409 buildLogEntryOperation() { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 } | 456 } |
455 | 457 |
456 core.int buildCounterLogMetric = 0; | 458 core.int buildCounterLogMetric = 0; |
457 buildLogMetric() { | 459 buildLogMetric() { |
458 var o = new api.LogMetric(); | 460 var o = new api.LogMetric(); |
459 buildCounterLogMetric++; | 461 buildCounterLogMetric++; |
460 if (buildCounterLogMetric < 3) { | 462 if (buildCounterLogMetric < 3) { |
461 o.description = "foo"; | 463 o.description = "foo"; |
462 o.filter = "foo"; | 464 o.filter = "foo"; |
463 o.name = "foo"; | 465 o.name = "foo"; |
| 466 o.version = "foo"; |
464 } | 467 } |
465 buildCounterLogMetric--; | 468 buildCounterLogMetric--; |
466 return o; | 469 return o; |
467 } | 470 } |
468 | 471 |
469 checkLogMetric(api.LogMetric o) { | 472 checkLogMetric(api.LogMetric o) { |
470 buildCounterLogMetric++; | 473 buildCounterLogMetric++; |
471 if (buildCounterLogMetric < 3) { | 474 if (buildCounterLogMetric < 3) { |
472 unittest.expect(o.description, unittest.equals('foo')); | 475 unittest.expect(o.description, unittest.equals('foo')); |
473 unittest.expect(o.filter, unittest.equals('foo')); | 476 unittest.expect(o.filter, unittest.equals('foo')); |
474 unittest.expect(o.name, unittest.equals('foo')); | 477 unittest.expect(o.name, unittest.equals('foo')); |
| 478 unittest.expect(o.version, unittest.equals('foo')); |
475 } | 479 } |
476 buildCounterLogMetric--; | 480 buildCounterLogMetric--; |
477 } | 481 } |
478 | 482 |
479 core.int buildCounterLogSink = 0; | 483 core.int buildCounterLogSink = 0; |
480 buildLogSink() { | 484 buildLogSink() { |
481 var o = new api.LogSink(); | 485 var o = new api.LogSink(); |
482 buildCounterLogSink++; | 486 buildCounterLogSink++; |
483 if (buildCounterLogSink < 3) { | 487 if (buildCounterLogSink < 3) { |
484 o.destination = "foo"; | 488 o.destination = "foo"; |
| 489 o.endTime = "foo"; |
485 o.filter = "foo"; | 490 o.filter = "foo"; |
486 o.name = "foo"; | 491 o.name = "foo"; |
487 o.outputVersionFormat = "foo"; | 492 o.outputVersionFormat = "foo"; |
| 493 o.startTime = "foo"; |
| 494 o.writerIdentity = "foo"; |
488 } | 495 } |
489 buildCounterLogSink--; | 496 buildCounterLogSink--; |
490 return o; | 497 return o; |
491 } | 498 } |
492 | 499 |
493 checkLogSink(api.LogSink o) { | 500 checkLogSink(api.LogSink o) { |
494 buildCounterLogSink++; | 501 buildCounterLogSink++; |
495 if (buildCounterLogSink < 3) { | 502 if (buildCounterLogSink < 3) { |
496 unittest.expect(o.destination, unittest.equals('foo')); | 503 unittest.expect(o.destination, unittest.equals('foo')); |
| 504 unittest.expect(o.endTime, unittest.equals('foo')); |
497 unittest.expect(o.filter, unittest.equals('foo')); | 505 unittest.expect(o.filter, unittest.equals('foo')); |
498 unittest.expect(o.name, unittest.equals('foo')); | 506 unittest.expect(o.name, unittest.equals('foo')); |
499 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); | 507 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); |
| 508 unittest.expect(o.startTime, unittest.equals('foo')); |
| 509 unittest.expect(o.writerIdentity, unittest.equals('foo')); |
500 } | 510 } |
501 buildCounterLogSink--; | 511 buildCounterLogSink--; |
502 } | 512 } |
503 | 513 |
504 buildUnnamed4158() { | 514 buildUnnamed3995() { |
505 var o = new core.Map<core.String, core.String>(); | 515 var o = new core.Map<core.String, core.String>(); |
506 o["x"] = "foo"; | 516 o["x"] = "foo"; |
507 o["y"] = "foo"; | 517 o["y"] = "foo"; |
508 return o; | 518 return o; |
509 } | 519 } |
510 | 520 |
511 checkUnnamed4158(core.Map<core.String, core.String> o) { | 521 checkUnnamed3995(core.Map<core.String, core.String> o) { |
512 unittest.expect(o, unittest.hasLength(2)); | 522 unittest.expect(o, unittest.hasLength(2)); |
513 unittest.expect(o["x"], unittest.equals('foo')); | 523 unittest.expect(o["x"], unittest.equals('foo')); |
514 unittest.expect(o["y"], unittest.equals('foo')); | 524 unittest.expect(o["y"], unittest.equals('foo')); |
515 } | 525 } |
516 | 526 |
517 core.int buildCounterMonitoredResource = 0; | 527 core.int buildCounterMonitoredResource = 0; |
518 buildMonitoredResource() { | 528 buildMonitoredResource() { |
519 var o = new api.MonitoredResource(); | 529 var o = new api.MonitoredResource(); |
520 buildCounterMonitoredResource++; | 530 buildCounterMonitoredResource++; |
521 if (buildCounterMonitoredResource < 3) { | 531 if (buildCounterMonitoredResource < 3) { |
522 o.labels = buildUnnamed4158(); | 532 o.labels = buildUnnamed3995(); |
523 o.type = "foo"; | 533 o.type = "foo"; |
524 } | 534 } |
525 buildCounterMonitoredResource--; | 535 buildCounterMonitoredResource--; |
526 return o; | 536 return o; |
527 } | 537 } |
528 | 538 |
529 checkMonitoredResource(api.MonitoredResource o) { | 539 checkMonitoredResource(api.MonitoredResource o) { |
530 buildCounterMonitoredResource++; | 540 buildCounterMonitoredResource++; |
531 if (buildCounterMonitoredResource < 3) { | 541 if (buildCounterMonitoredResource < 3) { |
532 checkUnnamed4158(o.labels); | 542 checkUnnamed3995(o.labels); |
533 unittest.expect(o.type, unittest.equals('foo')); | 543 unittest.expect(o.type, unittest.equals('foo')); |
534 } | 544 } |
535 buildCounterMonitoredResource--; | 545 buildCounterMonitoredResource--; |
536 } | 546 } |
537 | 547 |
538 buildUnnamed4159() { | 548 buildUnnamed3996() { |
539 var o = new core.List<api.LabelDescriptor>(); | 549 var o = new core.List<api.LabelDescriptor>(); |
540 o.add(buildLabelDescriptor()); | 550 o.add(buildLabelDescriptor()); |
541 o.add(buildLabelDescriptor()); | 551 o.add(buildLabelDescriptor()); |
542 return o; | 552 return o; |
543 } | 553 } |
544 | 554 |
545 checkUnnamed4159(core.List<api.LabelDescriptor> o) { | 555 checkUnnamed3996(core.List<api.LabelDescriptor> o) { |
546 unittest.expect(o, unittest.hasLength(2)); | 556 unittest.expect(o, unittest.hasLength(2)); |
547 checkLabelDescriptor(o[0]); | 557 checkLabelDescriptor(o[0]); |
548 checkLabelDescriptor(o[1]); | 558 checkLabelDescriptor(o[1]); |
549 } | 559 } |
550 | 560 |
551 core.int buildCounterMonitoredResourceDescriptor = 0; | 561 core.int buildCounterMonitoredResourceDescriptor = 0; |
552 buildMonitoredResourceDescriptor() { | 562 buildMonitoredResourceDescriptor() { |
553 var o = new api.MonitoredResourceDescriptor(); | 563 var o = new api.MonitoredResourceDescriptor(); |
554 buildCounterMonitoredResourceDescriptor++; | 564 buildCounterMonitoredResourceDescriptor++; |
555 if (buildCounterMonitoredResourceDescriptor < 3) { | 565 if (buildCounterMonitoredResourceDescriptor < 3) { |
556 o.description = "foo"; | 566 o.description = "foo"; |
557 o.displayName = "foo"; | 567 o.displayName = "foo"; |
558 o.labels = buildUnnamed4159(); | 568 o.labels = buildUnnamed3996(); |
559 o.name = "foo"; | 569 o.name = "foo"; |
560 o.type = "foo"; | 570 o.type = "foo"; |
561 } | 571 } |
562 buildCounterMonitoredResourceDescriptor--; | 572 buildCounterMonitoredResourceDescriptor--; |
563 return o; | 573 return o; |
564 } | 574 } |
565 | 575 |
566 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { | 576 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { |
567 buildCounterMonitoredResourceDescriptor++; | 577 buildCounterMonitoredResourceDescriptor++; |
568 if (buildCounterMonitoredResourceDescriptor < 3) { | 578 if (buildCounterMonitoredResourceDescriptor < 3) { |
569 unittest.expect(o.description, unittest.equals('foo')); | 579 unittest.expect(o.description, unittest.equals('foo')); |
570 unittest.expect(o.displayName, unittest.equals('foo')); | 580 unittest.expect(o.displayName, unittest.equals('foo')); |
571 checkUnnamed4159(o.labels); | 581 checkUnnamed3996(o.labels); |
572 unittest.expect(o.name, unittest.equals('foo')); | 582 unittest.expect(o.name, unittest.equals('foo')); |
573 unittest.expect(o.type, unittest.equals('foo')); | 583 unittest.expect(o.type, unittest.equals('foo')); |
574 } | 584 } |
575 buildCounterMonitoredResourceDescriptor--; | 585 buildCounterMonitoredResourceDescriptor--; |
576 } | 586 } |
577 | 587 |
578 buildUnnamed4160() { | 588 buildUnnamed3997() { |
579 var o = new core.List<api.LogLine>(); | 589 var o = new core.List<api.LogLine>(); |
580 o.add(buildLogLine()); | 590 o.add(buildLogLine()); |
581 o.add(buildLogLine()); | 591 o.add(buildLogLine()); |
582 return o; | 592 return o; |
583 } | 593 } |
584 | 594 |
585 checkUnnamed4160(core.List<api.LogLine> o) { | 595 checkUnnamed3997(core.List<api.LogLine> o) { |
586 unittest.expect(o, unittest.hasLength(2)); | 596 unittest.expect(o, unittest.hasLength(2)); |
587 checkLogLine(o[0]); | 597 checkLogLine(o[0]); |
588 checkLogLine(o[1]); | 598 checkLogLine(o[1]); |
589 } | 599 } |
590 | 600 |
591 buildUnnamed4161() { | 601 buildUnnamed3998() { |
592 var o = new core.List<api.SourceReference>(); | 602 var o = new core.List<api.SourceReference>(); |
593 o.add(buildSourceReference()); | 603 o.add(buildSourceReference()); |
594 o.add(buildSourceReference()); | 604 o.add(buildSourceReference()); |
595 return o; | 605 return o; |
596 } | 606 } |
597 | 607 |
598 checkUnnamed4161(core.List<api.SourceReference> o) { | 608 checkUnnamed3998(core.List<api.SourceReference> o) { |
599 unittest.expect(o, unittest.hasLength(2)); | 609 unittest.expect(o, unittest.hasLength(2)); |
600 checkSourceReference(o[0]); | 610 checkSourceReference(o[0]); |
601 checkSourceReference(o[1]); | 611 checkSourceReference(o[1]); |
602 } | 612 } |
603 | 613 |
604 core.int buildCounterRequestLog = 0; | 614 core.int buildCounterRequestLog = 0; |
605 buildRequestLog() { | 615 buildRequestLog() { |
606 var o = new api.RequestLog(); | 616 var o = new api.RequestLog(); |
607 buildCounterRequestLog++; | 617 buildCounterRequestLog++; |
608 if (buildCounterRequestLog < 3) { | 618 if (buildCounterRequestLog < 3) { |
609 o.appEngineRelease = "foo"; | 619 o.appEngineRelease = "foo"; |
610 o.appId = "foo"; | 620 o.appId = "foo"; |
611 o.cost = 42.0; | 621 o.cost = 42.0; |
612 o.endTime = "foo"; | 622 o.endTime = "foo"; |
613 o.finished = true; | 623 o.finished = true; |
614 o.first = true; | 624 o.first = true; |
615 o.host = "foo"; | 625 o.host = "foo"; |
616 o.httpVersion = "foo"; | 626 o.httpVersion = "foo"; |
617 o.instanceId = "foo"; | 627 o.instanceId = "foo"; |
618 o.instanceIndex = 42; | 628 o.instanceIndex = 42; |
619 o.ip = "foo"; | 629 o.ip = "foo"; |
620 o.latency = "foo"; | 630 o.latency = "foo"; |
621 o.line = buildUnnamed4160(); | 631 o.line = buildUnnamed3997(); |
622 o.megaCycles = "foo"; | 632 o.megaCycles = "foo"; |
623 o.method = "foo"; | 633 o.method = "foo"; |
624 o.moduleId = "foo"; | 634 o.moduleId = "foo"; |
625 o.nickname = "foo"; | 635 o.nickname = "foo"; |
626 o.pendingTime = "foo"; | 636 o.pendingTime = "foo"; |
627 o.referrer = "foo"; | 637 o.referrer = "foo"; |
628 o.requestId = "foo"; | 638 o.requestId = "foo"; |
629 o.resource = "foo"; | 639 o.resource = "foo"; |
630 o.responseSize = "foo"; | 640 o.responseSize = "foo"; |
631 o.sourceReference = buildUnnamed4161(); | 641 o.sourceReference = buildUnnamed3998(); |
632 o.startTime = "foo"; | 642 o.startTime = "foo"; |
633 o.status = 42; | 643 o.status = 42; |
634 o.taskName = "foo"; | 644 o.taskName = "foo"; |
635 o.taskQueueName = "foo"; | 645 o.taskQueueName = "foo"; |
636 o.traceId = "foo"; | 646 o.traceId = "foo"; |
637 o.urlMapEntry = "foo"; | 647 o.urlMapEntry = "foo"; |
638 o.userAgent = "foo"; | 648 o.userAgent = "foo"; |
639 o.versionId = "foo"; | 649 o.versionId = "foo"; |
640 o.wasLoadingRequest = true; | 650 o.wasLoadingRequest = true; |
641 } | 651 } |
642 buildCounterRequestLog--; | 652 buildCounterRequestLog--; |
643 return o; | 653 return o; |
644 } | 654 } |
645 | 655 |
646 checkRequestLog(api.RequestLog o) { | 656 checkRequestLog(api.RequestLog o) { |
647 buildCounterRequestLog++; | 657 buildCounterRequestLog++; |
648 if (buildCounterRequestLog < 3) { | 658 if (buildCounterRequestLog < 3) { |
649 unittest.expect(o.appEngineRelease, unittest.equals('foo')); | 659 unittest.expect(o.appEngineRelease, unittest.equals('foo')); |
650 unittest.expect(o.appId, unittest.equals('foo')); | 660 unittest.expect(o.appId, unittest.equals('foo')); |
651 unittest.expect(o.cost, unittest.equals(42.0)); | 661 unittest.expect(o.cost, unittest.equals(42.0)); |
652 unittest.expect(o.endTime, unittest.equals('foo')); | 662 unittest.expect(o.endTime, unittest.equals('foo')); |
653 unittest.expect(o.finished, unittest.isTrue); | 663 unittest.expect(o.finished, unittest.isTrue); |
654 unittest.expect(o.first, unittest.isTrue); | 664 unittest.expect(o.first, unittest.isTrue); |
655 unittest.expect(o.host, unittest.equals('foo')); | 665 unittest.expect(o.host, unittest.equals('foo')); |
656 unittest.expect(o.httpVersion, unittest.equals('foo')); | 666 unittest.expect(o.httpVersion, unittest.equals('foo')); |
657 unittest.expect(o.instanceId, unittest.equals('foo')); | 667 unittest.expect(o.instanceId, unittest.equals('foo')); |
658 unittest.expect(o.instanceIndex, unittest.equals(42)); | 668 unittest.expect(o.instanceIndex, unittest.equals(42)); |
659 unittest.expect(o.ip, unittest.equals('foo')); | 669 unittest.expect(o.ip, unittest.equals('foo')); |
660 unittest.expect(o.latency, unittest.equals('foo')); | 670 unittest.expect(o.latency, unittest.equals('foo')); |
661 checkUnnamed4160(o.line); | 671 checkUnnamed3997(o.line); |
662 unittest.expect(o.megaCycles, unittest.equals('foo')); | 672 unittest.expect(o.megaCycles, unittest.equals('foo')); |
663 unittest.expect(o.method, unittest.equals('foo')); | 673 unittest.expect(o.method, unittest.equals('foo')); |
664 unittest.expect(o.moduleId, unittest.equals('foo')); | 674 unittest.expect(o.moduleId, unittest.equals('foo')); |
665 unittest.expect(o.nickname, unittest.equals('foo')); | 675 unittest.expect(o.nickname, unittest.equals('foo')); |
666 unittest.expect(o.pendingTime, unittest.equals('foo')); | 676 unittest.expect(o.pendingTime, unittest.equals('foo')); |
667 unittest.expect(o.referrer, unittest.equals('foo')); | 677 unittest.expect(o.referrer, unittest.equals('foo')); |
668 unittest.expect(o.requestId, unittest.equals('foo')); | 678 unittest.expect(o.requestId, unittest.equals('foo')); |
669 unittest.expect(o.resource, unittest.equals('foo')); | 679 unittest.expect(o.resource, unittest.equals('foo')); |
670 unittest.expect(o.responseSize, unittest.equals('foo')); | 680 unittest.expect(o.responseSize, unittest.equals('foo')); |
671 checkUnnamed4161(o.sourceReference); | 681 checkUnnamed3998(o.sourceReference); |
672 unittest.expect(o.startTime, unittest.equals('foo')); | 682 unittest.expect(o.startTime, unittest.equals('foo')); |
673 unittest.expect(o.status, unittest.equals(42)); | 683 unittest.expect(o.status, unittest.equals(42)); |
674 unittest.expect(o.taskName, unittest.equals('foo')); | 684 unittest.expect(o.taskName, unittest.equals('foo')); |
675 unittest.expect(o.taskQueueName, unittest.equals('foo')); | 685 unittest.expect(o.taskQueueName, unittest.equals('foo')); |
676 unittest.expect(o.traceId, unittest.equals('foo')); | 686 unittest.expect(o.traceId, unittest.equals('foo')); |
677 unittest.expect(o.urlMapEntry, unittest.equals('foo')); | 687 unittest.expect(o.urlMapEntry, unittest.equals('foo')); |
678 unittest.expect(o.userAgent, unittest.equals('foo')); | 688 unittest.expect(o.userAgent, unittest.equals('foo')); |
679 unittest.expect(o.versionId, unittest.equals('foo')); | 689 unittest.expect(o.versionId, unittest.equals('foo')); |
680 unittest.expect(o.wasLoadingRequest, unittest.isTrue); | 690 unittest.expect(o.wasLoadingRequest, unittest.isTrue); |
681 } | 691 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 | 729 |
720 checkSourceReference(api.SourceReference o) { | 730 checkSourceReference(api.SourceReference o) { |
721 buildCounterSourceReference++; | 731 buildCounterSourceReference++; |
722 if (buildCounterSourceReference < 3) { | 732 if (buildCounterSourceReference < 3) { |
723 unittest.expect(o.repository, unittest.equals('foo')); | 733 unittest.expect(o.repository, unittest.equals('foo')); |
724 unittest.expect(o.revisionId, unittest.equals('foo')); | 734 unittest.expect(o.revisionId, unittest.equals('foo')); |
725 } | 735 } |
726 buildCounterSourceReference--; | 736 buildCounterSourceReference--; |
727 } | 737 } |
728 | 738 |
729 buildUnnamed4162() { | 739 buildUnnamed3999() { |
730 var o = new core.Map<core.String, core.Object>(); | |
731 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | |
732 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | |
733 return o; | |
734 } | |
735 | |
736 checkUnnamed4162(core.Map<core.String, core.Object> o) { | |
737 unittest.expect(o, unittest.hasLength(2)); | |
738 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')); | |
739 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')); | |
740 } | |
741 | |
742 buildUnnamed4163() { | |
743 var o = new core.List<core.Map<core.String, core.Object>>(); | |
744 o.add(buildUnnamed4162()); | |
745 o.add(buildUnnamed4162()); | |
746 return o; | |
747 } | |
748 | |
749 checkUnnamed4163(core.List<core.Map<core.String, core.Object>> o) { | |
750 unittest.expect(o, unittest.hasLength(2)); | |
751 checkUnnamed4162(o[0]); | |
752 checkUnnamed4162(o[1]); | |
753 } | |
754 | |
755 core.int buildCounterStatus = 0; | |
756 buildStatus() { | |
757 var o = new api.Status(); | |
758 buildCounterStatus++; | |
759 if (buildCounterStatus < 3) { | |
760 o.code = 42; | |
761 o.details = buildUnnamed4163(); | |
762 o.message = "foo"; | |
763 } | |
764 buildCounterStatus--; | |
765 return o; | |
766 } | |
767 | |
768 checkStatus(api.Status o) { | |
769 buildCounterStatus++; | |
770 if (buildCounterStatus < 3) { | |
771 unittest.expect(o.code, unittest.equals(42)); | |
772 checkUnnamed4163(o.details); | |
773 unittest.expect(o.message, unittest.equals('foo')); | |
774 } | |
775 buildCounterStatus--; | |
776 } | |
777 | |
778 buildUnnamed4164() { | |
779 var o = new core.List<api.LogEntry>(); | 740 var o = new core.List<api.LogEntry>(); |
780 o.add(buildLogEntry()); | 741 o.add(buildLogEntry()); |
781 o.add(buildLogEntry()); | 742 o.add(buildLogEntry()); |
782 return o; | 743 return o; |
783 } | 744 } |
784 | 745 |
785 checkUnnamed4164(core.List<api.LogEntry> o) { | 746 checkUnnamed3999(core.List<api.LogEntry> o) { |
786 unittest.expect(o, unittest.hasLength(2)); | 747 unittest.expect(o, unittest.hasLength(2)); |
787 checkLogEntry(o[0]); | 748 checkLogEntry(o[0]); |
788 checkLogEntry(o[1]); | 749 checkLogEntry(o[1]); |
789 } | 750 } |
790 | 751 |
791 buildUnnamed4165() { | 752 buildUnnamed4000() { |
792 var o = new core.Map<core.String, core.String>(); | 753 var o = new core.Map<core.String, core.String>(); |
793 o["x"] = "foo"; | 754 o["x"] = "foo"; |
794 o["y"] = "foo"; | 755 o["y"] = "foo"; |
795 return o; | 756 return o; |
796 } | 757 } |
797 | 758 |
798 checkUnnamed4165(core.Map<core.String, core.String> o) { | 759 checkUnnamed4000(core.Map<core.String, core.String> o) { |
799 unittest.expect(o, unittest.hasLength(2)); | 760 unittest.expect(o, unittest.hasLength(2)); |
800 unittest.expect(o["x"], unittest.equals('foo')); | 761 unittest.expect(o["x"], unittest.equals('foo')); |
801 unittest.expect(o["y"], unittest.equals('foo')); | 762 unittest.expect(o["y"], unittest.equals('foo')); |
802 } | 763 } |
803 | 764 |
804 core.int buildCounterWriteLogEntriesRequest = 0; | 765 core.int buildCounterWriteLogEntriesRequest = 0; |
805 buildWriteLogEntriesRequest() { | 766 buildWriteLogEntriesRequest() { |
806 var o = new api.WriteLogEntriesRequest(); | 767 var o = new api.WriteLogEntriesRequest(); |
807 buildCounterWriteLogEntriesRequest++; | 768 buildCounterWriteLogEntriesRequest++; |
808 if (buildCounterWriteLogEntriesRequest < 3) { | 769 if (buildCounterWriteLogEntriesRequest < 3) { |
809 o.entries = buildUnnamed4164(); | 770 o.entries = buildUnnamed3999(); |
810 o.labels = buildUnnamed4165(); | 771 o.labels = buildUnnamed4000(); |
811 o.logName = "foo"; | 772 o.logName = "foo"; |
812 o.partialSuccess = true; | 773 o.partialSuccess = true; |
813 o.resource = buildMonitoredResource(); | 774 o.resource = buildMonitoredResource(); |
814 } | 775 } |
815 buildCounterWriteLogEntriesRequest--; | 776 buildCounterWriteLogEntriesRequest--; |
816 return o; | 777 return o; |
817 } | 778 } |
818 | 779 |
819 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { | 780 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { |
820 buildCounterWriteLogEntriesRequest++; | 781 buildCounterWriteLogEntriesRequest++; |
821 if (buildCounterWriteLogEntriesRequest < 3) { | 782 if (buildCounterWriteLogEntriesRequest < 3) { |
822 checkUnnamed4164(o.entries); | 783 checkUnnamed3999(o.entries); |
823 checkUnnamed4165(o.labels); | 784 checkUnnamed4000(o.labels); |
824 unittest.expect(o.logName, unittest.equals('foo')); | 785 unittest.expect(o.logName, unittest.equals('foo')); |
825 unittest.expect(o.partialSuccess, unittest.isTrue); | 786 unittest.expect(o.partialSuccess, unittest.isTrue); |
826 checkMonitoredResource(o.resource); | 787 checkMonitoredResource(o.resource); |
827 } | 788 } |
828 buildCounterWriteLogEntriesRequest--; | 789 buildCounterWriteLogEntriesRequest--; |
829 } | 790 } |
830 | 791 |
831 core.int buildCounterWriteLogEntriesResponse = 0; | 792 core.int buildCounterWriteLogEntriesResponse = 0; |
832 buildWriteLogEntriesResponse() { | 793 buildWriteLogEntriesResponse() { |
833 var o = new api.WriteLogEntriesResponse(); | 794 var o = new api.WriteLogEntriesResponse(); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 | 963 |
1003 unittest.group("obj-schema-SourceReference", () { | 964 unittest.group("obj-schema-SourceReference", () { |
1004 unittest.test("to-json--from-json", () { | 965 unittest.test("to-json--from-json", () { |
1005 var o = buildSourceReference(); | 966 var o = buildSourceReference(); |
1006 var od = new api.SourceReference.fromJson(o.toJson()); | 967 var od = new api.SourceReference.fromJson(o.toJson()); |
1007 checkSourceReference(od); | 968 checkSourceReference(od); |
1008 }); | 969 }); |
1009 }); | 970 }); |
1010 | 971 |
1011 | 972 |
1012 unittest.group("obj-schema-Status", () { | |
1013 unittest.test("to-json--from-json", () { | |
1014 var o = buildStatus(); | |
1015 var od = new api.Status.fromJson(o.toJson()); | |
1016 checkStatus(od); | |
1017 }); | |
1018 }); | |
1019 | |
1020 | |
1021 unittest.group("obj-schema-WriteLogEntriesRequest", () { | 973 unittest.group("obj-schema-WriteLogEntriesRequest", () { |
1022 unittest.test("to-json--from-json", () { | 974 unittest.test("to-json--from-json", () { |
1023 var o = buildWriteLogEntriesRequest(); | 975 var o = buildWriteLogEntriesRequest(); |
1024 var od = new api.WriteLogEntriesRequest.fromJson(o.toJson()); | 976 var od = new api.WriteLogEntriesRequest.fromJson(o.toJson()); |
1025 checkWriteLogEntriesRequest(od); | 977 checkWriteLogEntriesRequest(od); |
1026 }); | 978 }); |
1027 }); | 979 }); |
1028 | 980 |
1029 | 981 |
1030 unittest.group("obj-schema-WriteLogEntriesResponse", () { | 982 unittest.group("obj-schema-WriteLogEntriesResponse", () { |
1031 unittest.test("to-json--from-json", () { | 983 unittest.test("to-json--from-json", () { |
1032 var o = buildWriteLogEntriesResponse(); | 984 var o = buildWriteLogEntriesResponse(); |
1033 var od = new api.WriteLogEntriesResponse.fromJson(o.toJson()); | 985 var od = new api.WriteLogEntriesResponse.fromJson(o.toJson()); |
1034 checkWriteLogEntriesResponse(od); | 986 checkWriteLogEntriesResponse(od); |
1035 }); | 987 }); |
1036 }); | 988 }); |
1037 | 989 |
1038 | 990 |
| 991 unittest.group("resource-BillingAccountsLogsResourceApi", () { |
| 992 unittest.test("method--delete", () { |
| 993 |
| 994 var mock = new HttpServerMock(); |
| 995 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA
ccounts.logs; |
| 996 var arg_logName = "foo"; |
| 997 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 998 var path = (req.url).path; |
| 999 var pathOffset = 0; |
| 1000 var index; |
| 1001 var subPart; |
| 1002 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1003 pathOffset += 1; |
| 1004 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1005 pathOffset += 8; |
| 1006 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1007 |
| 1008 var query = (req.url).query; |
| 1009 var queryOffset = 0; |
| 1010 var queryMap = {}; |
| 1011 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1012 parseBool(n) { |
| 1013 if (n == "true") return true; |
| 1014 if (n == "false") return false; |
| 1015 if (n == null) return null; |
| 1016 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1017 } |
| 1018 if (query.length > 0) { |
| 1019 for (var part in query.split("&")) { |
| 1020 var keyvalue = part.split("="); |
| 1021 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1022 } |
| 1023 } |
| 1024 |
| 1025 |
| 1026 var h = { |
| 1027 "content-type" : "application/json; charset=utf-8", |
| 1028 }; |
| 1029 var resp = convert.JSON.encode(buildEmpty()); |
| 1030 return new async.Future.value(stringResponse(200, h, resp)); |
| 1031 }), true); |
| 1032 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { |
| 1033 checkEmpty(response); |
| 1034 }))); |
| 1035 }); |
| 1036 |
| 1037 }); |
| 1038 |
| 1039 |
1039 unittest.group("resource-EntriesResourceApi", () { | 1040 unittest.group("resource-EntriesResourceApi", () { |
1040 unittest.test("method--list", () { | 1041 unittest.test("method--list", () { |
1041 | 1042 |
1042 var mock = new HttpServerMock(); | 1043 var mock = new HttpServerMock(); |
1043 api.EntriesResourceApi res = new api.LoggingApi(mock).entries; | 1044 api.EntriesResourceApi res = new api.LoggingApi(mock).entries; |
1044 var arg_request = buildListLogEntriesRequest(); | 1045 var arg_request = buildListLogEntriesRequest(); |
1045 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1046 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1046 var obj = new api.ListLogEntriesRequest.fromJson(json); | 1047 var obj = new api.ListLogEntriesRequest.fromJson(json); |
1047 checkListLogEntriesRequest(obj); | 1048 checkListLogEntriesRequest(obj); |
1048 | 1049 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1178 return new async.Future.value(stringResponse(200, h, resp)); | 1179 return new async.Future.value(stringResponse(200, h, resp)); |
1179 }), true); | 1180 }), true); |
1180 res.list(pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.e
xpectAsync(((api.ListMonitoredResourceDescriptorsResponse response) { | 1181 res.list(pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.e
xpectAsync(((api.ListMonitoredResourceDescriptorsResponse response) { |
1181 checkListMonitoredResourceDescriptorsResponse(response); | 1182 checkListMonitoredResourceDescriptorsResponse(response); |
1182 }))); | 1183 }))); |
1183 }); | 1184 }); |
1184 | 1185 |
1185 }); | 1186 }); |
1186 | 1187 |
1187 | 1188 |
| 1189 unittest.group("resource-OrganizationsLogsResourceApi", () { |
| 1190 unittest.test("method--delete", () { |
| 1191 |
| 1192 var mock = new HttpServerMock(); |
| 1193 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati
ons.logs; |
| 1194 var arg_logName = "foo"; |
| 1195 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1196 var path = (req.url).path; |
| 1197 var pathOffset = 0; |
| 1198 var index; |
| 1199 var subPart; |
| 1200 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1201 pathOffset += 1; |
| 1202 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1203 pathOffset += 8; |
| 1204 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1205 |
| 1206 var query = (req.url).query; |
| 1207 var queryOffset = 0; |
| 1208 var queryMap = {}; |
| 1209 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1210 parseBool(n) { |
| 1211 if (n == "true") return true; |
| 1212 if (n == "false") return false; |
| 1213 if (n == null) return null; |
| 1214 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1215 } |
| 1216 if (query.length > 0) { |
| 1217 for (var part in query.split("&")) { |
| 1218 var keyvalue = part.split("="); |
| 1219 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1220 } |
| 1221 } |
| 1222 |
| 1223 |
| 1224 var h = { |
| 1225 "content-type" : "application/json; charset=utf-8", |
| 1226 }; |
| 1227 var resp = convert.JSON.encode(buildEmpty()); |
| 1228 return new async.Future.value(stringResponse(200, h, resp)); |
| 1229 }), true); |
| 1230 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { |
| 1231 checkEmpty(response); |
| 1232 }))); |
| 1233 }); |
| 1234 |
| 1235 }); |
| 1236 |
| 1237 |
1188 unittest.group("resource-ProjectsLogsResourceApi", () { | 1238 unittest.group("resource-ProjectsLogsResourceApi", () { |
1189 unittest.test("method--delete", () { | 1239 unittest.test("method--delete", () { |
1190 | 1240 |
1191 var mock = new HttpServerMock(); | 1241 var mock = new HttpServerMock(); |
1192 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; | 1242 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; |
1193 var arg_logName = "foo"; | 1243 var arg_logName = "foo"; |
1194 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1244 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1195 var path = (req.url).path; | 1245 var path = (req.url).path; |
1196 var pathOffset = 0; | 1246 var pathOffset = 0; |
1197 var index; | 1247 var index; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 | 1283 |
1234 }); | 1284 }); |
1235 | 1285 |
1236 | 1286 |
1237 unittest.group("resource-ProjectsMetricsResourceApi", () { | 1287 unittest.group("resource-ProjectsMetricsResourceApi", () { |
1238 unittest.test("method--create", () { | 1288 unittest.test("method--create", () { |
1239 | 1289 |
1240 var mock = new HttpServerMock(); | 1290 var mock = new HttpServerMock(); |
1241 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 1291 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
1242 var arg_request = buildLogMetric(); | 1292 var arg_request = buildLogMetric(); |
1243 var arg_projectName = "foo"; | 1293 var arg_parent = "foo"; |
1244 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1294 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1245 var obj = new api.LogMetric.fromJson(json); | 1295 var obj = new api.LogMetric.fromJson(json); |
1246 checkLogMetric(obj); | 1296 checkLogMetric(obj); |
1247 | 1297 |
1248 var path = (req.url).path; | 1298 var path = (req.url).path; |
1249 var pathOffset = 0; | 1299 var pathOffset = 0; |
1250 var index; | 1300 var index; |
1251 var subPart; | 1301 var subPart; |
1252 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1302 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1253 pathOffset += 1; | 1303 pathOffset += 1; |
(...skipping 18 matching lines...) Expand all Loading... |
1272 } | 1322 } |
1273 } | 1323 } |
1274 | 1324 |
1275 | 1325 |
1276 var h = { | 1326 var h = { |
1277 "content-type" : "application/json; charset=utf-8", | 1327 "content-type" : "application/json; charset=utf-8", |
1278 }; | 1328 }; |
1279 var resp = convert.JSON.encode(buildLogMetric()); | 1329 var resp = convert.JSON.encode(buildLogMetric()); |
1280 return new async.Future.value(stringResponse(200, h, resp)); | 1330 return new async.Future.value(stringResponse(200, h, resp)); |
1281 }), true); | 1331 }), true); |
1282 res.create(arg_request, arg_projectName).then(unittest.expectAsync(((api.L
ogMetric response) { | 1332 res.create(arg_request, arg_parent).then(unittest.expectAsync(((api.LogMet
ric response) { |
1283 checkLogMetric(response); | 1333 checkLogMetric(response); |
1284 }))); | 1334 }))); |
1285 }); | 1335 }); |
1286 | 1336 |
1287 unittest.test("method--delete", () { | 1337 unittest.test("method--delete", () { |
1288 | 1338 |
1289 var mock = new HttpServerMock(); | 1339 var mock = new HttpServerMock(); |
1290 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 1340 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
1291 var arg_metricName = "foo"; | 1341 var arg_metricName = "foo"; |
1292 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1342 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1371 }), true); | 1421 }), true); |
1372 res.get(arg_metricName).then(unittest.expectAsync(((api.LogMetric response
) { | 1422 res.get(arg_metricName).then(unittest.expectAsync(((api.LogMetric response
) { |
1373 checkLogMetric(response); | 1423 checkLogMetric(response); |
1374 }))); | 1424 }))); |
1375 }); | 1425 }); |
1376 | 1426 |
1377 unittest.test("method--list", () { | 1427 unittest.test("method--list", () { |
1378 | 1428 |
1379 var mock = new HttpServerMock(); | 1429 var mock = new HttpServerMock(); |
1380 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 1430 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
1381 var arg_projectName = "foo"; | 1431 var arg_parent = "foo"; |
| 1432 var arg_pageSize = 42; |
1382 var arg_pageToken = "foo"; | 1433 var arg_pageToken = "foo"; |
1383 var arg_pageSize = 42; | |
1384 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1434 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1385 var path = (req.url).path; | 1435 var path = (req.url).path; |
1386 var pathOffset = 0; | 1436 var pathOffset = 0; |
1387 var index; | 1437 var index; |
1388 var subPart; | 1438 var subPart; |
1389 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1439 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1390 pathOffset += 1; | 1440 pathOffset += 1; |
1391 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1441 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
1392 pathOffset += 8; | 1442 pathOffset += 8; |
1393 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1443 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1394 | 1444 |
1395 var query = (req.url).query; | 1445 var query = (req.url).query; |
1396 var queryOffset = 0; | 1446 var queryOffset = 0; |
1397 var queryMap = {}; | 1447 var queryMap = {}; |
1398 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1448 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1399 parseBool(n) { | 1449 parseBool(n) { |
1400 if (n == "true") return true; | 1450 if (n == "true") return true; |
1401 if (n == "false") return false; | 1451 if (n == "false") return false; |
1402 if (n == null) return null; | 1452 if (n == null) return null; |
1403 throw new core.ArgumentError("Invalid boolean: $n"); | 1453 throw new core.ArgumentError("Invalid boolean: $n"); |
1404 } | 1454 } |
1405 if (query.length > 0) { | 1455 if (query.length > 0) { |
1406 for (var part in query.split("&")) { | 1456 for (var part in query.split("&")) { |
1407 var keyvalue = part.split("="); | 1457 var keyvalue = part.split("="); |
1408 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1458 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1409 } | 1459 } |
1410 } | 1460 } |
| 1461 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1411 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1462 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1412 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1413 | 1463 |
1414 | 1464 |
1415 var h = { | 1465 var h = { |
1416 "content-type" : "application/json; charset=utf-8", | 1466 "content-type" : "application/json; charset=utf-8", |
1417 }; | 1467 }; |
1418 var resp = convert.JSON.encode(buildListLogMetricsResponse()); | 1468 var resp = convert.JSON.encode(buildListLogMetricsResponse()); |
1419 return new async.Future.value(stringResponse(200, h, resp)); | 1469 return new async.Future.value(stringResponse(200, h, resp)); |
1420 }), true); | 1470 }), true); |
1421 res.list(arg_projectName, pageToken: arg_pageToken, pageSize: arg_pageSize
).then(unittest.expectAsync(((api.ListLogMetricsResponse response) { | 1471 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListLogMetricsResponse response) { |
1422 checkListLogMetricsResponse(response); | 1472 checkListLogMetricsResponse(response); |
1423 }))); | 1473 }))); |
1424 }); | 1474 }); |
1425 | 1475 |
1426 unittest.test("method--update", () { | 1476 unittest.test("method--update", () { |
1427 | 1477 |
1428 var mock = new HttpServerMock(); | 1478 var mock = new HttpServerMock(); |
1429 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 1479 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
1430 var arg_request = buildLogMetric(); | 1480 var arg_request = buildLogMetric(); |
1431 var arg_metricName = "foo"; | 1481 var arg_metricName = "foo"; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 | 1524 |
1475 }); | 1525 }); |
1476 | 1526 |
1477 | 1527 |
1478 unittest.group("resource-ProjectsSinksResourceApi", () { | 1528 unittest.group("resource-ProjectsSinksResourceApi", () { |
1479 unittest.test("method--create", () { | 1529 unittest.test("method--create", () { |
1480 | 1530 |
1481 var mock = new HttpServerMock(); | 1531 var mock = new HttpServerMock(); |
1482 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1532 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
1483 var arg_request = buildLogSink(); | 1533 var arg_request = buildLogSink(); |
1484 var arg_projectName = "foo"; | 1534 var arg_parent = "foo"; |
| 1535 var arg_uniqueWriterIdentity = true; |
1485 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1536 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1486 var obj = new api.LogSink.fromJson(json); | 1537 var obj = new api.LogSink.fromJson(json); |
1487 checkLogSink(obj); | 1538 checkLogSink(obj); |
1488 | 1539 |
1489 var path = (req.url).path; | 1540 var path = (req.url).path; |
1490 var pathOffset = 0; | 1541 var pathOffset = 0; |
1491 var index; | 1542 var index; |
1492 var subPart; | 1543 var subPart; |
1493 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1544 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1494 pathOffset += 1; | 1545 pathOffset += 1; |
(...skipping 10 matching lines...) Expand all Loading... |
1505 if (n == "false") return false; | 1556 if (n == "false") return false; |
1506 if (n == null) return null; | 1557 if (n == null) return null; |
1507 throw new core.ArgumentError("Invalid boolean: $n"); | 1558 throw new core.ArgumentError("Invalid boolean: $n"); |
1508 } | 1559 } |
1509 if (query.length > 0) { | 1560 if (query.length > 0) { |
1510 for (var part in query.split("&")) { | 1561 for (var part in query.split("&")) { |
1511 var keyvalue = part.split("="); | 1562 var keyvalue = part.split("="); |
1512 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1563 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1513 } | 1564 } |
1514 } | 1565 } |
| 1566 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals(
"$arg_uniqueWriterIdentity")); |
1515 | 1567 |
1516 | 1568 |
1517 var h = { | 1569 var h = { |
1518 "content-type" : "application/json; charset=utf-8", | 1570 "content-type" : "application/json; charset=utf-8", |
1519 }; | 1571 }; |
1520 var resp = convert.JSON.encode(buildLogSink()); | 1572 var resp = convert.JSON.encode(buildLogSink()); |
1521 return new async.Future.value(stringResponse(200, h, resp)); | 1573 return new async.Future.value(stringResponse(200, h, resp)); |
1522 }), true); | 1574 }), true); |
1523 res.create(arg_request, arg_projectName).then(unittest.expectAsync(((api.L
ogSink response) { | 1575 res.create(arg_request, arg_parent, uniqueWriterIdentity: arg_uniqueWriter
Identity).then(unittest.expectAsync(((api.LogSink response) { |
1524 checkLogSink(response); | 1576 checkLogSink(response); |
1525 }))); | 1577 }))); |
1526 }); | 1578 }); |
1527 | 1579 |
1528 unittest.test("method--delete", () { | 1580 unittest.test("method--delete", () { |
1529 | 1581 |
1530 var mock = new HttpServerMock(); | 1582 var mock = new HttpServerMock(); |
1531 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1583 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
1532 var arg_sinkName = "foo"; | 1584 var arg_sinkName = "foo"; |
1533 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1585 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 }), true); | 1664 }), true); |
1613 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { | 1665 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { |
1614 checkLogSink(response); | 1666 checkLogSink(response); |
1615 }))); | 1667 }))); |
1616 }); | 1668 }); |
1617 | 1669 |
1618 unittest.test("method--list", () { | 1670 unittest.test("method--list", () { |
1619 | 1671 |
1620 var mock = new HttpServerMock(); | 1672 var mock = new HttpServerMock(); |
1621 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1673 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
1622 var arg_projectName = "foo"; | 1674 var arg_parent = "foo"; |
| 1675 var arg_pageSize = 42; |
1623 var arg_pageToken = "foo"; | 1676 var arg_pageToken = "foo"; |
1624 var arg_pageSize = 42; | |
1625 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1677 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1626 var path = (req.url).path; | 1678 var path = (req.url).path; |
1627 var pathOffset = 0; | 1679 var pathOffset = 0; |
1628 var index; | 1680 var index; |
1629 var subPart; | 1681 var subPart; |
1630 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1682 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1631 pathOffset += 1; | 1683 pathOffset += 1; |
1632 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1684 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
1633 pathOffset += 8; | 1685 pathOffset += 8; |
1634 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1686 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1635 | 1687 |
1636 var query = (req.url).query; | 1688 var query = (req.url).query; |
1637 var queryOffset = 0; | 1689 var queryOffset = 0; |
1638 var queryMap = {}; | 1690 var queryMap = {}; |
1639 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1691 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1640 parseBool(n) { | 1692 parseBool(n) { |
1641 if (n == "true") return true; | 1693 if (n == "true") return true; |
1642 if (n == "false") return false; | 1694 if (n == "false") return false; |
1643 if (n == null) return null; | 1695 if (n == null) return null; |
1644 throw new core.ArgumentError("Invalid boolean: $n"); | 1696 throw new core.ArgumentError("Invalid boolean: $n"); |
1645 } | 1697 } |
1646 if (query.length > 0) { | 1698 if (query.length > 0) { |
1647 for (var part in query.split("&")) { | 1699 for (var part in query.split("&")) { |
1648 var keyvalue = part.split("="); | 1700 var keyvalue = part.split("="); |
1649 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1701 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1650 } | 1702 } |
1651 } | 1703 } |
| 1704 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1652 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1705 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1653 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1654 | 1706 |
1655 | 1707 |
1656 var h = { | 1708 var h = { |
1657 "content-type" : "application/json; charset=utf-8", | 1709 "content-type" : "application/json; charset=utf-8", |
1658 }; | 1710 }; |
1659 var resp = convert.JSON.encode(buildListSinksResponse()); | 1711 var resp = convert.JSON.encode(buildListSinksResponse()); |
1660 return new async.Future.value(stringResponse(200, h, resp)); | 1712 return new async.Future.value(stringResponse(200, h, resp)); |
1661 }), true); | 1713 }), true); |
1662 res.list(arg_projectName, pageToken: arg_pageToken, pageSize: arg_pageSize
).then(unittest.expectAsync(((api.ListSinksResponse response) { | 1714 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListSinksResponse response) { |
1663 checkListSinksResponse(response); | 1715 checkListSinksResponse(response); |
1664 }))); | 1716 }))); |
1665 }); | 1717 }); |
1666 | 1718 |
1667 unittest.test("method--update", () { | 1719 unittest.test("method--update", () { |
1668 | 1720 |
1669 var mock = new HttpServerMock(); | 1721 var mock = new HttpServerMock(); |
1670 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1722 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
1671 var arg_request = buildLogSink(); | 1723 var arg_request = buildLogSink(); |
1672 var arg_sinkName = "foo"; | 1724 var arg_sinkName = "foo"; |
| 1725 var arg_uniqueWriterIdentity = true; |
1673 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1726 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1674 var obj = new api.LogSink.fromJson(json); | 1727 var obj = new api.LogSink.fromJson(json); |
1675 checkLogSink(obj); | 1728 checkLogSink(obj); |
1676 | 1729 |
1677 var path = (req.url).path; | 1730 var path = (req.url).path; |
1678 var pathOffset = 0; | 1731 var pathOffset = 0; |
1679 var index; | 1732 var index; |
1680 var subPart; | 1733 var subPart; |
1681 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1734 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1682 pathOffset += 1; | 1735 pathOffset += 1; |
(...skipping 10 matching lines...) Expand all Loading... |
1693 if (n == "false") return false; | 1746 if (n == "false") return false; |
1694 if (n == null) return null; | 1747 if (n == null) return null; |
1695 throw new core.ArgumentError("Invalid boolean: $n"); | 1748 throw new core.ArgumentError("Invalid boolean: $n"); |
1696 } | 1749 } |
1697 if (query.length > 0) { | 1750 if (query.length > 0) { |
1698 for (var part in query.split("&")) { | 1751 for (var part in query.split("&")) { |
1699 var keyvalue = part.split("="); | 1752 var keyvalue = part.split("="); |
1700 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1753 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1701 } | 1754 } |
1702 } | 1755 } |
| 1756 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals(
"$arg_uniqueWriterIdentity")); |
1703 | 1757 |
1704 | 1758 |
1705 var h = { | 1759 var h = { |
1706 "content-type" : "application/json; charset=utf-8", | 1760 "content-type" : "application/json; charset=utf-8", |
1707 }; | 1761 }; |
1708 var resp = convert.JSON.encode(buildLogSink()); | 1762 var resp = convert.JSON.encode(buildLogSink()); |
1709 return new async.Future.value(stringResponse(200, h, resp)); | 1763 return new async.Future.value(stringResponse(200, h, resp)); |
1710 }), true); | 1764 }), true); |
1711 res.update(arg_request, arg_sinkName).then(unittest.expectAsync(((api.LogS
ink response) { | 1765 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit
erIdentity).then(unittest.expectAsync(((api.LogSink response) { |
1712 checkLogSink(response); | 1766 checkLogSink(response); |
1713 }))); | 1767 }))); |
1714 }); | 1768 }); |
1715 | 1769 |
1716 }); | 1770 }); |
1717 | 1771 |
1718 | 1772 |
1719 } | 1773 } |
1720 | 1774 |
OLD | NEW |