| OLD | NEW |
| 1 library googleapis_beta.pubsub.v1beta1.test; | 1 library googleapis_beta.pubsub.v1beta1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 52 } |
| 53 | 53 |
| 54 buildUnnamed2510() { | 54 buildUnnamed2669() { |
| 55 var o = new core.List<core.String>(); | 55 var o = new core.List<core.String>(); |
| 56 o.add("foo"); | 56 o.add("foo"); |
| 57 o.add("foo"); | 57 o.add("foo"); |
| 58 return o; | 58 return o; |
| 59 } | 59 } |
| 60 | 60 |
| 61 checkUnnamed2510(core.List<core.String> o) { | 61 checkUnnamed2669(core.List<core.String> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
| 63 unittest.expect(o[0], unittest.equals('foo')); | 63 unittest.expect(o[0], unittest.equals('foo')); |
| 64 unittest.expect(o[1], unittest.equals('foo')); | 64 unittest.expect(o[1], unittest.equals('foo')); |
| 65 } | 65 } |
| 66 | 66 |
| 67 core.int buildCounterAcknowledgeRequest = 0; | 67 core.int buildCounterAcknowledgeRequest = 0; |
| 68 buildAcknowledgeRequest() { | 68 buildAcknowledgeRequest() { |
| 69 var o = new api.AcknowledgeRequest(); | 69 var o = new api.AcknowledgeRequest(); |
| 70 buildCounterAcknowledgeRequest++; | 70 buildCounterAcknowledgeRequest++; |
| 71 if (buildCounterAcknowledgeRequest < 3) { | 71 if (buildCounterAcknowledgeRequest < 3) { |
| 72 o.ackId = buildUnnamed2510(); | 72 o.ackId = buildUnnamed2669(); |
| 73 o.subscription = "foo"; | 73 o.subscription = "foo"; |
| 74 } | 74 } |
| 75 buildCounterAcknowledgeRequest--; | 75 buildCounterAcknowledgeRequest--; |
| 76 return o; | 76 return o; |
| 77 } | 77 } |
| 78 | 78 |
| 79 checkAcknowledgeRequest(api.AcknowledgeRequest o) { | 79 checkAcknowledgeRequest(api.AcknowledgeRequest o) { |
| 80 buildCounterAcknowledgeRequest++; | 80 buildCounterAcknowledgeRequest++; |
| 81 if (buildCounterAcknowledgeRequest < 3) { | 81 if (buildCounterAcknowledgeRequest < 3) { |
| 82 checkUnnamed2510(o.ackId); | 82 checkUnnamed2669(o.ackId); |
| 83 unittest.expect(o.subscription, unittest.equals('foo')); | 83 unittest.expect(o.subscription, unittest.equals('foo')); |
| 84 } | 84 } |
| 85 buildCounterAcknowledgeRequest--; | 85 buildCounterAcknowledgeRequest--; |
| 86 } | 86 } |
| 87 | 87 |
| 88 core.int buildCounterLabel = 0; | 88 core.int buildCounterLabel = 0; |
| 89 buildLabel() { | 89 buildLabel() { |
| 90 var o = new api.Label(); | 90 var o = new api.Label(); |
| 91 buildCounterLabel++; | 91 buildCounterLabel++; |
| 92 if (buildCounterLabel < 3) { | 92 if (buildCounterLabel < 3) { |
| 93 o.key = "foo"; | 93 o.key = "foo"; |
| 94 o.numValue = "foo"; | 94 o.numValue = "foo"; |
| 95 o.strValue = "foo"; | 95 o.strValue = "foo"; |
| 96 } | 96 } |
| 97 buildCounterLabel--; | 97 buildCounterLabel--; |
| 98 return o; | 98 return o; |
| 99 } | 99 } |
| 100 | 100 |
| 101 checkLabel(api.Label o) { | 101 checkLabel(api.Label o) { |
| 102 buildCounterLabel++; | 102 buildCounterLabel++; |
| 103 if (buildCounterLabel < 3) { | 103 if (buildCounterLabel < 3) { |
| 104 unittest.expect(o.key, unittest.equals('foo')); | 104 unittest.expect(o.key, unittest.equals('foo')); |
| 105 unittest.expect(o.numValue, unittest.equals('foo')); | 105 unittest.expect(o.numValue, unittest.equals('foo')); |
| 106 unittest.expect(o.strValue, unittest.equals('foo')); | 106 unittest.expect(o.strValue, unittest.equals('foo')); |
| 107 } | 107 } |
| 108 buildCounterLabel--; | 108 buildCounterLabel--; |
| 109 } | 109 } |
| 110 | 110 |
| 111 buildUnnamed2511() { | 111 buildUnnamed2670() { |
| 112 var o = new core.List<api.Subscription>(); | 112 var o = new core.List<api.Subscription>(); |
| 113 o.add(buildSubscription()); | 113 o.add(buildSubscription()); |
| 114 o.add(buildSubscription()); | 114 o.add(buildSubscription()); |
| 115 return o; | 115 return o; |
| 116 } | 116 } |
| 117 | 117 |
| 118 checkUnnamed2511(core.List<api.Subscription> o) { | 118 checkUnnamed2670(core.List<api.Subscription> o) { |
| 119 unittest.expect(o, unittest.hasLength(2)); | 119 unittest.expect(o, unittest.hasLength(2)); |
| 120 checkSubscription(o[0]); | 120 checkSubscription(o[0]); |
| 121 checkSubscription(o[1]); | 121 checkSubscription(o[1]); |
| 122 } | 122 } |
| 123 | 123 |
| 124 core.int buildCounterListSubscriptionsResponse = 0; | 124 core.int buildCounterListSubscriptionsResponse = 0; |
| 125 buildListSubscriptionsResponse() { | 125 buildListSubscriptionsResponse() { |
| 126 var o = new api.ListSubscriptionsResponse(); | 126 var o = new api.ListSubscriptionsResponse(); |
| 127 buildCounterListSubscriptionsResponse++; | 127 buildCounterListSubscriptionsResponse++; |
| 128 if (buildCounterListSubscriptionsResponse < 3) { | 128 if (buildCounterListSubscriptionsResponse < 3) { |
| 129 o.nextPageToken = "foo"; | 129 o.nextPageToken = "foo"; |
| 130 o.subscription = buildUnnamed2511(); | 130 o.subscription = buildUnnamed2670(); |
| 131 } | 131 } |
| 132 buildCounterListSubscriptionsResponse--; | 132 buildCounterListSubscriptionsResponse--; |
| 133 return o; | 133 return o; |
| 134 } | 134 } |
| 135 | 135 |
| 136 checkListSubscriptionsResponse(api.ListSubscriptionsResponse o) { | 136 checkListSubscriptionsResponse(api.ListSubscriptionsResponse o) { |
| 137 buildCounterListSubscriptionsResponse++; | 137 buildCounterListSubscriptionsResponse++; |
| 138 if (buildCounterListSubscriptionsResponse < 3) { | 138 if (buildCounterListSubscriptionsResponse < 3) { |
| 139 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 139 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 140 checkUnnamed2511(o.subscription); | 140 checkUnnamed2670(o.subscription); |
| 141 } | 141 } |
| 142 buildCounterListSubscriptionsResponse--; | 142 buildCounterListSubscriptionsResponse--; |
| 143 } | 143 } |
| 144 | 144 |
| 145 buildUnnamed2512() { | 145 buildUnnamed2671() { |
| 146 var o = new core.List<api.Topic>(); | 146 var o = new core.List<api.Topic>(); |
| 147 o.add(buildTopic()); | 147 o.add(buildTopic()); |
| 148 o.add(buildTopic()); | 148 o.add(buildTopic()); |
| 149 return o; | 149 return o; |
| 150 } | 150 } |
| 151 | 151 |
| 152 checkUnnamed2512(core.List<api.Topic> o) { | 152 checkUnnamed2671(core.List<api.Topic> o) { |
| 153 unittest.expect(o, unittest.hasLength(2)); | 153 unittest.expect(o, unittest.hasLength(2)); |
| 154 checkTopic(o[0]); | 154 checkTopic(o[0]); |
| 155 checkTopic(o[1]); | 155 checkTopic(o[1]); |
| 156 } | 156 } |
| 157 | 157 |
| 158 core.int buildCounterListTopicsResponse = 0; | 158 core.int buildCounterListTopicsResponse = 0; |
| 159 buildListTopicsResponse() { | 159 buildListTopicsResponse() { |
| 160 var o = new api.ListTopicsResponse(); | 160 var o = new api.ListTopicsResponse(); |
| 161 buildCounterListTopicsResponse++; | 161 buildCounterListTopicsResponse++; |
| 162 if (buildCounterListTopicsResponse < 3) { | 162 if (buildCounterListTopicsResponse < 3) { |
| 163 o.nextPageToken = "foo"; | 163 o.nextPageToken = "foo"; |
| 164 o.topic = buildUnnamed2512(); | 164 o.topic = buildUnnamed2671(); |
| 165 } | 165 } |
| 166 buildCounterListTopicsResponse--; | 166 buildCounterListTopicsResponse--; |
| 167 return o; | 167 return o; |
| 168 } | 168 } |
| 169 | 169 |
| 170 checkListTopicsResponse(api.ListTopicsResponse o) { | 170 checkListTopicsResponse(api.ListTopicsResponse o) { |
| 171 buildCounterListTopicsResponse++; | 171 buildCounterListTopicsResponse++; |
| 172 if (buildCounterListTopicsResponse < 3) { | 172 if (buildCounterListTopicsResponse < 3) { |
| 173 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 173 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 174 checkUnnamed2512(o.topic); | 174 checkUnnamed2671(o.topic); |
| 175 } | 175 } |
| 176 buildCounterListTopicsResponse--; | 176 buildCounterListTopicsResponse--; |
| 177 } | 177 } |
| 178 | 178 |
| 179 buildUnnamed2513() { | 179 buildUnnamed2672() { |
| 180 var o = new core.List<core.String>(); | 180 var o = new core.List<core.String>(); |
| 181 o.add("foo"); | 181 o.add("foo"); |
| 182 o.add("foo"); | 182 o.add("foo"); |
| 183 return o; | 183 return o; |
| 184 } | 184 } |
| 185 | 185 |
| 186 checkUnnamed2513(core.List<core.String> o) { | 186 checkUnnamed2672(core.List<core.String> o) { |
| 187 unittest.expect(o, unittest.hasLength(2)); | 187 unittest.expect(o, unittest.hasLength(2)); |
| 188 unittest.expect(o[0], unittest.equals('foo')); | 188 unittest.expect(o[0], unittest.equals('foo')); |
| 189 unittest.expect(o[1], unittest.equals('foo')); | 189 unittest.expect(o[1], unittest.equals('foo')); |
| 190 } | 190 } |
| 191 | 191 |
| 192 core.int buildCounterModifyAckDeadlineRequest = 0; | 192 core.int buildCounterModifyAckDeadlineRequest = 0; |
| 193 buildModifyAckDeadlineRequest() { | 193 buildModifyAckDeadlineRequest() { |
| 194 var o = new api.ModifyAckDeadlineRequest(); | 194 var o = new api.ModifyAckDeadlineRequest(); |
| 195 buildCounterModifyAckDeadlineRequest++; | 195 buildCounterModifyAckDeadlineRequest++; |
| 196 if (buildCounterModifyAckDeadlineRequest < 3) { | 196 if (buildCounterModifyAckDeadlineRequest < 3) { |
| 197 o.ackDeadlineSeconds = 42; | 197 o.ackDeadlineSeconds = 42; |
| 198 o.ackId = "foo"; | 198 o.ackId = "foo"; |
| 199 o.ackIds = buildUnnamed2513(); | 199 o.ackIds = buildUnnamed2672(); |
| 200 o.subscription = "foo"; | 200 o.subscription = "foo"; |
| 201 } | 201 } |
| 202 buildCounterModifyAckDeadlineRequest--; | 202 buildCounterModifyAckDeadlineRequest--; |
| 203 return o; | 203 return o; |
| 204 } | 204 } |
| 205 | 205 |
| 206 checkModifyAckDeadlineRequest(api.ModifyAckDeadlineRequest o) { | 206 checkModifyAckDeadlineRequest(api.ModifyAckDeadlineRequest o) { |
| 207 buildCounterModifyAckDeadlineRequest++; | 207 buildCounterModifyAckDeadlineRequest++; |
| 208 if (buildCounterModifyAckDeadlineRequest < 3) { | 208 if (buildCounterModifyAckDeadlineRequest < 3) { |
| 209 unittest.expect(o.ackDeadlineSeconds, unittest.equals(42)); | 209 unittest.expect(o.ackDeadlineSeconds, unittest.equals(42)); |
| 210 unittest.expect(o.ackId, unittest.equals('foo')); | 210 unittest.expect(o.ackId, unittest.equals('foo')); |
| 211 checkUnnamed2513(o.ackIds); | 211 checkUnnamed2672(o.ackIds); |
| 212 unittest.expect(o.subscription, unittest.equals('foo')); | 212 unittest.expect(o.subscription, unittest.equals('foo')); |
| 213 } | 213 } |
| 214 buildCounterModifyAckDeadlineRequest--; | 214 buildCounterModifyAckDeadlineRequest--; |
| 215 } | 215 } |
| 216 | 216 |
| 217 core.int buildCounterModifyPushConfigRequest = 0; | 217 core.int buildCounterModifyPushConfigRequest = 0; |
| 218 buildModifyPushConfigRequest() { | 218 buildModifyPushConfigRequest() { |
| 219 var o = new api.ModifyPushConfigRequest(); | 219 var o = new api.ModifyPushConfigRequest(); |
| 220 buildCounterModifyPushConfigRequest++; | 220 buildCounterModifyPushConfigRequest++; |
| 221 if (buildCounterModifyPushConfigRequest < 3) { | 221 if (buildCounterModifyPushConfigRequest < 3) { |
| 222 o.pushConfig = buildPushConfig(); | 222 o.pushConfig = buildPushConfig(); |
| 223 o.subscription = "foo"; | 223 o.subscription = "foo"; |
| 224 } | 224 } |
| 225 buildCounterModifyPushConfigRequest--; | 225 buildCounterModifyPushConfigRequest--; |
| 226 return o; | 226 return o; |
| 227 } | 227 } |
| 228 | 228 |
| 229 checkModifyPushConfigRequest(api.ModifyPushConfigRequest o) { | 229 checkModifyPushConfigRequest(api.ModifyPushConfigRequest o) { |
| 230 buildCounterModifyPushConfigRequest++; | 230 buildCounterModifyPushConfigRequest++; |
| 231 if (buildCounterModifyPushConfigRequest < 3) { | 231 if (buildCounterModifyPushConfigRequest < 3) { |
| 232 checkPushConfig(o.pushConfig); | 232 checkPushConfig(o.pushConfig); |
| 233 unittest.expect(o.subscription, unittest.equals('foo')); | 233 unittest.expect(o.subscription, unittest.equals('foo')); |
| 234 } | 234 } |
| 235 buildCounterModifyPushConfigRequest--; | 235 buildCounterModifyPushConfigRequest--; |
| 236 } | 236 } |
| 237 | 237 |
| 238 buildUnnamed2514() { | 238 buildUnnamed2673() { |
| 239 var o = new core.List<api.PubsubMessage>(); | 239 var o = new core.List<api.PubsubMessage>(); |
| 240 o.add(buildPubsubMessage()); | 240 o.add(buildPubsubMessage()); |
| 241 o.add(buildPubsubMessage()); | 241 o.add(buildPubsubMessage()); |
| 242 return o; | 242 return o; |
| 243 } | 243 } |
| 244 | 244 |
| 245 checkUnnamed2514(core.List<api.PubsubMessage> o) { | 245 checkUnnamed2673(core.List<api.PubsubMessage> o) { |
| 246 unittest.expect(o, unittest.hasLength(2)); | 246 unittest.expect(o, unittest.hasLength(2)); |
| 247 checkPubsubMessage(o[0]); | 247 checkPubsubMessage(o[0]); |
| 248 checkPubsubMessage(o[1]); | 248 checkPubsubMessage(o[1]); |
| 249 } | 249 } |
| 250 | 250 |
| 251 core.int buildCounterPublishBatchRequest = 0; | 251 core.int buildCounterPublishBatchRequest = 0; |
| 252 buildPublishBatchRequest() { | 252 buildPublishBatchRequest() { |
| 253 var o = new api.PublishBatchRequest(); | 253 var o = new api.PublishBatchRequest(); |
| 254 buildCounterPublishBatchRequest++; | 254 buildCounterPublishBatchRequest++; |
| 255 if (buildCounterPublishBatchRequest < 3) { | 255 if (buildCounterPublishBatchRequest < 3) { |
| 256 o.messages = buildUnnamed2514(); | 256 o.messages = buildUnnamed2673(); |
| 257 o.topic = "foo"; | 257 o.topic = "foo"; |
| 258 } | 258 } |
| 259 buildCounterPublishBatchRequest--; | 259 buildCounterPublishBatchRequest--; |
| 260 return o; | 260 return o; |
| 261 } | 261 } |
| 262 | 262 |
| 263 checkPublishBatchRequest(api.PublishBatchRequest o) { | 263 checkPublishBatchRequest(api.PublishBatchRequest o) { |
| 264 buildCounterPublishBatchRequest++; | 264 buildCounterPublishBatchRequest++; |
| 265 if (buildCounterPublishBatchRequest < 3) { | 265 if (buildCounterPublishBatchRequest < 3) { |
| 266 checkUnnamed2514(o.messages); | 266 checkUnnamed2673(o.messages); |
| 267 unittest.expect(o.topic, unittest.equals('foo')); | 267 unittest.expect(o.topic, unittest.equals('foo')); |
| 268 } | 268 } |
| 269 buildCounterPublishBatchRequest--; | 269 buildCounterPublishBatchRequest--; |
| 270 } | 270 } |
| 271 | 271 |
| 272 buildUnnamed2515() { | 272 buildUnnamed2674() { |
| 273 var o = new core.List<core.String>(); | 273 var o = new core.List<core.String>(); |
| 274 o.add("foo"); | 274 o.add("foo"); |
| 275 o.add("foo"); | 275 o.add("foo"); |
| 276 return o; | 276 return o; |
| 277 } | 277 } |
| 278 | 278 |
| 279 checkUnnamed2515(core.List<core.String> o) { | 279 checkUnnamed2674(core.List<core.String> o) { |
| 280 unittest.expect(o, unittest.hasLength(2)); | 280 unittest.expect(o, unittest.hasLength(2)); |
| 281 unittest.expect(o[0], unittest.equals('foo')); | 281 unittest.expect(o[0], unittest.equals('foo')); |
| 282 unittest.expect(o[1], unittest.equals('foo')); | 282 unittest.expect(o[1], unittest.equals('foo')); |
| 283 } | 283 } |
| 284 | 284 |
| 285 core.int buildCounterPublishBatchResponse = 0; | 285 core.int buildCounterPublishBatchResponse = 0; |
| 286 buildPublishBatchResponse() { | 286 buildPublishBatchResponse() { |
| 287 var o = new api.PublishBatchResponse(); | 287 var o = new api.PublishBatchResponse(); |
| 288 buildCounterPublishBatchResponse++; | 288 buildCounterPublishBatchResponse++; |
| 289 if (buildCounterPublishBatchResponse < 3) { | 289 if (buildCounterPublishBatchResponse < 3) { |
| 290 o.messageIds = buildUnnamed2515(); | 290 o.messageIds = buildUnnamed2674(); |
| 291 } | 291 } |
| 292 buildCounterPublishBatchResponse--; | 292 buildCounterPublishBatchResponse--; |
| 293 return o; | 293 return o; |
| 294 } | 294 } |
| 295 | 295 |
| 296 checkPublishBatchResponse(api.PublishBatchResponse o) { | 296 checkPublishBatchResponse(api.PublishBatchResponse o) { |
| 297 buildCounterPublishBatchResponse++; | 297 buildCounterPublishBatchResponse++; |
| 298 if (buildCounterPublishBatchResponse < 3) { | 298 if (buildCounterPublishBatchResponse < 3) { |
| 299 checkUnnamed2515(o.messageIds); | 299 checkUnnamed2674(o.messageIds); |
| 300 } | 300 } |
| 301 buildCounterPublishBatchResponse--; | 301 buildCounterPublishBatchResponse--; |
| 302 } | 302 } |
| 303 | 303 |
| 304 core.int buildCounterPublishRequest = 0; | 304 core.int buildCounterPublishRequest = 0; |
| 305 buildPublishRequest() { | 305 buildPublishRequest() { |
| 306 var o = new api.PublishRequest(); | 306 var o = new api.PublishRequest(); |
| 307 buildCounterPublishRequest++; | 307 buildCounterPublishRequest++; |
| 308 if (buildCounterPublishRequest < 3) { | 308 if (buildCounterPublishRequest < 3) { |
| 309 o.message = buildPubsubMessage(); | 309 o.message = buildPubsubMessage(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 340 buildCounterPubsubEvent++; | 340 buildCounterPubsubEvent++; |
| 341 if (buildCounterPubsubEvent < 3) { | 341 if (buildCounterPubsubEvent < 3) { |
| 342 unittest.expect(o.deleted, unittest.isTrue); | 342 unittest.expect(o.deleted, unittest.isTrue); |
| 343 checkPubsubMessage(o.message); | 343 checkPubsubMessage(o.message); |
| 344 unittest.expect(o.subscription, unittest.equals('foo')); | 344 unittest.expect(o.subscription, unittest.equals('foo')); |
| 345 unittest.expect(o.truncated, unittest.isTrue); | 345 unittest.expect(o.truncated, unittest.isTrue); |
| 346 } | 346 } |
| 347 buildCounterPubsubEvent--; | 347 buildCounterPubsubEvent--; |
| 348 } | 348 } |
| 349 | 349 |
| 350 buildUnnamed2516() { | 350 buildUnnamed2675() { |
| 351 var o = new core.List<api.Label>(); | 351 var o = new core.List<api.Label>(); |
| 352 o.add(buildLabel()); | 352 o.add(buildLabel()); |
| 353 o.add(buildLabel()); | 353 o.add(buildLabel()); |
| 354 return o; | 354 return o; |
| 355 } | 355 } |
| 356 | 356 |
| 357 checkUnnamed2516(core.List<api.Label> o) { | 357 checkUnnamed2675(core.List<api.Label> o) { |
| 358 unittest.expect(o, unittest.hasLength(2)); | 358 unittest.expect(o, unittest.hasLength(2)); |
| 359 checkLabel(o[0]); | 359 checkLabel(o[0]); |
| 360 checkLabel(o[1]); | 360 checkLabel(o[1]); |
| 361 } | 361 } |
| 362 | 362 |
| 363 core.int buildCounterPubsubMessage = 0; | 363 core.int buildCounterPubsubMessage = 0; |
| 364 buildPubsubMessage() { | 364 buildPubsubMessage() { |
| 365 var o = new api.PubsubMessage(); | 365 var o = new api.PubsubMessage(); |
| 366 buildCounterPubsubMessage++; | 366 buildCounterPubsubMessage++; |
| 367 if (buildCounterPubsubMessage < 3) { | 367 if (buildCounterPubsubMessage < 3) { |
| 368 o.data = "foo"; | 368 o.data = "foo"; |
| 369 o.label = buildUnnamed2516(); | 369 o.label = buildUnnamed2675(); |
| 370 o.messageId = "foo"; | 370 o.messageId = "foo"; |
| 371 } | 371 } |
| 372 buildCounterPubsubMessage--; | 372 buildCounterPubsubMessage--; |
| 373 return o; | 373 return o; |
| 374 } | 374 } |
| 375 | 375 |
| 376 checkPubsubMessage(api.PubsubMessage o) { | 376 checkPubsubMessage(api.PubsubMessage o) { |
| 377 buildCounterPubsubMessage++; | 377 buildCounterPubsubMessage++; |
| 378 if (buildCounterPubsubMessage < 3) { | 378 if (buildCounterPubsubMessage < 3) { |
| 379 unittest.expect(o.data, unittest.equals('foo')); | 379 unittest.expect(o.data, unittest.equals('foo')); |
| 380 checkUnnamed2516(o.label); | 380 checkUnnamed2675(o.label); |
| 381 unittest.expect(o.messageId, unittest.equals('foo')); | 381 unittest.expect(o.messageId, unittest.equals('foo')); |
| 382 } | 382 } |
| 383 buildCounterPubsubMessage--; | 383 buildCounterPubsubMessage--; |
| 384 } | 384 } |
| 385 | 385 |
| 386 core.int buildCounterPullBatchRequest = 0; | 386 core.int buildCounterPullBatchRequest = 0; |
| 387 buildPullBatchRequest() { | 387 buildPullBatchRequest() { |
| 388 var o = new api.PullBatchRequest(); | 388 var o = new api.PullBatchRequest(); |
| 389 buildCounterPullBatchRequest++; | 389 buildCounterPullBatchRequest++; |
| 390 if (buildCounterPullBatchRequest < 3) { | 390 if (buildCounterPullBatchRequest < 3) { |
| 391 o.maxEvents = 42; | 391 o.maxEvents = 42; |
| 392 o.returnImmediately = true; | 392 o.returnImmediately = true; |
| 393 o.subscription = "foo"; | 393 o.subscription = "foo"; |
| 394 } | 394 } |
| 395 buildCounterPullBatchRequest--; | 395 buildCounterPullBatchRequest--; |
| 396 return o; | 396 return o; |
| 397 } | 397 } |
| 398 | 398 |
| 399 checkPullBatchRequest(api.PullBatchRequest o) { | 399 checkPullBatchRequest(api.PullBatchRequest o) { |
| 400 buildCounterPullBatchRequest++; | 400 buildCounterPullBatchRequest++; |
| 401 if (buildCounterPullBatchRequest < 3) { | 401 if (buildCounterPullBatchRequest < 3) { |
| 402 unittest.expect(o.maxEvents, unittest.equals(42)); | 402 unittest.expect(o.maxEvents, unittest.equals(42)); |
| 403 unittest.expect(o.returnImmediately, unittest.isTrue); | 403 unittest.expect(o.returnImmediately, unittest.isTrue); |
| 404 unittest.expect(o.subscription, unittest.equals('foo')); | 404 unittest.expect(o.subscription, unittest.equals('foo')); |
| 405 } | 405 } |
| 406 buildCounterPullBatchRequest--; | 406 buildCounterPullBatchRequest--; |
| 407 } | 407 } |
| 408 | 408 |
| 409 buildUnnamed2517() { | 409 buildUnnamed2676() { |
| 410 var o = new core.List<api.PullResponse>(); | 410 var o = new core.List<api.PullResponse>(); |
| 411 o.add(buildPullResponse()); | 411 o.add(buildPullResponse()); |
| 412 o.add(buildPullResponse()); | 412 o.add(buildPullResponse()); |
| 413 return o; | 413 return o; |
| 414 } | 414 } |
| 415 | 415 |
| 416 checkUnnamed2517(core.List<api.PullResponse> o) { | 416 checkUnnamed2676(core.List<api.PullResponse> o) { |
| 417 unittest.expect(o, unittest.hasLength(2)); | 417 unittest.expect(o, unittest.hasLength(2)); |
| 418 checkPullResponse(o[0]); | 418 checkPullResponse(o[0]); |
| 419 checkPullResponse(o[1]); | 419 checkPullResponse(o[1]); |
| 420 } | 420 } |
| 421 | 421 |
| 422 core.int buildCounterPullBatchResponse = 0; | 422 core.int buildCounterPullBatchResponse = 0; |
| 423 buildPullBatchResponse() { | 423 buildPullBatchResponse() { |
| 424 var o = new api.PullBatchResponse(); | 424 var o = new api.PullBatchResponse(); |
| 425 buildCounterPullBatchResponse++; | 425 buildCounterPullBatchResponse++; |
| 426 if (buildCounterPullBatchResponse < 3) { | 426 if (buildCounterPullBatchResponse < 3) { |
| 427 o.pullResponses = buildUnnamed2517(); | 427 o.pullResponses = buildUnnamed2676(); |
| 428 } | 428 } |
| 429 buildCounterPullBatchResponse--; | 429 buildCounterPullBatchResponse--; |
| 430 return o; | 430 return o; |
| 431 } | 431 } |
| 432 | 432 |
| 433 checkPullBatchResponse(api.PullBatchResponse o) { | 433 checkPullBatchResponse(api.PullBatchResponse o) { |
| 434 buildCounterPullBatchResponse++; | 434 buildCounterPullBatchResponse++; |
| 435 if (buildCounterPullBatchResponse < 3) { | 435 if (buildCounterPullBatchResponse < 3) { |
| 436 checkUnnamed2517(o.pullResponses); | 436 checkUnnamed2676(o.pullResponses); |
| 437 } | 437 } |
| 438 buildCounterPullBatchResponse--; | 438 buildCounterPullBatchResponse--; |
| 439 } | 439 } |
| 440 | 440 |
| 441 core.int buildCounterPullRequest = 0; | 441 core.int buildCounterPullRequest = 0; |
| 442 buildPullRequest() { | 442 buildPullRequest() { |
| 443 var o = new api.PullRequest(); | 443 var o = new api.PullRequest(); |
| 444 buildCounterPullRequest++; | 444 buildCounterPullRequest++; |
| 445 if (buildCounterPullRequest < 3) { | 445 if (buildCounterPullRequest < 3) { |
| 446 o.returnImmediately = true; | 446 o.returnImmediately = true; |
| (...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 res.publishBatch(arg_request).then(unittest.expectAsync(((api.PublishBatch
Response response) { | 1429 res.publishBatch(arg_request).then(unittest.expectAsync(((api.PublishBatch
Response response) { |
| 1430 checkPublishBatchResponse(response); | 1430 checkPublishBatchResponse(response); |
| 1431 }))); | 1431 }))); |
| 1432 }); | 1432 }); |
| 1433 | 1433 |
| 1434 }); | 1434 }); |
| 1435 | 1435 |
| 1436 | 1436 |
| 1437 } | 1437 } |
| 1438 | 1438 |
| OLD | NEW |