| OLD | NEW |
| 1 library googleapis_beta.resourceviews.v1beta2.test; | 1 library googleapis_beta.resourceviews.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:test/test.dart' as unittest; |
| 11 | 11 |
| 12 import 'package:googleapis_beta/resourceviews/v1beta2.dart' as api; | 12 import 'package:googleapis_beta/resourceviews/v1beta2.dart' as api; |
| 13 | 13 |
| 14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 15 core.Function _callback; |
| 16 core.bool _expectJson; | 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 19 _callback = callback; |
| 20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 } else { | 39 } else { |
| 40 return stream.toBytes().then((data) { | 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); | 41 return _callback(request, data); |
| 42 }); | 42 }); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 52 } |
| 53 | 53 |
| 54 core.int buildCounterLabel = 0; | 54 core.int buildCounterLabel = 0; |
| 55 buildLabel() { | 55 buildLabel() { |
| 56 var o = new api.Label(); | 56 var o = new api.Label(); |
| 57 buildCounterLabel++; | 57 buildCounterLabel++; |
| 58 if (buildCounterLabel < 3) { | 58 if (buildCounterLabel < 3) { |
| 59 o.key = "foo"; | 59 o.key = "foo"; |
| 60 o.value = "foo"; | 60 o.value = "foo"; |
| 61 } | 61 } |
| 62 buildCounterLabel--; | 62 buildCounterLabel--; |
| 63 return o; | 63 return o; |
| 64 } | 64 } |
| 65 | 65 |
| 66 checkLabel(api.Label o) { | 66 checkLabel(api.Label o) { |
| 67 buildCounterLabel++; | 67 buildCounterLabel++; |
| 68 if (buildCounterLabel < 3) { | 68 if (buildCounterLabel < 3) { |
| 69 unittest.expect(o.key, unittest.equals('foo')); | 69 unittest.expect(o.key, unittest.equals('foo')); |
| 70 unittest.expect(o.value, unittest.equals('foo')); | 70 unittest.expect(o.value, unittest.equals('foo')); |
| 71 } | 71 } |
| 72 buildCounterLabel--; | 72 buildCounterLabel--; |
| 73 } | 73 } |
| 74 | 74 |
| 75 buildUnnamed3650() { | 75 buildUnnamed3124() { |
| 76 var o = new core.List<core.int>(); | 76 var o = new core.List<core.int>(); |
| 77 o.add(42); | 77 o.add(42); |
| 78 o.add(42); | 78 o.add(42); |
| 79 return o; | 79 return o; |
| 80 } | 80 } |
| 81 | 81 |
| 82 checkUnnamed3650(core.List<core.int> o) { | 82 checkUnnamed3124(core.List<core.int> o) { |
| 83 unittest.expect(o, unittest.hasLength(2)); | 83 unittest.expect(o, unittest.hasLength(2)); |
| 84 unittest.expect(o[0], unittest.equals(42)); | 84 unittest.expect(o[0], unittest.equals(42)); |
| 85 unittest.expect(o[1], unittest.equals(42)); | 85 unittest.expect(o[1], unittest.equals(42)); |
| 86 } | 86 } |
| 87 | 87 |
| 88 buildUnnamed3651() { | 88 buildUnnamed3125() { |
| 89 var o = new core.Map<core.String, core.List<core.int>>(); | 89 var o = new core.Map<core.String, core.List<core.int>>(); |
| 90 o["x"] = buildUnnamed3650(); | 90 o["x"] = buildUnnamed3124(); |
| 91 o["y"] = buildUnnamed3650(); | 91 o["y"] = buildUnnamed3124(); |
| 92 return o; | 92 return o; |
| 93 } | 93 } |
| 94 | 94 |
| 95 checkUnnamed3651(core.Map<core.String, core.List<core.int>> o) { | 95 checkUnnamed3125(core.Map<core.String, core.List<core.int>> o) { |
| 96 unittest.expect(o, unittest.hasLength(2)); | 96 unittest.expect(o, unittest.hasLength(2)); |
| 97 checkUnnamed3650(o["x"]); | 97 checkUnnamed3124(o["x"]); |
| 98 checkUnnamed3650(o["y"]); | 98 checkUnnamed3124(o["y"]); |
| 99 } | 99 } |
| 100 | 100 |
| 101 core.int buildCounterListResourceResponseItem = 0; | 101 core.int buildCounterListResourceResponseItem = 0; |
| 102 buildListResourceResponseItem() { | 102 buildListResourceResponseItem() { |
| 103 var o = new api.ListResourceResponseItem(); | 103 var o = new api.ListResourceResponseItem(); |
| 104 buildCounterListResourceResponseItem++; | 104 buildCounterListResourceResponseItem++; |
| 105 if (buildCounterListResourceResponseItem < 3) { | 105 if (buildCounterListResourceResponseItem < 3) { |
| 106 o.endpoints = buildUnnamed3651(); | 106 o.endpoints = buildUnnamed3125(); |
| 107 o.resource = "foo"; | 107 o.resource = "foo"; |
| 108 } | 108 } |
| 109 buildCounterListResourceResponseItem--; | 109 buildCounterListResourceResponseItem--; |
| 110 return o; | 110 return o; |
| 111 } | 111 } |
| 112 | 112 |
| 113 checkListResourceResponseItem(api.ListResourceResponseItem o) { | 113 checkListResourceResponseItem(api.ListResourceResponseItem o) { |
| 114 buildCounterListResourceResponseItem++; | 114 buildCounterListResourceResponseItem++; |
| 115 if (buildCounterListResourceResponseItem < 3) { | 115 if (buildCounterListResourceResponseItem < 3) { |
| 116 checkUnnamed3651(o.endpoints); | 116 checkUnnamed3125(o.endpoints); |
| 117 unittest.expect(o.resource, unittest.equals('foo')); | 117 unittest.expect(o.resource, unittest.equals('foo')); |
| 118 } | 118 } |
| 119 buildCounterListResourceResponseItem--; | 119 buildCounterListResourceResponseItem--; |
| 120 } | 120 } |
| 121 | 121 |
| 122 core.int buildCounterOperationErrorErrors = 0; | 122 core.int buildCounterOperationErrorErrors = 0; |
| 123 buildOperationErrorErrors() { | 123 buildOperationErrorErrors() { |
| 124 var o = new api.OperationErrorErrors(); | 124 var o = new api.OperationErrorErrors(); |
| 125 buildCounterOperationErrorErrors++; | 125 buildCounterOperationErrorErrors++; |
| 126 if (buildCounterOperationErrorErrors < 3) { | 126 if (buildCounterOperationErrorErrors < 3) { |
| 127 o.code = "foo"; | 127 o.code = "foo"; |
| 128 o.location = "foo"; | 128 o.location = "foo"; |
| 129 o.message = "foo"; | 129 o.message = "foo"; |
| 130 } | 130 } |
| 131 buildCounterOperationErrorErrors--; | 131 buildCounterOperationErrorErrors--; |
| 132 return o; | 132 return o; |
| 133 } | 133 } |
| 134 | 134 |
| 135 checkOperationErrorErrors(api.OperationErrorErrors o) { | 135 checkOperationErrorErrors(api.OperationErrorErrors o) { |
| 136 buildCounterOperationErrorErrors++; | 136 buildCounterOperationErrorErrors++; |
| 137 if (buildCounterOperationErrorErrors < 3) { | 137 if (buildCounterOperationErrorErrors < 3) { |
| 138 unittest.expect(o.code, unittest.equals('foo')); | 138 unittest.expect(o.code, unittest.equals('foo')); |
| 139 unittest.expect(o.location, unittest.equals('foo')); | 139 unittest.expect(o.location, unittest.equals('foo')); |
| 140 unittest.expect(o.message, unittest.equals('foo')); | 140 unittest.expect(o.message, unittest.equals('foo')); |
| 141 } | 141 } |
| 142 buildCounterOperationErrorErrors--; | 142 buildCounterOperationErrorErrors--; |
| 143 } | 143 } |
| 144 | 144 |
| 145 buildUnnamed3652() { | 145 buildUnnamed3126() { |
| 146 var o = new core.List<api.OperationErrorErrors>(); | 146 var o = new core.List<api.OperationErrorErrors>(); |
| 147 o.add(buildOperationErrorErrors()); | 147 o.add(buildOperationErrorErrors()); |
| 148 o.add(buildOperationErrorErrors()); | 148 o.add(buildOperationErrorErrors()); |
| 149 return o; | 149 return o; |
| 150 } | 150 } |
| 151 | 151 |
| 152 checkUnnamed3652(core.List<api.OperationErrorErrors> o) { | 152 checkUnnamed3126(core.List<api.OperationErrorErrors> o) { |
| 153 unittest.expect(o, unittest.hasLength(2)); | 153 unittest.expect(o, unittest.hasLength(2)); |
| 154 checkOperationErrorErrors(o[0]); | 154 checkOperationErrorErrors(o[0]); |
| 155 checkOperationErrorErrors(o[1]); | 155 checkOperationErrorErrors(o[1]); |
| 156 } | 156 } |
| 157 | 157 |
| 158 core.int buildCounterOperationError = 0; | 158 core.int buildCounterOperationError = 0; |
| 159 buildOperationError() { | 159 buildOperationError() { |
| 160 var o = new api.OperationError(); | 160 var o = new api.OperationError(); |
| 161 buildCounterOperationError++; | 161 buildCounterOperationError++; |
| 162 if (buildCounterOperationError < 3) { | 162 if (buildCounterOperationError < 3) { |
| 163 o.errors = buildUnnamed3652(); | 163 o.errors = buildUnnamed3126(); |
| 164 } | 164 } |
| 165 buildCounterOperationError--; | 165 buildCounterOperationError--; |
| 166 return o; | 166 return o; |
| 167 } | 167 } |
| 168 | 168 |
| 169 checkOperationError(api.OperationError o) { | 169 checkOperationError(api.OperationError o) { |
| 170 buildCounterOperationError++; | 170 buildCounterOperationError++; |
| 171 if (buildCounterOperationError < 3) { | 171 if (buildCounterOperationError < 3) { |
| 172 checkUnnamed3652(o.errors); | 172 checkUnnamed3126(o.errors); |
| 173 } | 173 } |
| 174 buildCounterOperationError--; | 174 buildCounterOperationError--; |
| 175 } | 175 } |
| 176 | 176 |
| 177 core.int buildCounterOperationWarningsData = 0; | 177 core.int buildCounterOperationWarningsData = 0; |
| 178 buildOperationWarningsData() { | 178 buildOperationWarningsData() { |
| 179 var o = new api.OperationWarningsData(); | 179 var o = new api.OperationWarningsData(); |
| 180 buildCounterOperationWarningsData++; | 180 buildCounterOperationWarningsData++; |
| 181 if (buildCounterOperationWarningsData < 3) { | 181 if (buildCounterOperationWarningsData < 3) { |
| 182 o.key = "foo"; | 182 o.key = "foo"; |
| 183 o.value = "foo"; | 183 o.value = "foo"; |
| 184 } | 184 } |
| 185 buildCounterOperationWarningsData--; | 185 buildCounterOperationWarningsData--; |
| 186 return o; | 186 return o; |
| 187 } | 187 } |
| 188 | 188 |
| 189 checkOperationWarningsData(api.OperationWarningsData o) { | 189 checkOperationWarningsData(api.OperationWarningsData o) { |
| 190 buildCounterOperationWarningsData++; | 190 buildCounterOperationWarningsData++; |
| 191 if (buildCounterOperationWarningsData < 3) { | 191 if (buildCounterOperationWarningsData < 3) { |
| 192 unittest.expect(o.key, unittest.equals('foo')); | 192 unittest.expect(o.key, unittest.equals('foo')); |
| 193 unittest.expect(o.value, unittest.equals('foo')); | 193 unittest.expect(o.value, unittest.equals('foo')); |
| 194 } | 194 } |
| 195 buildCounterOperationWarningsData--; | 195 buildCounterOperationWarningsData--; |
| 196 } | 196 } |
| 197 | 197 |
| 198 buildUnnamed3653() { | 198 buildUnnamed3127() { |
| 199 var o = new core.List<api.OperationWarningsData>(); | 199 var o = new core.List<api.OperationWarningsData>(); |
| 200 o.add(buildOperationWarningsData()); | 200 o.add(buildOperationWarningsData()); |
| 201 o.add(buildOperationWarningsData()); | 201 o.add(buildOperationWarningsData()); |
| 202 return o; | 202 return o; |
| 203 } | 203 } |
| 204 | 204 |
| 205 checkUnnamed3653(core.List<api.OperationWarningsData> o) { | 205 checkUnnamed3127(core.List<api.OperationWarningsData> o) { |
| 206 unittest.expect(o, unittest.hasLength(2)); | 206 unittest.expect(o, unittest.hasLength(2)); |
| 207 checkOperationWarningsData(o[0]); | 207 checkOperationWarningsData(o[0]); |
| 208 checkOperationWarningsData(o[1]); | 208 checkOperationWarningsData(o[1]); |
| 209 } | 209 } |
| 210 | 210 |
| 211 core.int buildCounterOperationWarnings = 0; | 211 core.int buildCounterOperationWarnings = 0; |
| 212 buildOperationWarnings() { | 212 buildOperationWarnings() { |
| 213 var o = new api.OperationWarnings(); | 213 var o = new api.OperationWarnings(); |
| 214 buildCounterOperationWarnings++; | 214 buildCounterOperationWarnings++; |
| 215 if (buildCounterOperationWarnings < 3) { | 215 if (buildCounterOperationWarnings < 3) { |
| 216 o.code = "foo"; | 216 o.code = "foo"; |
| 217 o.data = buildUnnamed3653(); | 217 o.data = buildUnnamed3127(); |
| 218 o.message = "foo"; | 218 o.message = "foo"; |
| 219 } | 219 } |
| 220 buildCounterOperationWarnings--; | 220 buildCounterOperationWarnings--; |
| 221 return o; | 221 return o; |
| 222 } | 222 } |
| 223 | 223 |
| 224 checkOperationWarnings(api.OperationWarnings o) { | 224 checkOperationWarnings(api.OperationWarnings o) { |
| 225 buildCounterOperationWarnings++; | 225 buildCounterOperationWarnings++; |
| 226 if (buildCounterOperationWarnings < 3) { | 226 if (buildCounterOperationWarnings < 3) { |
| 227 unittest.expect(o.code, unittest.equals('foo')); | 227 unittest.expect(o.code, unittest.equals('foo')); |
| 228 checkUnnamed3653(o.data); | 228 checkUnnamed3127(o.data); |
| 229 unittest.expect(o.message, unittest.equals('foo')); | 229 unittest.expect(o.message, unittest.equals('foo')); |
| 230 } | 230 } |
| 231 buildCounterOperationWarnings--; | 231 buildCounterOperationWarnings--; |
| 232 } | 232 } |
| 233 | 233 |
| 234 buildUnnamed3654() { | 234 buildUnnamed3128() { |
| 235 var o = new core.List<api.OperationWarnings>(); | 235 var o = new core.List<api.OperationWarnings>(); |
| 236 o.add(buildOperationWarnings()); | 236 o.add(buildOperationWarnings()); |
| 237 o.add(buildOperationWarnings()); | 237 o.add(buildOperationWarnings()); |
| 238 return o; | 238 return o; |
| 239 } | 239 } |
| 240 | 240 |
| 241 checkUnnamed3654(core.List<api.OperationWarnings> o) { | 241 checkUnnamed3128(core.List<api.OperationWarnings> o) { |
| 242 unittest.expect(o, unittest.hasLength(2)); | 242 unittest.expect(o, unittest.hasLength(2)); |
| 243 checkOperationWarnings(o[0]); | 243 checkOperationWarnings(o[0]); |
| 244 checkOperationWarnings(o[1]); | 244 checkOperationWarnings(o[1]); |
| 245 } | 245 } |
| 246 | 246 |
| 247 core.int buildCounterOperation = 0; | 247 core.int buildCounterOperation = 0; |
| 248 buildOperation() { | 248 buildOperation() { |
| 249 var o = new api.Operation(); | 249 var o = new api.Operation(); |
| 250 buildCounterOperation++; | 250 buildCounterOperation++; |
| 251 if (buildCounterOperation < 3) { | 251 if (buildCounterOperation < 3) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 262 o.operationType = "foo"; | 262 o.operationType = "foo"; |
| 263 o.progress = 42; | 263 o.progress = 42; |
| 264 o.region = "foo"; | 264 o.region = "foo"; |
| 265 o.selfLink = "foo"; | 265 o.selfLink = "foo"; |
| 266 o.startTime = "foo"; | 266 o.startTime = "foo"; |
| 267 o.status = "foo"; | 267 o.status = "foo"; |
| 268 o.statusMessage = "foo"; | 268 o.statusMessage = "foo"; |
| 269 o.targetId = "foo"; | 269 o.targetId = "foo"; |
| 270 o.targetLink = "foo"; | 270 o.targetLink = "foo"; |
| 271 o.user = "foo"; | 271 o.user = "foo"; |
| 272 o.warnings = buildUnnamed3654(); | 272 o.warnings = buildUnnamed3128(); |
| 273 o.zone = "foo"; | 273 o.zone = "foo"; |
| 274 } | 274 } |
| 275 buildCounterOperation--; | 275 buildCounterOperation--; |
| 276 return o; | 276 return o; |
| 277 } | 277 } |
| 278 | 278 |
| 279 checkOperation(api.Operation o) { | 279 checkOperation(api.Operation o) { |
| 280 buildCounterOperation++; | 280 buildCounterOperation++; |
| 281 if (buildCounterOperation < 3) { | 281 if (buildCounterOperation < 3) { |
| 282 unittest.expect(o.clientOperationId, unittest.equals('foo')); | 282 unittest.expect(o.clientOperationId, unittest.equals('foo')); |
| 283 unittest.expect(o.creationTimestamp, unittest.equals('foo')); | 283 unittest.expect(o.creationTimestamp, unittest.equals('foo')); |
| 284 unittest.expect(o.endTime, unittest.equals('foo')); | 284 unittest.expect(o.endTime, unittest.equals('foo')); |
| 285 checkOperationError(o.error); | 285 checkOperationError(o.error); |
| 286 unittest.expect(o.httpErrorMessage, unittest.equals('foo')); | 286 unittest.expect(o.httpErrorMessage, unittest.equals('foo')); |
| 287 unittest.expect(o.httpErrorStatusCode, unittest.equals(42)); | 287 unittest.expect(o.httpErrorStatusCode, unittest.equals(42)); |
| 288 unittest.expect(o.id, unittest.equals('foo')); | 288 unittest.expect(o.id, unittest.equals('foo')); |
| 289 unittest.expect(o.insertTime, unittest.equals('foo')); | 289 unittest.expect(o.insertTime, unittest.equals('foo')); |
| 290 unittest.expect(o.kind, unittest.equals('foo')); | 290 unittest.expect(o.kind, unittest.equals('foo')); |
| 291 unittest.expect(o.name, unittest.equals('foo')); | 291 unittest.expect(o.name, unittest.equals('foo')); |
| 292 unittest.expect(o.operationType, unittest.equals('foo')); | 292 unittest.expect(o.operationType, unittest.equals('foo')); |
| 293 unittest.expect(o.progress, unittest.equals(42)); | 293 unittest.expect(o.progress, unittest.equals(42)); |
| 294 unittest.expect(o.region, unittest.equals('foo')); | 294 unittest.expect(o.region, unittest.equals('foo')); |
| 295 unittest.expect(o.selfLink, unittest.equals('foo')); | 295 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 296 unittest.expect(o.startTime, unittest.equals('foo')); | 296 unittest.expect(o.startTime, unittest.equals('foo')); |
| 297 unittest.expect(o.status, unittest.equals('foo')); | 297 unittest.expect(o.status, unittest.equals('foo')); |
| 298 unittest.expect(o.statusMessage, unittest.equals('foo')); | 298 unittest.expect(o.statusMessage, unittest.equals('foo')); |
| 299 unittest.expect(o.targetId, unittest.equals('foo')); | 299 unittest.expect(o.targetId, unittest.equals('foo')); |
| 300 unittest.expect(o.targetLink, unittest.equals('foo')); | 300 unittest.expect(o.targetLink, unittest.equals('foo')); |
| 301 unittest.expect(o.user, unittest.equals('foo')); | 301 unittest.expect(o.user, unittest.equals('foo')); |
| 302 checkUnnamed3654(o.warnings); | 302 checkUnnamed3128(o.warnings); |
| 303 unittest.expect(o.zone, unittest.equals('foo')); | 303 unittest.expect(o.zone, unittest.equals('foo')); |
| 304 } | 304 } |
| 305 buildCounterOperation--; | 305 buildCounterOperation--; |
| 306 } | 306 } |
| 307 | 307 |
| 308 buildUnnamed3655() { | 308 buildUnnamed3129() { |
| 309 var o = new core.List<api.Operation>(); | 309 var o = new core.List<api.Operation>(); |
| 310 o.add(buildOperation()); | 310 o.add(buildOperation()); |
| 311 o.add(buildOperation()); | 311 o.add(buildOperation()); |
| 312 return o; | 312 return o; |
| 313 } | 313 } |
| 314 | 314 |
| 315 checkUnnamed3655(core.List<api.Operation> o) { | 315 checkUnnamed3129(core.List<api.Operation> o) { |
| 316 unittest.expect(o, unittest.hasLength(2)); | 316 unittest.expect(o, unittest.hasLength(2)); |
| 317 checkOperation(o[0]); | 317 checkOperation(o[0]); |
| 318 checkOperation(o[1]); | 318 checkOperation(o[1]); |
| 319 } | 319 } |
| 320 | 320 |
| 321 core.int buildCounterOperationList = 0; | 321 core.int buildCounterOperationList = 0; |
| 322 buildOperationList() { | 322 buildOperationList() { |
| 323 var o = new api.OperationList(); | 323 var o = new api.OperationList(); |
| 324 buildCounterOperationList++; | 324 buildCounterOperationList++; |
| 325 if (buildCounterOperationList < 3) { | 325 if (buildCounterOperationList < 3) { |
| 326 o.id = "foo"; | 326 o.id = "foo"; |
| 327 o.items = buildUnnamed3655(); | 327 o.items = buildUnnamed3129(); |
| 328 o.kind = "foo"; | 328 o.kind = "foo"; |
| 329 o.nextPageToken = "foo"; | 329 o.nextPageToken = "foo"; |
| 330 o.selfLink = "foo"; | 330 o.selfLink = "foo"; |
| 331 } | 331 } |
| 332 buildCounterOperationList--; | 332 buildCounterOperationList--; |
| 333 return o; | 333 return o; |
| 334 } | 334 } |
| 335 | 335 |
| 336 checkOperationList(api.OperationList o) { | 336 checkOperationList(api.OperationList o) { |
| 337 buildCounterOperationList++; | 337 buildCounterOperationList++; |
| 338 if (buildCounterOperationList < 3) { | 338 if (buildCounterOperationList < 3) { |
| 339 unittest.expect(o.id, unittest.equals('foo')); | 339 unittest.expect(o.id, unittest.equals('foo')); |
| 340 checkUnnamed3655(o.items); | 340 checkUnnamed3129(o.items); |
| 341 unittest.expect(o.kind, unittest.equals('foo')); | 341 unittest.expect(o.kind, unittest.equals('foo')); |
| 342 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 342 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 343 unittest.expect(o.selfLink, unittest.equals('foo')); | 343 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 344 } | 344 } |
| 345 buildCounterOperationList--; | 345 buildCounterOperationList--; |
| 346 } | 346 } |
| 347 | 347 |
| 348 buildUnnamed3656() { | 348 buildUnnamed3130() { |
| 349 var o = new core.List<api.ServiceEndpoint>(); | 349 var o = new core.List<api.ServiceEndpoint>(); |
| 350 o.add(buildServiceEndpoint()); | 350 o.add(buildServiceEndpoint()); |
| 351 o.add(buildServiceEndpoint()); | 351 o.add(buildServiceEndpoint()); |
| 352 return o; | 352 return o; |
| 353 } | 353 } |
| 354 | 354 |
| 355 checkUnnamed3656(core.List<api.ServiceEndpoint> o) { | 355 checkUnnamed3130(core.List<api.ServiceEndpoint> o) { |
| 356 unittest.expect(o, unittest.hasLength(2)); | 356 unittest.expect(o, unittest.hasLength(2)); |
| 357 checkServiceEndpoint(o[0]); | 357 checkServiceEndpoint(o[0]); |
| 358 checkServiceEndpoint(o[1]); | 358 checkServiceEndpoint(o[1]); |
| 359 } | 359 } |
| 360 | 360 |
| 361 buildUnnamed3657() { | 361 buildUnnamed3131() { |
| 362 var o = new core.List<api.Label>(); | 362 var o = new core.List<api.Label>(); |
| 363 o.add(buildLabel()); | 363 o.add(buildLabel()); |
| 364 o.add(buildLabel()); | 364 o.add(buildLabel()); |
| 365 return o; | 365 return o; |
| 366 } | 366 } |
| 367 | 367 |
| 368 checkUnnamed3657(core.List<api.Label> o) { | 368 checkUnnamed3131(core.List<api.Label> o) { |
| 369 unittest.expect(o, unittest.hasLength(2)); | 369 unittest.expect(o, unittest.hasLength(2)); |
| 370 checkLabel(o[0]); | 370 checkLabel(o[0]); |
| 371 checkLabel(o[1]); | 371 checkLabel(o[1]); |
| 372 } | 372 } |
| 373 | 373 |
| 374 buildUnnamed3658() { | 374 buildUnnamed3132() { |
| 375 var o = new core.List<core.String>(); | 375 var o = new core.List<core.String>(); |
| 376 o.add("foo"); | 376 o.add("foo"); |
| 377 o.add("foo"); | 377 o.add("foo"); |
| 378 return o; | 378 return o; |
| 379 } | 379 } |
| 380 | 380 |
| 381 checkUnnamed3658(core.List<core.String> o) { | 381 checkUnnamed3132(core.List<core.String> o) { |
| 382 unittest.expect(o, unittest.hasLength(2)); | 382 unittest.expect(o, unittest.hasLength(2)); |
| 383 unittest.expect(o[0], unittest.equals('foo')); | 383 unittest.expect(o[0], unittest.equals('foo')); |
| 384 unittest.expect(o[1], unittest.equals('foo')); | 384 unittest.expect(o[1], unittest.equals('foo')); |
| 385 } | 385 } |
| 386 | 386 |
| 387 core.int buildCounterResourceView = 0; | 387 core.int buildCounterResourceView = 0; |
| 388 buildResourceView() { | 388 buildResourceView() { |
| 389 var o = new api.ResourceView(); | 389 var o = new api.ResourceView(); |
| 390 buildCounterResourceView++; | 390 buildCounterResourceView++; |
| 391 if (buildCounterResourceView < 3) { | 391 if (buildCounterResourceView < 3) { |
| 392 o.creationTimestamp = "foo"; | 392 o.creationTimestamp = "foo"; |
| 393 o.description = "foo"; | 393 o.description = "foo"; |
| 394 o.endpoints = buildUnnamed3656(); | 394 o.endpoints = buildUnnamed3130(); |
| 395 o.fingerprint = "foo"; | 395 o.fingerprint = "foo"; |
| 396 o.id = "foo"; | 396 o.id = "foo"; |
| 397 o.kind = "foo"; | 397 o.kind = "foo"; |
| 398 o.labels = buildUnnamed3657(); | 398 o.labels = buildUnnamed3131(); |
| 399 o.name = "foo"; | 399 o.name = "foo"; |
| 400 o.network = "foo"; | 400 o.network = "foo"; |
| 401 o.resources = buildUnnamed3658(); | 401 o.resources = buildUnnamed3132(); |
| 402 o.selfLink = "foo"; | 402 o.selfLink = "foo"; |
| 403 o.size = 42; | 403 o.size = 42; |
| 404 } | 404 } |
| 405 buildCounterResourceView--; | 405 buildCounterResourceView--; |
| 406 return o; | 406 return o; |
| 407 } | 407 } |
| 408 | 408 |
| 409 checkResourceView(api.ResourceView o) { | 409 checkResourceView(api.ResourceView o) { |
| 410 buildCounterResourceView++; | 410 buildCounterResourceView++; |
| 411 if (buildCounterResourceView < 3) { | 411 if (buildCounterResourceView < 3) { |
| 412 unittest.expect(o.creationTimestamp, unittest.equals('foo')); | 412 unittest.expect(o.creationTimestamp, unittest.equals('foo')); |
| 413 unittest.expect(o.description, unittest.equals('foo')); | 413 unittest.expect(o.description, unittest.equals('foo')); |
| 414 checkUnnamed3656(o.endpoints); | 414 checkUnnamed3130(o.endpoints); |
| 415 unittest.expect(o.fingerprint, unittest.equals('foo')); | 415 unittest.expect(o.fingerprint, unittest.equals('foo')); |
| 416 unittest.expect(o.id, unittest.equals('foo')); | 416 unittest.expect(o.id, unittest.equals('foo')); |
| 417 unittest.expect(o.kind, unittest.equals('foo')); | 417 unittest.expect(o.kind, unittest.equals('foo')); |
| 418 checkUnnamed3657(o.labels); | 418 checkUnnamed3131(o.labels); |
| 419 unittest.expect(o.name, unittest.equals('foo')); | 419 unittest.expect(o.name, unittest.equals('foo')); |
| 420 unittest.expect(o.network, unittest.equals('foo')); | 420 unittest.expect(o.network, unittest.equals('foo')); |
| 421 checkUnnamed3658(o.resources); | 421 checkUnnamed3132(o.resources); |
| 422 unittest.expect(o.selfLink, unittest.equals('foo')); | 422 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 423 unittest.expect(o.size, unittest.equals(42)); | 423 unittest.expect(o.size, unittest.equals(42)); |
| 424 } | 424 } |
| 425 buildCounterResourceView--; | 425 buildCounterResourceView--; |
| 426 } | 426 } |
| 427 | 427 |
| 428 core.int buildCounterServiceEndpoint = 0; | 428 core.int buildCounterServiceEndpoint = 0; |
| 429 buildServiceEndpoint() { | 429 buildServiceEndpoint() { |
| 430 var o = new api.ServiceEndpoint(); | 430 var o = new api.ServiceEndpoint(); |
| 431 buildCounterServiceEndpoint++; | 431 buildCounterServiceEndpoint++; |
| 432 if (buildCounterServiceEndpoint < 3) { | 432 if (buildCounterServiceEndpoint < 3) { |
| 433 o.name = "foo"; | 433 o.name = "foo"; |
| 434 o.port = 42; | 434 o.port = 42; |
| 435 } | 435 } |
| 436 buildCounterServiceEndpoint--; | 436 buildCounterServiceEndpoint--; |
| 437 return o; | 437 return o; |
| 438 } | 438 } |
| 439 | 439 |
| 440 checkServiceEndpoint(api.ServiceEndpoint o) { | 440 checkServiceEndpoint(api.ServiceEndpoint o) { |
| 441 buildCounterServiceEndpoint++; | 441 buildCounterServiceEndpoint++; |
| 442 if (buildCounterServiceEndpoint < 3) { | 442 if (buildCounterServiceEndpoint < 3) { |
| 443 unittest.expect(o.name, unittest.equals('foo')); | 443 unittest.expect(o.name, unittest.equals('foo')); |
| 444 unittest.expect(o.port, unittest.equals(42)); | 444 unittest.expect(o.port, unittest.equals(42)); |
| 445 } | 445 } |
| 446 buildCounterServiceEndpoint--; | 446 buildCounterServiceEndpoint--; |
| 447 } | 447 } |
| 448 | 448 |
| 449 buildUnnamed3659() { | 449 buildUnnamed3133() { |
| 450 var o = new core.List<core.String>(); | 450 var o = new core.List<core.String>(); |
| 451 o.add("foo"); | 451 o.add("foo"); |
| 452 o.add("foo"); | 452 o.add("foo"); |
| 453 return o; | 453 return o; |
| 454 } | 454 } |
| 455 | 455 |
| 456 checkUnnamed3659(core.List<core.String> o) { | 456 checkUnnamed3133(core.List<core.String> o) { |
| 457 unittest.expect(o, unittest.hasLength(2)); | 457 unittest.expect(o, unittest.hasLength(2)); |
| 458 unittest.expect(o[0], unittest.equals('foo')); | 458 unittest.expect(o[0], unittest.equals('foo')); |
| 459 unittest.expect(o[1], unittest.equals('foo')); | 459 unittest.expect(o[1], unittest.equals('foo')); |
| 460 } | 460 } |
| 461 | 461 |
| 462 core.int buildCounterZoneViewsAddResourcesRequest = 0; | 462 core.int buildCounterZoneViewsAddResourcesRequest = 0; |
| 463 buildZoneViewsAddResourcesRequest() { | 463 buildZoneViewsAddResourcesRequest() { |
| 464 var o = new api.ZoneViewsAddResourcesRequest(); | 464 var o = new api.ZoneViewsAddResourcesRequest(); |
| 465 buildCounterZoneViewsAddResourcesRequest++; | 465 buildCounterZoneViewsAddResourcesRequest++; |
| 466 if (buildCounterZoneViewsAddResourcesRequest < 3) { | 466 if (buildCounterZoneViewsAddResourcesRequest < 3) { |
| 467 o.resources = buildUnnamed3659(); | 467 o.resources = buildUnnamed3133(); |
| 468 } | 468 } |
| 469 buildCounterZoneViewsAddResourcesRequest--; | 469 buildCounterZoneViewsAddResourcesRequest--; |
| 470 return o; | 470 return o; |
| 471 } | 471 } |
| 472 | 472 |
| 473 checkZoneViewsAddResourcesRequest(api.ZoneViewsAddResourcesRequest o) { | 473 checkZoneViewsAddResourcesRequest(api.ZoneViewsAddResourcesRequest o) { |
| 474 buildCounterZoneViewsAddResourcesRequest++; | 474 buildCounterZoneViewsAddResourcesRequest++; |
| 475 if (buildCounterZoneViewsAddResourcesRequest < 3) { | 475 if (buildCounterZoneViewsAddResourcesRequest < 3) { |
| 476 checkUnnamed3659(o.resources); | 476 checkUnnamed3133(o.resources); |
| 477 } | 477 } |
| 478 buildCounterZoneViewsAddResourcesRequest--; | 478 buildCounterZoneViewsAddResourcesRequest--; |
| 479 } | 479 } |
| 480 | 480 |
| 481 buildUnnamed3660() { | 481 buildUnnamed3134() { |
| 482 var o = new core.List<api.ServiceEndpoint>(); | 482 var o = new core.List<api.ServiceEndpoint>(); |
| 483 o.add(buildServiceEndpoint()); | 483 o.add(buildServiceEndpoint()); |
| 484 o.add(buildServiceEndpoint()); | 484 o.add(buildServiceEndpoint()); |
| 485 return o; | 485 return o; |
| 486 } | 486 } |
| 487 | 487 |
| 488 checkUnnamed3660(core.List<api.ServiceEndpoint> o) { | 488 checkUnnamed3134(core.List<api.ServiceEndpoint> o) { |
| 489 unittest.expect(o, unittest.hasLength(2)); | 489 unittest.expect(o, unittest.hasLength(2)); |
| 490 checkServiceEndpoint(o[0]); | 490 checkServiceEndpoint(o[0]); |
| 491 checkServiceEndpoint(o[1]); | 491 checkServiceEndpoint(o[1]); |
| 492 } | 492 } |
| 493 | 493 |
| 494 core.int buildCounterZoneViewsGetServiceResponse = 0; | 494 core.int buildCounterZoneViewsGetServiceResponse = 0; |
| 495 buildZoneViewsGetServiceResponse() { | 495 buildZoneViewsGetServiceResponse() { |
| 496 var o = new api.ZoneViewsGetServiceResponse(); | 496 var o = new api.ZoneViewsGetServiceResponse(); |
| 497 buildCounterZoneViewsGetServiceResponse++; | 497 buildCounterZoneViewsGetServiceResponse++; |
| 498 if (buildCounterZoneViewsGetServiceResponse < 3) { | 498 if (buildCounterZoneViewsGetServiceResponse < 3) { |
| 499 o.endpoints = buildUnnamed3660(); | 499 o.endpoints = buildUnnamed3134(); |
| 500 o.fingerprint = "foo"; | 500 o.fingerprint = "foo"; |
| 501 } | 501 } |
| 502 buildCounterZoneViewsGetServiceResponse--; | 502 buildCounterZoneViewsGetServiceResponse--; |
| 503 return o; | 503 return o; |
| 504 } | 504 } |
| 505 | 505 |
| 506 checkZoneViewsGetServiceResponse(api.ZoneViewsGetServiceResponse o) { | 506 checkZoneViewsGetServiceResponse(api.ZoneViewsGetServiceResponse o) { |
| 507 buildCounterZoneViewsGetServiceResponse++; | 507 buildCounterZoneViewsGetServiceResponse++; |
| 508 if (buildCounterZoneViewsGetServiceResponse < 3) { | 508 if (buildCounterZoneViewsGetServiceResponse < 3) { |
| 509 checkUnnamed3660(o.endpoints); | 509 checkUnnamed3134(o.endpoints); |
| 510 unittest.expect(o.fingerprint, unittest.equals('foo')); | 510 unittest.expect(o.fingerprint, unittest.equals('foo')); |
| 511 } | 511 } |
| 512 buildCounterZoneViewsGetServiceResponse--; | 512 buildCounterZoneViewsGetServiceResponse--; |
| 513 } | 513 } |
| 514 | 514 |
| 515 buildUnnamed3661() { | 515 buildUnnamed3135() { |
| 516 var o = new core.List<api.ResourceView>(); | 516 var o = new core.List<api.ResourceView>(); |
| 517 o.add(buildResourceView()); | 517 o.add(buildResourceView()); |
| 518 o.add(buildResourceView()); | 518 o.add(buildResourceView()); |
| 519 return o; | 519 return o; |
| 520 } | 520 } |
| 521 | 521 |
| 522 checkUnnamed3661(core.List<api.ResourceView> o) { | 522 checkUnnamed3135(core.List<api.ResourceView> o) { |
| 523 unittest.expect(o, unittest.hasLength(2)); | 523 unittest.expect(o, unittest.hasLength(2)); |
| 524 checkResourceView(o[0]); | 524 checkResourceView(o[0]); |
| 525 checkResourceView(o[1]); | 525 checkResourceView(o[1]); |
| 526 } | 526 } |
| 527 | 527 |
| 528 core.int buildCounterZoneViewsList = 0; | 528 core.int buildCounterZoneViewsList = 0; |
| 529 buildZoneViewsList() { | 529 buildZoneViewsList() { |
| 530 var o = new api.ZoneViewsList(); | 530 var o = new api.ZoneViewsList(); |
| 531 buildCounterZoneViewsList++; | 531 buildCounterZoneViewsList++; |
| 532 if (buildCounterZoneViewsList < 3) { | 532 if (buildCounterZoneViewsList < 3) { |
| 533 o.items = buildUnnamed3661(); | 533 o.items = buildUnnamed3135(); |
| 534 o.kind = "foo"; | 534 o.kind = "foo"; |
| 535 o.nextPageToken = "foo"; | 535 o.nextPageToken = "foo"; |
| 536 o.selfLink = "foo"; | 536 o.selfLink = "foo"; |
| 537 } | 537 } |
| 538 buildCounterZoneViewsList--; | 538 buildCounterZoneViewsList--; |
| 539 return o; | 539 return o; |
| 540 } | 540 } |
| 541 | 541 |
| 542 checkZoneViewsList(api.ZoneViewsList o) { | 542 checkZoneViewsList(api.ZoneViewsList o) { |
| 543 buildCounterZoneViewsList++; | 543 buildCounterZoneViewsList++; |
| 544 if (buildCounterZoneViewsList < 3) { | 544 if (buildCounterZoneViewsList < 3) { |
| 545 checkUnnamed3661(o.items); | 545 checkUnnamed3135(o.items); |
| 546 unittest.expect(o.kind, unittest.equals('foo')); | 546 unittest.expect(o.kind, unittest.equals('foo')); |
| 547 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 547 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 548 unittest.expect(o.selfLink, unittest.equals('foo')); | 548 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 549 } | 549 } |
| 550 buildCounterZoneViewsList--; | 550 buildCounterZoneViewsList--; |
| 551 } | 551 } |
| 552 | 552 |
| 553 buildUnnamed3662() { | 553 buildUnnamed3136() { |
| 554 var o = new core.List<api.ListResourceResponseItem>(); | 554 var o = new core.List<api.ListResourceResponseItem>(); |
| 555 o.add(buildListResourceResponseItem()); | 555 o.add(buildListResourceResponseItem()); |
| 556 o.add(buildListResourceResponseItem()); | 556 o.add(buildListResourceResponseItem()); |
| 557 return o; | 557 return o; |
| 558 } | 558 } |
| 559 | 559 |
| 560 checkUnnamed3662(core.List<api.ListResourceResponseItem> o) { | 560 checkUnnamed3136(core.List<api.ListResourceResponseItem> o) { |
| 561 unittest.expect(o, unittest.hasLength(2)); | 561 unittest.expect(o, unittest.hasLength(2)); |
| 562 checkListResourceResponseItem(o[0]); | 562 checkListResourceResponseItem(o[0]); |
| 563 checkListResourceResponseItem(o[1]); | 563 checkListResourceResponseItem(o[1]); |
| 564 } | 564 } |
| 565 | 565 |
| 566 core.int buildCounterZoneViewsListResourcesResponse = 0; | 566 core.int buildCounterZoneViewsListResourcesResponse = 0; |
| 567 buildZoneViewsListResourcesResponse() { | 567 buildZoneViewsListResourcesResponse() { |
| 568 var o = new api.ZoneViewsListResourcesResponse(); | 568 var o = new api.ZoneViewsListResourcesResponse(); |
| 569 buildCounterZoneViewsListResourcesResponse++; | 569 buildCounterZoneViewsListResourcesResponse++; |
| 570 if (buildCounterZoneViewsListResourcesResponse < 3) { | 570 if (buildCounterZoneViewsListResourcesResponse < 3) { |
| 571 o.items = buildUnnamed3662(); | 571 o.items = buildUnnamed3136(); |
| 572 o.network = "foo"; | 572 o.network = "foo"; |
| 573 o.nextPageToken = "foo"; | 573 o.nextPageToken = "foo"; |
| 574 } | 574 } |
| 575 buildCounterZoneViewsListResourcesResponse--; | 575 buildCounterZoneViewsListResourcesResponse--; |
| 576 return o; | 576 return o; |
| 577 } | 577 } |
| 578 | 578 |
| 579 checkZoneViewsListResourcesResponse(api.ZoneViewsListResourcesResponse o) { | 579 checkZoneViewsListResourcesResponse(api.ZoneViewsListResourcesResponse o) { |
| 580 buildCounterZoneViewsListResourcesResponse++; | 580 buildCounterZoneViewsListResourcesResponse++; |
| 581 if (buildCounterZoneViewsListResourcesResponse < 3) { | 581 if (buildCounterZoneViewsListResourcesResponse < 3) { |
| 582 checkUnnamed3662(o.items); | 582 checkUnnamed3136(o.items); |
| 583 unittest.expect(o.network, unittest.equals('foo')); | 583 unittest.expect(o.network, unittest.equals('foo')); |
| 584 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 584 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 585 } | 585 } |
| 586 buildCounterZoneViewsListResourcesResponse--; | 586 buildCounterZoneViewsListResourcesResponse--; |
| 587 } | 587 } |
| 588 | 588 |
| 589 buildUnnamed3663() { | 589 buildUnnamed3137() { |
| 590 var o = new core.List<core.String>(); | 590 var o = new core.List<core.String>(); |
| 591 o.add("foo"); | 591 o.add("foo"); |
| 592 o.add("foo"); | 592 o.add("foo"); |
| 593 return o; | 593 return o; |
| 594 } | 594 } |
| 595 | 595 |
| 596 checkUnnamed3663(core.List<core.String> o) { | 596 checkUnnamed3137(core.List<core.String> o) { |
| 597 unittest.expect(o, unittest.hasLength(2)); | 597 unittest.expect(o, unittest.hasLength(2)); |
| 598 unittest.expect(o[0], unittest.equals('foo')); | 598 unittest.expect(o[0], unittest.equals('foo')); |
| 599 unittest.expect(o[1], unittest.equals('foo')); | 599 unittest.expect(o[1], unittest.equals('foo')); |
| 600 } | 600 } |
| 601 | 601 |
| 602 core.int buildCounterZoneViewsRemoveResourcesRequest = 0; | 602 core.int buildCounterZoneViewsRemoveResourcesRequest = 0; |
| 603 buildZoneViewsRemoveResourcesRequest() { | 603 buildZoneViewsRemoveResourcesRequest() { |
| 604 var o = new api.ZoneViewsRemoveResourcesRequest(); | 604 var o = new api.ZoneViewsRemoveResourcesRequest(); |
| 605 buildCounterZoneViewsRemoveResourcesRequest++; | 605 buildCounterZoneViewsRemoveResourcesRequest++; |
| 606 if (buildCounterZoneViewsRemoveResourcesRequest < 3) { | 606 if (buildCounterZoneViewsRemoveResourcesRequest < 3) { |
| 607 o.resources = buildUnnamed3663(); | 607 o.resources = buildUnnamed3137(); |
| 608 } | 608 } |
| 609 buildCounterZoneViewsRemoveResourcesRequest--; | 609 buildCounterZoneViewsRemoveResourcesRequest--; |
| 610 return o; | 610 return o; |
| 611 } | 611 } |
| 612 | 612 |
| 613 checkZoneViewsRemoveResourcesRequest(api.ZoneViewsRemoveResourcesRequest o) { | 613 checkZoneViewsRemoveResourcesRequest(api.ZoneViewsRemoveResourcesRequest o) { |
| 614 buildCounterZoneViewsRemoveResourcesRequest++; | 614 buildCounterZoneViewsRemoveResourcesRequest++; |
| 615 if (buildCounterZoneViewsRemoveResourcesRequest < 3) { | 615 if (buildCounterZoneViewsRemoveResourcesRequest < 3) { |
| 616 checkUnnamed3663(o.resources); | 616 checkUnnamed3137(o.resources); |
| 617 } | 617 } |
| 618 buildCounterZoneViewsRemoveResourcesRequest--; | 618 buildCounterZoneViewsRemoveResourcesRequest--; |
| 619 } | 619 } |
| 620 | 620 |
| 621 buildUnnamed3664() { | 621 buildUnnamed3138() { |
| 622 var o = new core.List<api.ServiceEndpoint>(); | 622 var o = new core.List<api.ServiceEndpoint>(); |
| 623 o.add(buildServiceEndpoint()); | 623 o.add(buildServiceEndpoint()); |
| 624 o.add(buildServiceEndpoint()); | 624 o.add(buildServiceEndpoint()); |
| 625 return o; | 625 return o; |
| 626 } | 626 } |
| 627 | 627 |
| 628 checkUnnamed3664(core.List<api.ServiceEndpoint> o) { | 628 checkUnnamed3138(core.List<api.ServiceEndpoint> o) { |
| 629 unittest.expect(o, unittest.hasLength(2)); | 629 unittest.expect(o, unittest.hasLength(2)); |
| 630 checkServiceEndpoint(o[0]); | 630 checkServiceEndpoint(o[0]); |
| 631 checkServiceEndpoint(o[1]); | 631 checkServiceEndpoint(o[1]); |
| 632 } | 632 } |
| 633 | 633 |
| 634 core.int buildCounterZoneViewsSetServiceRequest = 0; | 634 core.int buildCounterZoneViewsSetServiceRequest = 0; |
| 635 buildZoneViewsSetServiceRequest() { | 635 buildZoneViewsSetServiceRequest() { |
| 636 var o = new api.ZoneViewsSetServiceRequest(); | 636 var o = new api.ZoneViewsSetServiceRequest(); |
| 637 buildCounterZoneViewsSetServiceRequest++; | 637 buildCounterZoneViewsSetServiceRequest++; |
| 638 if (buildCounterZoneViewsSetServiceRequest < 3) { | 638 if (buildCounterZoneViewsSetServiceRequest < 3) { |
| 639 o.endpoints = buildUnnamed3664(); | 639 o.endpoints = buildUnnamed3138(); |
| 640 o.fingerprint = "foo"; | 640 o.fingerprint = "foo"; |
| 641 o.resourceName = "foo"; | 641 o.resourceName = "foo"; |
| 642 } | 642 } |
| 643 buildCounterZoneViewsSetServiceRequest--; | 643 buildCounterZoneViewsSetServiceRequest--; |
| 644 return o; | 644 return o; |
| 645 } | 645 } |
| 646 | 646 |
| 647 checkZoneViewsSetServiceRequest(api.ZoneViewsSetServiceRequest o) { | 647 checkZoneViewsSetServiceRequest(api.ZoneViewsSetServiceRequest o) { |
| 648 buildCounterZoneViewsSetServiceRequest++; | 648 buildCounterZoneViewsSetServiceRequest++; |
| 649 if (buildCounterZoneViewsSetServiceRequest < 3) { | 649 if (buildCounterZoneViewsSetServiceRequest < 3) { |
| 650 checkUnnamed3664(o.endpoints); | 650 checkUnnamed3138(o.endpoints); |
| 651 unittest.expect(o.fingerprint, unittest.equals('foo')); | 651 unittest.expect(o.fingerprint, unittest.equals('foo')); |
| 652 unittest.expect(o.resourceName, unittest.equals('foo')); | 652 unittest.expect(o.resourceName, unittest.equals('foo')); |
| 653 } | 653 } |
| 654 buildCounterZoneViewsSetServiceRequest--; | 654 buildCounterZoneViewsSetServiceRequest--; |
| 655 } | 655 } |
| 656 | 656 |
| 657 | 657 |
| 658 main() { | 658 main() { |
| 659 unittest.group("obj-schema-Label", () { | 659 unittest.group("obj-schema-Label", () { |
| 660 unittest.test("to-json--from-json", () { | 660 unittest.test("to-json--from-json", () { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 | 801 |
| 802 | 802 |
| 803 unittest.group("resource-ZoneOperationsResourceApi", () { | 803 unittest.group("resource-ZoneOperationsResourceApi", () { |
| 804 unittest.test("method--get", () { | 804 unittest.test("method--get", () { |
| 805 | 805 |
| 806 var mock = new HttpServerMock(); | 806 var mock = new HttpServerMock(); |
| 807 api.ZoneOperationsResourceApi res = new api.ResourceviewsApi(mock).zoneOpe
rations; | 807 api.ZoneOperationsResourceApi res = new api.ResourceviewsApi(mock).zoneOpe
rations; |
| 808 var arg_project = "foo"; | 808 var arg_project = "foo"; |
| 809 var arg_zone = "foo"; | 809 var arg_zone = "foo"; |
| 810 var arg_operation = "foo"; | 810 var arg_operation = "foo"; |
| 811 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 811 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 812 var path = (req.url).path; | 812 var path = (req.url).path; |
| 813 var pathOffset = 0; | 813 var pathOffset = 0; |
| 814 var index; | 814 var index; |
| 815 var subPart; | 815 var subPart; |
| 816 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 816 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 817 pathOffset += 1; | 817 pathOffset += 1; |
| 818 | 818 |
| 819 var query = (req.url).query; | 819 var query = (req.url).query; |
| 820 var queryOffset = 0; | 820 var queryOffset = 0; |
| 821 var queryMap = {}; | 821 var queryMap = {}; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 833 } | 833 } |
| 834 } | 834 } |
| 835 | 835 |
| 836 | 836 |
| 837 var h = { | 837 var h = { |
| 838 "content-type" : "application/json; charset=utf-8", | 838 "content-type" : "application/json; charset=utf-8", |
| 839 }; | 839 }; |
| 840 var resp = convert.JSON.encode(buildOperation()); | 840 var resp = convert.JSON.encode(buildOperation()); |
| 841 return new async.Future.value(stringResponse(200, h, resp)); | 841 return new async.Future.value(stringResponse(200, h, resp)); |
| 842 }), true); | 842 }), true); |
| 843 res.get(arg_project, arg_zone, arg_operation).then(unittest.expectAsync(((
api.Operation response) { | 843 res.get(arg_project, arg_zone, arg_operation).then(unittest.expectAsync1((
(api.Operation response) { |
| 844 checkOperation(response); | 844 checkOperation(response); |
| 845 }))); | 845 }))); |
| 846 }); | 846 }); |
| 847 | 847 |
| 848 unittest.test("method--list", () { | 848 unittest.test("method--list", () { |
| 849 | 849 |
| 850 var mock = new HttpServerMock(); | 850 var mock = new HttpServerMock(); |
| 851 api.ZoneOperationsResourceApi res = new api.ResourceviewsApi(mock).zoneOpe
rations; | 851 api.ZoneOperationsResourceApi res = new api.ResourceviewsApi(mock).zoneOpe
rations; |
| 852 var arg_project = "foo"; | 852 var arg_project = "foo"; |
| 853 var arg_zone = "foo"; | 853 var arg_zone = "foo"; |
| 854 var arg_filter = "foo"; | 854 var arg_filter = "foo"; |
| 855 var arg_maxResults = 42; | 855 var arg_maxResults = 42; |
| 856 var arg_pageToken = "foo"; | 856 var arg_pageToken = "foo"; |
| 857 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 857 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 858 var path = (req.url).path; | 858 var path = (req.url).path; |
| 859 var pathOffset = 0; | 859 var pathOffset = 0; |
| 860 var index; | 860 var index; |
| 861 var subPart; | 861 var subPart; |
| 862 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 862 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 863 pathOffset += 1; | 863 pathOffset += 1; |
| 864 | 864 |
| 865 var query = (req.url).query; | 865 var query = (req.url).query; |
| 866 var queryOffset = 0; | 866 var queryOffset = 0; |
| 867 var queryMap = {}; | 867 var queryMap = {}; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 882 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 882 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 883 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 883 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 884 | 884 |
| 885 | 885 |
| 886 var h = { | 886 var h = { |
| 887 "content-type" : "application/json; charset=utf-8", | 887 "content-type" : "application/json; charset=utf-8", |
| 888 }; | 888 }; |
| 889 var resp = convert.JSON.encode(buildOperationList()); | 889 var resp = convert.JSON.encode(buildOperationList()); |
| 890 return new async.Future.value(stringResponse(200, h, resp)); | 890 return new async.Future.value(stringResponse(200, h, resp)); |
| 891 }), true); | 891 }), true); |
| 892 res.list(arg_project, arg_zone, filter: arg_filter, maxResults: arg_maxRes
ults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.OperationList re
sponse) { | 892 res.list(arg_project, arg_zone, filter: arg_filter, maxResults: arg_maxRes
ults, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.OperationList r
esponse) { |
| 893 checkOperationList(response); | 893 checkOperationList(response); |
| 894 }))); | 894 }))); |
| 895 }); | 895 }); |
| 896 | 896 |
| 897 }); | 897 }); |
| 898 | 898 |
| 899 | 899 |
| 900 unittest.group("resource-ZoneViewsResourceApi", () { | 900 unittest.group("resource-ZoneViewsResourceApi", () { |
| 901 unittest.test("method--addResources", () { | 901 unittest.test("method--addResources", () { |
| 902 | 902 |
| 903 var mock = new HttpServerMock(); | 903 var mock = new HttpServerMock(); |
| 904 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; | 904 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; |
| 905 var arg_request = buildZoneViewsAddResourcesRequest(); | 905 var arg_request = buildZoneViewsAddResourcesRequest(); |
| 906 var arg_project = "foo"; | 906 var arg_project = "foo"; |
| 907 var arg_zone = "foo"; | 907 var arg_zone = "foo"; |
| 908 var arg_resourceView = "foo"; | 908 var arg_resourceView = "foo"; |
| 909 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 909 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 910 var obj = new api.ZoneViewsAddResourcesRequest.fromJson(json); | 910 var obj = new api.ZoneViewsAddResourcesRequest.fromJson(json); |
| 911 checkZoneViewsAddResourcesRequest(obj); | 911 checkZoneViewsAddResourcesRequest(obj); |
| 912 | 912 |
| 913 var path = (req.url).path; | 913 var path = (req.url).path; |
| 914 var pathOffset = 0; | 914 var pathOffset = 0; |
| 915 var index; | 915 var index; |
| 916 var subPart; | 916 var subPart; |
| 917 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 917 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 918 pathOffset += 1; | 918 pathOffset += 1; |
| 919 | 919 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 934 } | 934 } |
| 935 } | 935 } |
| 936 | 936 |
| 937 | 937 |
| 938 var h = { | 938 var h = { |
| 939 "content-type" : "application/json; charset=utf-8", | 939 "content-type" : "application/json; charset=utf-8", |
| 940 }; | 940 }; |
| 941 var resp = convert.JSON.encode(buildOperation()); | 941 var resp = convert.JSON.encode(buildOperation()); |
| 942 return new async.Future.value(stringResponse(200, h, resp)); | 942 return new async.Future.value(stringResponse(200, h, resp)); |
| 943 }), true); | 943 }), true); |
| 944 res.addResources(arg_request, arg_project, arg_zone, arg_resourceView).the
n(unittest.expectAsync(((api.Operation response) { | 944 res.addResources(arg_request, arg_project, arg_zone, arg_resourceView).the
n(unittest.expectAsync1(((api.Operation response) { |
| 945 checkOperation(response); | 945 checkOperation(response); |
| 946 }))); | 946 }))); |
| 947 }); | 947 }); |
| 948 | 948 |
| 949 unittest.test("method--delete", () { | 949 unittest.test("method--delete", () { |
| 950 | 950 |
| 951 var mock = new HttpServerMock(); | 951 var mock = new HttpServerMock(); |
| 952 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; | 952 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; |
| 953 var arg_project = "foo"; | 953 var arg_project = "foo"; |
| 954 var arg_zone = "foo"; | 954 var arg_zone = "foo"; |
| 955 var arg_resourceView = "foo"; | 955 var arg_resourceView = "foo"; |
| 956 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 956 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 957 var path = (req.url).path; | 957 var path = (req.url).path; |
| 958 var pathOffset = 0; | 958 var pathOffset = 0; |
| 959 var index; | 959 var index; |
| 960 var subPart; | 960 var subPart; |
| 961 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 961 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 962 pathOffset += 1; | 962 pathOffset += 1; |
| 963 | 963 |
| 964 var query = (req.url).query; | 964 var query = (req.url).query; |
| 965 var queryOffset = 0; | 965 var queryOffset = 0; |
| 966 var queryMap = {}; | 966 var queryMap = {}; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 978 } | 978 } |
| 979 } | 979 } |
| 980 | 980 |
| 981 | 981 |
| 982 var h = { | 982 var h = { |
| 983 "content-type" : "application/json; charset=utf-8", | 983 "content-type" : "application/json; charset=utf-8", |
| 984 }; | 984 }; |
| 985 var resp = convert.JSON.encode(buildOperation()); | 985 var resp = convert.JSON.encode(buildOperation()); |
| 986 return new async.Future.value(stringResponse(200, h, resp)); | 986 return new async.Future.value(stringResponse(200, h, resp)); |
| 987 }), true); | 987 }), true); |
| 988 res.delete(arg_project, arg_zone, arg_resourceView).then(unittest.expectAs
ync(((api.Operation response) { | 988 res.delete(arg_project, arg_zone, arg_resourceView).then(unittest.expectAs
ync1(((api.Operation response) { |
| 989 checkOperation(response); | 989 checkOperation(response); |
| 990 }))); | 990 }))); |
| 991 }); | 991 }); |
| 992 | 992 |
| 993 unittest.test("method--get", () { | 993 unittest.test("method--get", () { |
| 994 | 994 |
| 995 var mock = new HttpServerMock(); | 995 var mock = new HttpServerMock(); |
| 996 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; | 996 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; |
| 997 var arg_project = "foo"; | 997 var arg_project = "foo"; |
| 998 var arg_zone = "foo"; | 998 var arg_zone = "foo"; |
| 999 var arg_resourceView = "foo"; | 999 var arg_resourceView = "foo"; |
| 1000 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1000 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1001 var path = (req.url).path; | 1001 var path = (req.url).path; |
| 1002 var pathOffset = 0; | 1002 var pathOffset = 0; |
| 1003 var index; | 1003 var index; |
| 1004 var subPart; | 1004 var subPart; |
| 1005 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1005 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1006 pathOffset += 1; | 1006 pathOffset += 1; |
| 1007 | 1007 |
| 1008 var query = (req.url).query; | 1008 var query = (req.url).query; |
| 1009 var queryOffset = 0; | 1009 var queryOffset = 0; |
| 1010 var queryMap = {}; | 1010 var queryMap = {}; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1022 } | 1022 } |
| 1023 } | 1023 } |
| 1024 | 1024 |
| 1025 | 1025 |
| 1026 var h = { | 1026 var h = { |
| 1027 "content-type" : "application/json; charset=utf-8", | 1027 "content-type" : "application/json; charset=utf-8", |
| 1028 }; | 1028 }; |
| 1029 var resp = convert.JSON.encode(buildResourceView()); | 1029 var resp = convert.JSON.encode(buildResourceView()); |
| 1030 return new async.Future.value(stringResponse(200, h, resp)); | 1030 return new async.Future.value(stringResponse(200, h, resp)); |
| 1031 }), true); | 1031 }), true); |
| 1032 res.get(arg_project, arg_zone, arg_resourceView).then(unittest.expectAsync
(((api.ResourceView response) { | 1032 res.get(arg_project, arg_zone, arg_resourceView).then(unittest.expectAsync
1(((api.ResourceView response) { |
| 1033 checkResourceView(response); | 1033 checkResourceView(response); |
| 1034 }))); | 1034 }))); |
| 1035 }); | 1035 }); |
| 1036 | 1036 |
| 1037 unittest.test("method--getService", () { | 1037 unittest.test("method--getService", () { |
| 1038 | 1038 |
| 1039 var mock = new HttpServerMock(); | 1039 var mock = new HttpServerMock(); |
| 1040 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; | 1040 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; |
| 1041 var arg_project = "foo"; | 1041 var arg_project = "foo"; |
| 1042 var arg_zone = "foo"; | 1042 var arg_zone = "foo"; |
| 1043 var arg_resourceView = "foo"; | 1043 var arg_resourceView = "foo"; |
| 1044 var arg_resourceName = "foo"; | 1044 var arg_resourceName = "foo"; |
| 1045 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1045 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1046 var path = (req.url).path; | 1046 var path = (req.url).path; |
| 1047 var pathOffset = 0; | 1047 var pathOffset = 0; |
| 1048 var index; | 1048 var index; |
| 1049 var subPart; | 1049 var subPart; |
| 1050 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1050 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1051 pathOffset += 1; | 1051 pathOffset += 1; |
| 1052 | 1052 |
| 1053 var query = (req.url).query; | 1053 var query = (req.url).query; |
| 1054 var queryOffset = 0; | 1054 var queryOffset = 0; |
| 1055 var queryMap = {}; | 1055 var queryMap = {}; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1068 } | 1068 } |
| 1069 unittest.expect(queryMap["resourceName"].first, unittest.equals(arg_reso
urceName)); | 1069 unittest.expect(queryMap["resourceName"].first, unittest.equals(arg_reso
urceName)); |
| 1070 | 1070 |
| 1071 | 1071 |
| 1072 var h = { | 1072 var h = { |
| 1073 "content-type" : "application/json; charset=utf-8", | 1073 "content-type" : "application/json; charset=utf-8", |
| 1074 }; | 1074 }; |
| 1075 var resp = convert.JSON.encode(buildZoneViewsGetServiceResponse()); | 1075 var resp = convert.JSON.encode(buildZoneViewsGetServiceResponse()); |
| 1076 return new async.Future.value(stringResponse(200, h, resp)); | 1076 return new async.Future.value(stringResponse(200, h, resp)); |
| 1077 }), true); | 1077 }), true); |
| 1078 res.getService(arg_project, arg_zone, arg_resourceView, resourceName: arg_
resourceName).then(unittest.expectAsync(((api.ZoneViewsGetServiceResponse respon
se) { | 1078 res.getService(arg_project, arg_zone, arg_resourceView, resourceName: arg_
resourceName).then(unittest.expectAsync1(((api.ZoneViewsGetServiceResponse respo
nse) { |
| 1079 checkZoneViewsGetServiceResponse(response); | 1079 checkZoneViewsGetServiceResponse(response); |
| 1080 }))); | 1080 }))); |
| 1081 }); | 1081 }); |
| 1082 | 1082 |
| 1083 unittest.test("method--insert", () { | 1083 unittest.test("method--insert", () { |
| 1084 | 1084 |
| 1085 var mock = new HttpServerMock(); | 1085 var mock = new HttpServerMock(); |
| 1086 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; | 1086 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; |
| 1087 var arg_request = buildResourceView(); | 1087 var arg_request = buildResourceView(); |
| 1088 var arg_project = "foo"; | 1088 var arg_project = "foo"; |
| 1089 var arg_zone = "foo"; | 1089 var arg_zone = "foo"; |
| 1090 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1090 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1091 var obj = new api.ResourceView.fromJson(json); | 1091 var obj = new api.ResourceView.fromJson(json); |
| 1092 checkResourceView(obj); | 1092 checkResourceView(obj); |
| 1093 | 1093 |
| 1094 var path = (req.url).path; | 1094 var path = (req.url).path; |
| 1095 var pathOffset = 0; | 1095 var pathOffset = 0; |
| 1096 var index; | 1096 var index; |
| 1097 var subPart; | 1097 var subPart; |
| 1098 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1098 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1099 pathOffset += 1; | 1099 pathOffset += 1; |
| 1100 | 1100 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1115 } | 1115 } |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 | 1118 |
| 1119 var h = { | 1119 var h = { |
| 1120 "content-type" : "application/json; charset=utf-8", | 1120 "content-type" : "application/json; charset=utf-8", |
| 1121 }; | 1121 }; |
| 1122 var resp = convert.JSON.encode(buildOperation()); | 1122 var resp = convert.JSON.encode(buildOperation()); |
| 1123 return new async.Future.value(stringResponse(200, h, resp)); | 1123 return new async.Future.value(stringResponse(200, h, resp)); |
| 1124 }), true); | 1124 }), true); |
| 1125 res.insert(arg_request, arg_project, arg_zone).then(unittest.expectAsync((
(api.Operation response) { | 1125 res.insert(arg_request, arg_project, arg_zone).then(unittest.expectAsync1(
((api.Operation response) { |
| 1126 checkOperation(response); | 1126 checkOperation(response); |
| 1127 }))); | 1127 }))); |
| 1128 }); | 1128 }); |
| 1129 | 1129 |
| 1130 unittest.test("method--list", () { | 1130 unittest.test("method--list", () { |
| 1131 | 1131 |
| 1132 var mock = new HttpServerMock(); | 1132 var mock = new HttpServerMock(); |
| 1133 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; | 1133 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; |
| 1134 var arg_project = "foo"; | 1134 var arg_project = "foo"; |
| 1135 var arg_zone = "foo"; | 1135 var arg_zone = "foo"; |
| 1136 var arg_maxResults = 42; | 1136 var arg_maxResults = 42; |
| 1137 var arg_pageToken = "foo"; | 1137 var arg_pageToken = "foo"; |
| 1138 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1138 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1139 var path = (req.url).path; | 1139 var path = (req.url).path; |
| 1140 var pathOffset = 0; | 1140 var pathOffset = 0; |
| 1141 var index; | 1141 var index; |
| 1142 var subPart; | 1142 var subPart; |
| 1143 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1143 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1144 pathOffset += 1; | 1144 pathOffset += 1; |
| 1145 | 1145 |
| 1146 var query = (req.url).query; | 1146 var query = (req.url).query; |
| 1147 var queryOffset = 0; | 1147 var queryOffset = 0; |
| 1148 var queryMap = {}; | 1148 var queryMap = {}; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1162 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1162 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1163 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1163 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1164 | 1164 |
| 1165 | 1165 |
| 1166 var h = { | 1166 var h = { |
| 1167 "content-type" : "application/json; charset=utf-8", | 1167 "content-type" : "application/json; charset=utf-8", |
| 1168 }; | 1168 }; |
| 1169 var resp = convert.JSON.encode(buildZoneViewsList()); | 1169 var resp = convert.JSON.encode(buildZoneViewsList()); |
| 1170 return new async.Future.value(stringResponse(200, h, resp)); | 1170 return new async.Future.value(stringResponse(200, h, resp)); |
| 1171 }), true); | 1171 }), true); |
| 1172 res.list(arg_project, arg_zone, maxResults: arg_maxResults, pageToken: arg
_pageToken).then(unittest.expectAsync(((api.ZoneViewsList response) { | 1172 res.list(arg_project, arg_zone, maxResults: arg_maxResults, pageToken: arg
_pageToken).then(unittest.expectAsync1(((api.ZoneViewsList response) { |
| 1173 checkZoneViewsList(response); | 1173 checkZoneViewsList(response); |
| 1174 }))); | 1174 }))); |
| 1175 }); | 1175 }); |
| 1176 | 1176 |
| 1177 unittest.test("method--listResources", () { | 1177 unittest.test("method--listResources", () { |
| 1178 | 1178 |
| 1179 var mock = new HttpServerMock(); | 1179 var mock = new HttpServerMock(); |
| 1180 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; | 1180 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; |
| 1181 var arg_project = "foo"; | 1181 var arg_project = "foo"; |
| 1182 var arg_zone = "foo"; | 1182 var arg_zone = "foo"; |
| 1183 var arg_resourceView = "foo"; | 1183 var arg_resourceView = "foo"; |
| 1184 var arg_format = "foo"; | 1184 var arg_format = "foo"; |
| 1185 var arg_listState = "foo"; | 1185 var arg_listState = "foo"; |
| 1186 var arg_maxResults = 42; | 1186 var arg_maxResults = 42; |
| 1187 var arg_pageToken = "foo"; | 1187 var arg_pageToken = "foo"; |
| 1188 var arg_serviceName = "foo"; | 1188 var arg_serviceName = "foo"; |
| 1189 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1189 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1190 var path = (req.url).path; | 1190 var path = (req.url).path; |
| 1191 var pathOffset = 0; | 1191 var pathOffset = 0; |
| 1192 var index; | 1192 var index; |
| 1193 var subPart; | 1193 var subPart; |
| 1194 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1194 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1195 pathOffset += 1; | 1195 pathOffset += 1; |
| 1196 | 1196 |
| 1197 var query = (req.url).query; | 1197 var query = (req.url).query; |
| 1198 var queryOffset = 0; | 1198 var queryOffset = 0; |
| 1199 var queryMap = {}; | 1199 var queryMap = {}; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1216 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1216 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1217 unittest.expect(queryMap["serviceName"].first, unittest.equals(arg_servi
ceName)); | 1217 unittest.expect(queryMap["serviceName"].first, unittest.equals(arg_servi
ceName)); |
| 1218 | 1218 |
| 1219 | 1219 |
| 1220 var h = { | 1220 var h = { |
| 1221 "content-type" : "application/json; charset=utf-8", | 1221 "content-type" : "application/json; charset=utf-8", |
| 1222 }; | 1222 }; |
| 1223 var resp = convert.JSON.encode(buildZoneViewsListResourcesResponse()); | 1223 var resp = convert.JSON.encode(buildZoneViewsListResourcesResponse()); |
| 1224 return new async.Future.value(stringResponse(200, h, resp)); | 1224 return new async.Future.value(stringResponse(200, h, resp)); |
| 1225 }), true); | 1225 }), true); |
| 1226 res.listResources(arg_project, arg_zone, arg_resourceView, format: arg_for
mat, listState: arg_listState, maxResults: arg_maxResults, pageToken: arg_pageTo
ken, serviceName: arg_serviceName).then(unittest.expectAsync(((api.ZoneViewsList
ResourcesResponse response) { | 1226 res.listResources(arg_project, arg_zone, arg_resourceView, format: arg_for
mat, listState: arg_listState, maxResults: arg_maxResults, pageToken: arg_pageTo
ken, serviceName: arg_serviceName).then(unittest.expectAsync1(((api.ZoneViewsLis
tResourcesResponse response) { |
| 1227 checkZoneViewsListResourcesResponse(response); | 1227 checkZoneViewsListResourcesResponse(response); |
| 1228 }))); | 1228 }))); |
| 1229 }); | 1229 }); |
| 1230 | 1230 |
| 1231 unittest.test("method--removeResources", () { | 1231 unittest.test("method--removeResources", () { |
| 1232 | 1232 |
| 1233 var mock = new HttpServerMock(); | 1233 var mock = new HttpServerMock(); |
| 1234 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; | 1234 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; |
| 1235 var arg_request = buildZoneViewsRemoveResourcesRequest(); | 1235 var arg_request = buildZoneViewsRemoveResourcesRequest(); |
| 1236 var arg_project = "foo"; | 1236 var arg_project = "foo"; |
| 1237 var arg_zone = "foo"; | 1237 var arg_zone = "foo"; |
| 1238 var arg_resourceView = "foo"; | 1238 var arg_resourceView = "foo"; |
| 1239 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1239 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1240 var obj = new api.ZoneViewsRemoveResourcesRequest.fromJson(json); | 1240 var obj = new api.ZoneViewsRemoveResourcesRequest.fromJson(json); |
| 1241 checkZoneViewsRemoveResourcesRequest(obj); | 1241 checkZoneViewsRemoveResourcesRequest(obj); |
| 1242 | 1242 |
| 1243 var path = (req.url).path; | 1243 var path = (req.url).path; |
| 1244 var pathOffset = 0; | 1244 var pathOffset = 0; |
| 1245 var index; | 1245 var index; |
| 1246 var subPart; | 1246 var subPart; |
| 1247 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1247 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1248 pathOffset += 1; | 1248 pathOffset += 1; |
| 1249 | 1249 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1264 } | 1264 } |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 | 1267 |
| 1268 var h = { | 1268 var h = { |
| 1269 "content-type" : "application/json; charset=utf-8", | 1269 "content-type" : "application/json; charset=utf-8", |
| 1270 }; | 1270 }; |
| 1271 var resp = convert.JSON.encode(buildOperation()); | 1271 var resp = convert.JSON.encode(buildOperation()); |
| 1272 return new async.Future.value(stringResponse(200, h, resp)); | 1272 return new async.Future.value(stringResponse(200, h, resp)); |
| 1273 }), true); | 1273 }), true); |
| 1274 res.removeResources(arg_request, arg_project, arg_zone, arg_resourceView).
then(unittest.expectAsync(((api.Operation response) { | 1274 res.removeResources(arg_request, arg_project, arg_zone, arg_resourceView).
then(unittest.expectAsync1(((api.Operation response) { |
| 1275 checkOperation(response); | 1275 checkOperation(response); |
| 1276 }))); | 1276 }))); |
| 1277 }); | 1277 }); |
| 1278 | 1278 |
| 1279 unittest.test("method--setService", () { | 1279 unittest.test("method--setService", () { |
| 1280 | 1280 |
| 1281 var mock = new HttpServerMock(); | 1281 var mock = new HttpServerMock(); |
| 1282 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; | 1282 api.ZoneViewsResourceApi res = new api.ResourceviewsApi(mock).zoneViews; |
| 1283 var arg_request = buildZoneViewsSetServiceRequest(); | 1283 var arg_request = buildZoneViewsSetServiceRequest(); |
| 1284 var arg_project = "foo"; | 1284 var arg_project = "foo"; |
| 1285 var arg_zone = "foo"; | 1285 var arg_zone = "foo"; |
| 1286 var arg_resourceView = "foo"; | 1286 var arg_resourceView = "foo"; |
| 1287 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1287 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1288 var obj = new api.ZoneViewsSetServiceRequest.fromJson(json); | 1288 var obj = new api.ZoneViewsSetServiceRequest.fromJson(json); |
| 1289 checkZoneViewsSetServiceRequest(obj); | 1289 checkZoneViewsSetServiceRequest(obj); |
| 1290 | 1290 |
| 1291 var path = (req.url).path; | 1291 var path = (req.url).path; |
| 1292 var pathOffset = 0; | 1292 var pathOffset = 0; |
| 1293 var index; | 1293 var index; |
| 1294 var subPart; | 1294 var subPart; |
| 1295 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1295 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1296 pathOffset += 1; | 1296 pathOffset += 1; |
| 1297 | 1297 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1312 } | 1312 } |
| 1313 } | 1313 } |
| 1314 | 1314 |
| 1315 | 1315 |
| 1316 var h = { | 1316 var h = { |
| 1317 "content-type" : "application/json; charset=utf-8", | 1317 "content-type" : "application/json; charset=utf-8", |
| 1318 }; | 1318 }; |
| 1319 var resp = convert.JSON.encode(buildOperation()); | 1319 var resp = convert.JSON.encode(buildOperation()); |
| 1320 return new async.Future.value(stringResponse(200, h, resp)); | 1320 return new async.Future.value(stringResponse(200, h, resp)); |
| 1321 }), true); | 1321 }), true); |
| 1322 res.setService(arg_request, arg_project, arg_zone, arg_resourceView).then(
unittest.expectAsync(((api.Operation response) { | 1322 res.setService(arg_request, arg_project, arg_zone, arg_resourceView).then(
unittest.expectAsync1(((api.Operation response) { |
| 1323 checkOperation(response); | 1323 checkOperation(response); |
| 1324 }))); | 1324 }))); |
| 1325 }); | 1325 }); |
| 1326 | 1326 |
| 1327 }); | 1327 }); |
| 1328 | 1328 |
| 1329 | 1329 |
| 1330 } | 1330 } |
| 1331 | 1331 |
| OLD | NEW |