| OLD | NEW |
| 1 library googleapis.pubsub.v1.test; | 1 library googleapis.pubsub.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| (...skipping 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 buildUnnamed1144() { | 54 buildUnnamed1175() { |
| 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 checkUnnamed1144(core.List<core.String> o) { | 61 checkUnnamed1175(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.ackIds = buildUnnamed1144(); | 72 o.ackIds = buildUnnamed1175(); |
| 73 } | 73 } |
| 74 buildCounterAcknowledgeRequest--; | 74 buildCounterAcknowledgeRequest--; |
| 75 return o; | 75 return o; |
| 76 } | 76 } |
| 77 | 77 |
| 78 checkAcknowledgeRequest(api.AcknowledgeRequest o) { | 78 checkAcknowledgeRequest(api.AcknowledgeRequest o) { |
| 79 buildCounterAcknowledgeRequest++; | 79 buildCounterAcknowledgeRequest++; |
| 80 if (buildCounterAcknowledgeRequest < 3) { | 80 if (buildCounterAcknowledgeRequest < 3) { |
| 81 checkUnnamed1144(o.ackIds); | 81 checkUnnamed1175(o.ackIds); |
| 82 } | 82 } |
| 83 buildCounterAcknowledgeRequest--; | 83 buildCounterAcknowledgeRequest--; |
| 84 } | 84 } |
| 85 | 85 |
| 86 buildUnnamed1145() { | 86 buildUnnamed1176() { |
| 87 var o = new core.List<core.String>(); | 87 var o = new core.List<core.String>(); |
| 88 o.add("foo"); | 88 o.add("foo"); |
| 89 o.add("foo"); | 89 o.add("foo"); |
| 90 return o; | 90 return o; |
| 91 } | 91 } |
| 92 | 92 |
| 93 checkUnnamed1145(core.List<core.String> o) { | 93 checkUnnamed1176(core.List<core.String> o) { |
| 94 unittest.expect(o, unittest.hasLength(2)); | 94 unittest.expect(o, unittest.hasLength(2)); |
| 95 unittest.expect(o[0], unittest.equals('foo')); | 95 unittest.expect(o[0], unittest.equals('foo')); |
| 96 unittest.expect(o[1], unittest.equals('foo')); | 96 unittest.expect(o[1], unittest.equals('foo')); |
| 97 } | 97 } |
| 98 | 98 |
| 99 core.int buildCounterBinding = 0; | 99 core.int buildCounterBinding = 0; |
| 100 buildBinding() { | 100 buildBinding() { |
| 101 var o = new api.Binding(); | 101 var o = new api.Binding(); |
| 102 buildCounterBinding++; | 102 buildCounterBinding++; |
| 103 if (buildCounterBinding < 3) { | 103 if (buildCounterBinding < 3) { |
| 104 o.members = buildUnnamed1145(); | 104 o.members = buildUnnamed1176(); |
| 105 o.role = "foo"; | 105 o.role = "foo"; |
| 106 } | 106 } |
| 107 buildCounterBinding--; | 107 buildCounterBinding--; |
| 108 return o; | 108 return o; |
| 109 } | 109 } |
| 110 | 110 |
| 111 checkBinding(api.Binding o) { | 111 checkBinding(api.Binding o) { |
| 112 buildCounterBinding++; | 112 buildCounterBinding++; |
| 113 if (buildCounterBinding < 3) { | 113 if (buildCounterBinding < 3) { |
| 114 checkUnnamed1145(o.members); | 114 checkUnnamed1176(o.members); |
| 115 unittest.expect(o.role, unittest.equals('foo')); | 115 unittest.expect(o.role, unittest.equals('foo')); |
| 116 } | 116 } |
| 117 buildCounterBinding--; | 117 buildCounterBinding--; |
| 118 } | 118 } |
| 119 | 119 |
| 120 core.int buildCounterEmpty = 0; | 120 core.int buildCounterEmpty = 0; |
| 121 buildEmpty() { | 121 buildEmpty() { |
| 122 var o = new api.Empty(); | 122 var o = new api.Empty(); |
| 123 buildCounterEmpty++; | 123 buildCounterEmpty++; |
| 124 if (buildCounterEmpty < 3) { | 124 if (buildCounterEmpty < 3) { |
| 125 } | 125 } |
| 126 buildCounterEmpty--; | 126 buildCounterEmpty--; |
| 127 return o; | 127 return o; |
| 128 } | 128 } |
| 129 | 129 |
| 130 checkEmpty(api.Empty o) { | 130 checkEmpty(api.Empty o) { |
| 131 buildCounterEmpty++; | 131 buildCounterEmpty++; |
| 132 if (buildCounterEmpty < 3) { | 132 if (buildCounterEmpty < 3) { |
| 133 } | 133 } |
| 134 buildCounterEmpty--; | 134 buildCounterEmpty--; |
| 135 } | 135 } |
| 136 | 136 |
| 137 buildUnnamed1146() { | 137 buildUnnamed1177() { |
| 138 var o = new core.List<api.Subscription>(); | 138 var o = new core.List<api.Subscription>(); |
| 139 o.add(buildSubscription()); | 139 o.add(buildSubscription()); |
| 140 o.add(buildSubscription()); | 140 o.add(buildSubscription()); |
| 141 return o; | 141 return o; |
| 142 } | 142 } |
| 143 | 143 |
| 144 checkUnnamed1146(core.List<api.Subscription> o) { | 144 checkUnnamed1177(core.List<api.Subscription> o) { |
| 145 unittest.expect(o, unittest.hasLength(2)); | 145 unittest.expect(o, unittest.hasLength(2)); |
| 146 checkSubscription(o[0]); | 146 checkSubscription(o[0]); |
| 147 checkSubscription(o[1]); | 147 checkSubscription(o[1]); |
| 148 } | 148 } |
| 149 | 149 |
| 150 core.int buildCounterListSubscriptionsResponse = 0; | 150 core.int buildCounterListSubscriptionsResponse = 0; |
| 151 buildListSubscriptionsResponse() { | 151 buildListSubscriptionsResponse() { |
| 152 var o = new api.ListSubscriptionsResponse(); | 152 var o = new api.ListSubscriptionsResponse(); |
| 153 buildCounterListSubscriptionsResponse++; | 153 buildCounterListSubscriptionsResponse++; |
| 154 if (buildCounterListSubscriptionsResponse < 3) { | 154 if (buildCounterListSubscriptionsResponse < 3) { |
| 155 o.nextPageToken = "foo"; | 155 o.nextPageToken = "foo"; |
| 156 o.subscriptions = buildUnnamed1146(); | 156 o.subscriptions = buildUnnamed1177(); |
| 157 } | 157 } |
| 158 buildCounterListSubscriptionsResponse--; | 158 buildCounterListSubscriptionsResponse--; |
| 159 return o; | 159 return o; |
| 160 } | 160 } |
| 161 | 161 |
| 162 checkListSubscriptionsResponse(api.ListSubscriptionsResponse o) { | 162 checkListSubscriptionsResponse(api.ListSubscriptionsResponse o) { |
| 163 buildCounterListSubscriptionsResponse++; | 163 buildCounterListSubscriptionsResponse++; |
| 164 if (buildCounterListSubscriptionsResponse < 3) { | 164 if (buildCounterListSubscriptionsResponse < 3) { |
| 165 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 165 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 166 checkUnnamed1146(o.subscriptions); | 166 checkUnnamed1177(o.subscriptions); |
| 167 } | 167 } |
| 168 buildCounterListSubscriptionsResponse--; | 168 buildCounterListSubscriptionsResponse--; |
| 169 } | 169 } |
| 170 | 170 |
| 171 buildUnnamed1147() { | 171 buildUnnamed1178() { |
| 172 var o = new core.List<core.String>(); | 172 var o = new core.List<core.String>(); |
| 173 o.add("foo"); | 173 o.add("foo"); |
| 174 o.add("foo"); | 174 o.add("foo"); |
| 175 return o; | 175 return o; |
| 176 } | 176 } |
| 177 | 177 |
| 178 checkUnnamed1147(core.List<core.String> o) { | 178 checkUnnamed1178(core.List<core.String> o) { |
| 179 unittest.expect(o, unittest.hasLength(2)); | 179 unittest.expect(o, unittest.hasLength(2)); |
| 180 unittest.expect(o[0], unittest.equals('foo')); | 180 unittest.expect(o[0], unittest.equals('foo')); |
| 181 unittest.expect(o[1], unittest.equals('foo')); | 181 unittest.expect(o[1], unittest.equals('foo')); |
| 182 } | 182 } |
| 183 | 183 |
| 184 core.int buildCounterListTopicSubscriptionsResponse = 0; | 184 core.int buildCounterListTopicSubscriptionsResponse = 0; |
| 185 buildListTopicSubscriptionsResponse() { | 185 buildListTopicSubscriptionsResponse() { |
| 186 var o = new api.ListTopicSubscriptionsResponse(); | 186 var o = new api.ListTopicSubscriptionsResponse(); |
| 187 buildCounterListTopicSubscriptionsResponse++; | 187 buildCounterListTopicSubscriptionsResponse++; |
| 188 if (buildCounterListTopicSubscriptionsResponse < 3) { | 188 if (buildCounterListTopicSubscriptionsResponse < 3) { |
| 189 o.nextPageToken = "foo"; | 189 o.nextPageToken = "foo"; |
| 190 o.subscriptions = buildUnnamed1147(); | 190 o.subscriptions = buildUnnamed1178(); |
| 191 } | 191 } |
| 192 buildCounterListTopicSubscriptionsResponse--; | 192 buildCounterListTopicSubscriptionsResponse--; |
| 193 return o; | 193 return o; |
| 194 } | 194 } |
| 195 | 195 |
| 196 checkListTopicSubscriptionsResponse(api.ListTopicSubscriptionsResponse o) { | 196 checkListTopicSubscriptionsResponse(api.ListTopicSubscriptionsResponse o) { |
| 197 buildCounterListTopicSubscriptionsResponse++; | 197 buildCounterListTopicSubscriptionsResponse++; |
| 198 if (buildCounterListTopicSubscriptionsResponse < 3) { | 198 if (buildCounterListTopicSubscriptionsResponse < 3) { |
| 199 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 199 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 200 checkUnnamed1147(o.subscriptions); | 200 checkUnnamed1178(o.subscriptions); |
| 201 } | 201 } |
| 202 buildCounterListTopicSubscriptionsResponse--; | 202 buildCounterListTopicSubscriptionsResponse--; |
| 203 } | 203 } |
| 204 | 204 |
| 205 buildUnnamed1148() { | 205 buildUnnamed1179() { |
| 206 var o = new core.List<api.Topic>(); | 206 var o = new core.List<api.Topic>(); |
| 207 o.add(buildTopic()); | 207 o.add(buildTopic()); |
| 208 o.add(buildTopic()); | 208 o.add(buildTopic()); |
| 209 return o; | 209 return o; |
| 210 } | 210 } |
| 211 | 211 |
| 212 checkUnnamed1148(core.List<api.Topic> o) { | 212 checkUnnamed1179(core.List<api.Topic> o) { |
| 213 unittest.expect(o, unittest.hasLength(2)); | 213 unittest.expect(o, unittest.hasLength(2)); |
| 214 checkTopic(o[0]); | 214 checkTopic(o[0]); |
| 215 checkTopic(o[1]); | 215 checkTopic(o[1]); |
| 216 } | 216 } |
| 217 | 217 |
| 218 core.int buildCounterListTopicsResponse = 0; | 218 core.int buildCounterListTopicsResponse = 0; |
| 219 buildListTopicsResponse() { | 219 buildListTopicsResponse() { |
| 220 var o = new api.ListTopicsResponse(); | 220 var o = new api.ListTopicsResponse(); |
| 221 buildCounterListTopicsResponse++; | 221 buildCounterListTopicsResponse++; |
| 222 if (buildCounterListTopicsResponse < 3) { | 222 if (buildCounterListTopicsResponse < 3) { |
| 223 o.nextPageToken = "foo"; | 223 o.nextPageToken = "foo"; |
| 224 o.topics = buildUnnamed1148(); | 224 o.topics = buildUnnamed1179(); |
| 225 } | 225 } |
| 226 buildCounterListTopicsResponse--; | 226 buildCounterListTopicsResponse--; |
| 227 return o; | 227 return o; |
| 228 } | 228 } |
| 229 | 229 |
| 230 checkListTopicsResponse(api.ListTopicsResponse o) { | 230 checkListTopicsResponse(api.ListTopicsResponse o) { |
| 231 buildCounterListTopicsResponse++; | 231 buildCounterListTopicsResponse++; |
| 232 if (buildCounterListTopicsResponse < 3) { | 232 if (buildCounterListTopicsResponse < 3) { |
| 233 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 233 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 234 checkUnnamed1148(o.topics); | 234 checkUnnamed1179(o.topics); |
| 235 } | 235 } |
| 236 buildCounterListTopicsResponse--; | 236 buildCounterListTopicsResponse--; |
| 237 } | 237 } |
| 238 | 238 |
| 239 buildUnnamed1149() { | 239 buildUnnamed1180() { |
| 240 var o = new core.List<core.String>(); | 240 var o = new core.List<core.String>(); |
| 241 o.add("foo"); | 241 o.add("foo"); |
| 242 o.add("foo"); | 242 o.add("foo"); |
| 243 return o; | 243 return o; |
| 244 } | 244 } |
| 245 | 245 |
| 246 checkUnnamed1149(core.List<core.String> o) { | 246 checkUnnamed1180(core.List<core.String> o) { |
| 247 unittest.expect(o, unittest.hasLength(2)); | 247 unittest.expect(o, unittest.hasLength(2)); |
| 248 unittest.expect(o[0], unittest.equals('foo')); | 248 unittest.expect(o[0], unittest.equals('foo')); |
| 249 unittest.expect(o[1], unittest.equals('foo')); | 249 unittest.expect(o[1], unittest.equals('foo')); |
| 250 } | 250 } |
| 251 | 251 |
| 252 core.int buildCounterModifyAckDeadlineRequest = 0; | 252 core.int buildCounterModifyAckDeadlineRequest = 0; |
| 253 buildModifyAckDeadlineRequest() { | 253 buildModifyAckDeadlineRequest() { |
| 254 var o = new api.ModifyAckDeadlineRequest(); | 254 var o = new api.ModifyAckDeadlineRequest(); |
| 255 buildCounterModifyAckDeadlineRequest++; | 255 buildCounterModifyAckDeadlineRequest++; |
| 256 if (buildCounterModifyAckDeadlineRequest < 3) { | 256 if (buildCounterModifyAckDeadlineRequest < 3) { |
| 257 o.ackDeadlineSeconds = 42; | 257 o.ackDeadlineSeconds = 42; |
| 258 o.ackIds = buildUnnamed1149(); | 258 o.ackIds = buildUnnamed1180(); |
| 259 } | 259 } |
| 260 buildCounterModifyAckDeadlineRequest--; | 260 buildCounterModifyAckDeadlineRequest--; |
| 261 return o; | 261 return o; |
| 262 } | 262 } |
| 263 | 263 |
| 264 checkModifyAckDeadlineRequest(api.ModifyAckDeadlineRequest o) { | 264 checkModifyAckDeadlineRequest(api.ModifyAckDeadlineRequest o) { |
| 265 buildCounterModifyAckDeadlineRequest++; | 265 buildCounterModifyAckDeadlineRequest++; |
| 266 if (buildCounterModifyAckDeadlineRequest < 3) { | 266 if (buildCounterModifyAckDeadlineRequest < 3) { |
| 267 unittest.expect(o.ackDeadlineSeconds, unittest.equals(42)); | 267 unittest.expect(o.ackDeadlineSeconds, unittest.equals(42)); |
| 268 checkUnnamed1149(o.ackIds); | 268 checkUnnamed1180(o.ackIds); |
| 269 } | 269 } |
| 270 buildCounterModifyAckDeadlineRequest--; | 270 buildCounterModifyAckDeadlineRequest--; |
| 271 } | 271 } |
| 272 | 272 |
| 273 core.int buildCounterModifyPushConfigRequest = 0; | 273 core.int buildCounterModifyPushConfigRequest = 0; |
| 274 buildModifyPushConfigRequest() { | 274 buildModifyPushConfigRequest() { |
| 275 var o = new api.ModifyPushConfigRequest(); | 275 var o = new api.ModifyPushConfigRequest(); |
| 276 buildCounterModifyPushConfigRequest++; | 276 buildCounterModifyPushConfigRequest++; |
| 277 if (buildCounterModifyPushConfigRequest < 3) { | 277 if (buildCounterModifyPushConfigRequest < 3) { |
| 278 o.pushConfig = buildPushConfig(); | 278 o.pushConfig = buildPushConfig(); |
| 279 } | 279 } |
| 280 buildCounterModifyPushConfigRequest--; | 280 buildCounterModifyPushConfigRequest--; |
| 281 return o; | 281 return o; |
| 282 } | 282 } |
| 283 | 283 |
| 284 checkModifyPushConfigRequest(api.ModifyPushConfigRequest o) { | 284 checkModifyPushConfigRequest(api.ModifyPushConfigRequest o) { |
| 285 buildCounterModifyPushConfigRequest++; | 285 buildCounterModifyPushConfigRequest++; |
| 286 if (buildCounterModifyPushConfigRequest < 3) { | 286 if (buildCounterModifyPushConfigRequest < 3) { |
| 287 checkPushConfig(o.pushConfig); | 287 checkPushConfig(o.pushConfig); |
| 288 } | 288 } |
| 289 buildCounterModifyPushConfigRequest--; | 289 buildCounterModifyPushConfigRequest--; |
| 290 } | 290 } |
| 291 | 291 |
| 292 buildUnnamed1150() { | 292 buildUnnamed1181() { |
| 293 var o = new core.List<api.Binding>(); | 293 var o = new core.List<api.Binding>(); |
| 294 o.add(buildBinding()); | 294 o.add(buildBinding()); |
| 295 o.add(buildBinding()); | 295 o.add(buildBinding()); |
| 296 return o; | 296 return o; |
| 297 } | 297 } |
| 298 | 298 |
| 299 checkUnnamed1150(core.List<api.Binding> o) { | 299 checkUnnamed1181(core.List<api.Binding> o) { |
| 300 unittest.expect(o, unittest.hasLength(2)); | 300 unittest.expect(o, unittest.hasLength(2)); |
| 301 checkBinding(o[0]); | 301 checkBinding(o[0]); |
| 302 checkBinding(o[1]); | 302 checkBinding(o[1]); |
| 303 } | 303 } |
| 304 | 304 |
| 305 core.int buildCounterPolicy = 0; | 305 core.int buildCounterPolicy = 0; |
| 306 buildPolicy() { | 306 buildPolicy() { |
| 307 var o = new api.Policy(); | 307 var o = new api.Policy(); |
| 308 buildCounterPolicy++; | 308 buildCounterPolicy++; |
| 309 if (buildCounterPolicy < 3) { | 309 if (buildCounterPolicy < 3) { |
| 310 o.bindings = buildUnnamed1150(); | 310 o.bindings = buildUnnamed1181(); |
| 311 o.etag = "foo"; | 311 o.etag = "foo"; |
| 312 o.version = 42; | 312 o.version = 42; |
| 313 } | 313 } |
| 314 buildCounterPolicy--; | 314 buildCounterPolicy--; |
| 315 return o; | 315 return o; |
| 316 } | 316 } |
| 317 | 317 |
| 318 checkPolicy(api.Policy o) { | 318 checkPolicy(api.Policy o) { |
| 319 buildCounterPolicy++; | 319 buildCounterPolicy++; |
| 320 if (buildCounterPolicy < 3) { | 320 if (buildCounterPolicy < 3) { |
| 321 checkUnnamed1150(o.bindings); | 321 checkUnnamed1181(o.bindings); |
| 322 unittest.expect(o.etag, unittest.equals('foo')); | 322 unittest.expect(o.etag, unittest.equals('foo')); |
| 323 unittest.expect(o.version, unittest.equals(42)); | 323 unittest.expect(o.version, unittest.equals(42)); |
| 324 } | 324 } |
| 325 buildCounterPolicy--; | 325 buildCounterPolicy--; |
| 326 } | 326 } |
| 327 | 327 |
| 328 buildUnnamed1151() { | 328 buildUnnamed1182() { |
| 329 var o = new core.List<api.PubsubMessage>(); | 329 var o = new core.List<api.PubsubMessage>(); |
| 330 o.add(buildPubsubMessage()); | 330 o.add(buildPubsubMessage()); |
| 331 o.add(buildPubsubMessage()); | 331 o.add(buildPubsubMessage()); |
| 332 return o; | 332 return o; |
| 333 } | 333 } |
| 334 | 334 |
| 335 checkUnnamed1151(core.List<api.PubsubMessage> o) { | 335 checkUnnamed1182(core.List<api.PubsubMessage> o) { |
| 336 unittest.expect(o, unittest.hasLength(2)); | 336 unittest.expect(o, unittest.hasLength(2)); |
| 337 checkPubsubMessage(o[0]); | 337 checkPubsubMessage(o[0]); |
| 338 checkPubsubMessage(o[1]); | 338 checkPubsubMessage(o[1]); |
| 339 } | 339 } |
| 340 | 340 |
| 341 core.int buildCounterPublishRequest = 0; | 341 core.int buildCounterPublishRequest = 0; |
| 342 buildPublishRequest() { | 342 buildPublishRequest() { |
| 343 var o = new api.PublishRequest(); | 343 var o = new api.PublishRequest(); |
| 344 buildCounterPublishRequest++; | 344 buildCounterPublishRequest++; |
| 345 if (buildCounterPublishRequest < 3) { | 345 if (buildCounterPublishRequest < 3) { |
| 346 o.messages = buildUnnamed1151(); | 346 o.messages = buildUnnamed1182(); |
| 347 } | 347 } |
| 348 buildCounterPublishRequest--; | 348 buildCounterPublishRequest--; |
| 349 return o; | 349 return o; |
| 350 } | 350 } |
| 351 | 351 |
| 352 checkPublishRequest(api.PublishRequest o) { | 352 checkPublishRequest(api.PublishRequest o) { |
| 353 buildCounterPublishRequest++; | 353 buildCounterPublishRequest++; |
| 354 if (buildCounterPublishRequest < 3) { | 354 if (buildCounterPublishRequest < 3) { |
| 355 checkUnnamed1151(o.messages); | 355 checkUnnamed1182(o.messages); |
| 356 } | 356 } |
| 357 buildCounterPublishRequest--; | 357 buildCounterPublishRequest--; |
| 358 } | 358 } |
| 359 | 359 |
| 360 buildUnnamed1152() { | 360 buildUnnamed1183() { |
| 361 var o = new core.List<core.String>(); | 361 var o = new core.List<core.String>(); |
| 362 o.add("foo"); | 362 o.add("foo"); |
| 363 o.add("foo"); | 363 o.add("foo"); |
| 364 return o; | 364 return o; |
| 365 } | 365 } |
| 366 | 366 |
| 367 checkUnnamed1152(core.List<core.String> o) { | 367 checkUnnamed1183(core.List<core.String> o) { |
| 368 unittest.expect(o, unittest.hasLength(2)); | 368 unittest.expect(o, unittest.hasLength(2)); |
| 369 unittest.expect(o[0], unittest.equals('foo')); | 369 unittest.expect(o[0], unittest.equals('foo')); |
| 370 unittest.expect(o[1], unittest.equals('foo')); | 370 unittest.expect(o[1], unittest.equals('foo')); |
| 371 } | 371 } |
| 372 | 372 |
| 373 core.int buildCounterPublishResponse = 0; | 373 core.int buildCounterPublishResponse = 0; |
| 374 buildPublishResponse() { | 374 buildPublishResponse() { |
| 375 var o = new api.PublishResponse(); | 375 var o = new api.PublishResponse(); |
| 376 buildCounterPublishResponse++; | 376 buildCounterPublishResponse++; |
| 377 if (buildCounterPublishResponse < 3) { | 377 if (buildCounterPublishResponse < 3) { |
| 378 o.messageIds = buildUnnamed1152(); | 378 o.messageIds = buildUnnamed1183(); |
| 379 } | 379 } |
| 380 buildCounterPublishResponse--; | 380 buildCounterPublishResponse--; |
| 381 return o; | 381 return o; |
| 382 } | 382 } |
| 383 | 383 |
| 384 checkPublishResponse(api.PublishResponse o) { | 384 checkPublishResponse(api.PublishResponse o) { |
| 385 buildCounterPublishResponse++; | 385 buildCounterPublishResponse++; |
| 386 if (buildCounterPublishResponse < 3) { | 386 if (buildCounterPublishResponse < 3) { |
| 387 checkUnnamed1152(o.messageIds); | 387 checkUnnamed1183(o.messageIds); |
| 388 } | 388 } |
| 389 buildCounterPublishResponse--; | 389 buildCounterPublishResponse--; |
| 390 } | 390 } |
| 391 | 391 |
| 392 buildUnnamed1153() { | 392 buildUnnamed1184() { |
| 393 var o = new core.Map<core.String, core.String>(); | 393 var o = new core.Map<core.String, core.String>(); |
| 394 o["x"] = "foo"; | 394 o["x"] = "foo"; |
| 395 o["y"] = "foo"; | 395 o["y"] = "foo"; |
| 396 return o; | 396 return o; |
| 397 } | 397 } |
| 398 | 398 |
| 399 checkUnnamed1153(core.Map<core.String, core.String> o) { | 399 checkUnnamed1184(core.Map<core.String, core.String> o) { |
| 400 unittest.expect(o, unittest.hasLength(2)); | 400 unittest.expect(o, unittest.hasLength(2)); |
| 401 unittest.expect(o["x"], unittest.equals('foo')); | 401 unittest.expect(o["x"], unittest.equals('foo')); |
| 402 unittest.expect(o["y"], unittest.equals('foo')); | 402 unittest.expect(o["y"], unittest.equals('foo')); |
| 403 } | 403 } |
| 404 | 404 |
| 405 core.int buildCounterPubsubMessage = 0; | 405 core.int buildCounterPubsubMessage = 0; |
| 406 buildPubsubMessage() { | 406 buildPubsubMessage() { |
| 407 var o = new api.PubsubMessage(); | 407 var o = new api.PubsubMessage(); |
| 408 buildCounterPubsubMessage++; | 408 buildCounterPubsubMessage++; |
| 409 if (buildCounterPubsubMessage < 3) { | 409 if (buildCounterPubsubMessage < 3) { |
| 410 o.attributes = buildUnnamed1153(); | 410 o.attributes = buildUnnamed1184(); |
| 411 o.data = "foo"; | 411 o.data = "foo"; |
| 412 o.messageId = "foo"; | 412 o.messageId = "foo"; |
| 413 o.publishTime = "foo"; | 413 o.publishTime = "foo"; |
| 414 } | 414 } |
| 415 buildCounterPubsubMessage--; | 415 buildCounterPubsubMessage--; |
| 416 return o; | 416 return o; |
| 417 } | 417 } |
| 418 | 418 |
| 419 checkPubsubMessage(api.PubsubMessage o) { | 419 checkPubsubMessage(api.PubsubMessage o) { |
| 420 buildCounterPubsubMessage++; | 420 buildCounterPubsubMessage++; |
| 421 if (buildCounterPubsubMessage < 3) { | 421 if (buildCounterPubsubMessage < 3) { |
| 422 checkUnnamed1153(o.attributes); | 422 checkUnnamed1184(o.attributes); |
| 423 unittest.expect(o.data, unittest.equals('foo')); | 423 unittest.expect(o.data, unittest.equals('foo')); |
| 424 unittest.expect(o.messageId, unittest.equals('foo')); | 424 unittest.expect(o.messageId, unittest.equals('foo')); |
| 425 unittest.expect(o.publishTime, unittest.equals('foo')); | 425 unittest.expect(o.publishTime, unittest.equals('foo')); |
| 426 } | 426 } |
| 427 buildCounterPubsubMessage--; | 427 buildCounterPubsubMessage--; |
| 428 } | 428 } |
| 429 | 429 |
| 430 core.int buildCounterPullRequest = 0; | 430 core.int buildCounterPullRequest = 0; |
| 431 buildPullRequest() { | 431 buildPullRequest() { |
| 432 var o = new api.PullRequest(); | 432 var o = new api.PullRequest(); |
| 433 buildCounterPullRequest++; | 433 buildCounterPullRequest++; |
| 434 if (buildCounterPullRequest < 3) { | 434 if (buildCounterPullRequest < 3) { |
| 435 o.maxMessages = 42; | 435 o.maxMessages = 42; |
| 436 o.returnImmediately = true; | 436 o.returnImmediately = true; |
| 437 } | 437 } |
| 438 buildCounterPullRequest--; | 438 buildCounterPullRequest--; |
| 439 return o; | 439 return o; |
| 440 } | 440 } |
| 441 | 441 |
| 442 checkPullRequest(api.PullRequest o) { | 442 checkPullRequest(api.PullRequest o) { |
| 443 buildCounterPullRequest++; | 443 buildCounterPullRequest++; |
| 444 if (buildCounterPullRequest < 3) { | 444 if (buildCounterPullRequest < 3) { |
| 445 unittest.expect(o.maxMessages, unittest.equals(42)); | 445 unittest.expect(o.maxMessages, unittest.equals(42)); |
| 446 unittest.expect(o.returnImmediately, unittest.isTrue); | 446 unittest.expect(o.returnImmediately, unittest.isTrue); |
| 447 } | 447 } |
| 448 buildCounterPullRequest--; | 448 buildCounterPullRequest--; |
| 449 } | 449 } |
| 450 | 450 |
| 451 buildUnnamed1154() { | 451 buildUnnamed1185() { |
| 452 var o = new core.List<api.ReceivedMessage>(); | 452 var o = new core.List<api.ReceivedMessage>(); |
| 453 o.add(buildReceivedMessage()); | 453 o.add(buildReceivedMessage()); |
| 454 o.add(buildReceivedMessage()); | 454 o.add(buildReceivedMessage()); |
| 455 return o; | 455 return o; |
| 456 } | 456 } |
| 457 | 457 |
| 458 checkUnnamed1154(core.List<api.ReceivedMessage> o) { | 458 checkUnnamed1185(core.List<api.ReceivedMessage> o) { |
| 459 unittest.expect(o, unittest.hasLength(2)); | 459 unittest.expect(o, unittest.hasLength(2)); |
| 460 checkReceivedMessage(o[0]); | 460 checkReceivedMessage(o[0]); |
| 461 checkReceivedMessage(o[1]); | 461 checkReceivedMessage(o[1]); |
| 462 } | 462 } |
| 463 | 463 |
| 464 core.int buildCounterPullResponse = 0; | 464 core.int buildCounterPullResponse = 0; |
| 465 buildPullResponse() { | 465 buildPullResponse() { |
| 466 var o = new api.PullResponse(); | 466 var o = new api.PullResponse(); |
| 467 buildCounterPullResponse++; | 467 buildCounterPullResponse++; |
| 468 if (buildCounterPullResponse < 3) { | 468 if (buildCounterPullResponse < 3) { |
| 469 o.receivedMessages = buildUnnamed1154(); | 469 o.receivedMessages = buildUnnamed1185(); |
| 470 } | 470 } |
| 471 buildCounterPullResponse--; | 471 buildCounterPullResponse--; |
| 472 return o; | 472 return o; |
| 473 } | 473 } |
| 474 | 474 |
| 475 checkPullResponse(api.PullResponse o) { | 475 checkPullResponse(api.PullResponse o) { |
| 476 buildCounterPullResponse++; | 476 buildCounterPullResponse++; |
| 477 if (buildCounterPullResponse < 3) { | 477 if (buildCounterPullResponse < 3) { |
| 478 checkUnnamed1154(o.receivedMessages); | 478 checkUnnamed1185(o.receivedMessages); |
| 479 } | 479 } |
| 480 buildCounterPullResponse--; | 480 buildCounterPullResponse--; |
| 481 } | 481 } |
| 482 | 482 |
| 483 buildUnnamed1155() { | 483 buildUnnamed1186() { |
| 484 var o = new core.Map<core.String, core.String>(); | 484 var o = new core.Map<core.String, core.String>(); |
| 485 o["x"] = "foo"; | 485 o["x"] = "foo"; |
| 486 o["y"] = "foo"; | 486 o["y"] = "foo"; |
| 487 return o; | 487 return o; |
| 488 } | 488 } |
| 489 | 489 |
| 490 checkUnnamed1155(core.Map<core.String, core.String> o) { | 490 checkUnnamed1186(core.Map<core.String, core.String> o) { |
| 491 unittest.expect(o, unittest.hasLength(2)); | 491 unittest.expect(o, unittest.hasLength(2)); |
| 492 unittest.expect(o["x"], unittest.equals('foo')); | 492 unittest.expect(o["x"], unittest.equals('foo')); |
| 493 unittest.expect(o["y"], unittest.equals('foo')); | 493 unittest.expect(o["y"], unittest.equals('foo')); |
| 494 } | 494 } |
| 495 | 495 |
| 496 core.int buildCounterPushConfig = 0; | 496 core.int buildCounterPushConfig = 0; |
| 497 buildPushConfig() { | 497 buildPushConfig() { |
| 498 var o = new api.PushConfig(); | 498 var o = new api.PushConfig(); |
| 499 buildCounterPushConfig++; | 499 buildCounterPushConfig++; |
| 500 if (buildCounterPushConfig < 3) { | 500 if (buildCounterPushConfig < 3) { |
| 501 o.attributes = buildUnnamed1155(); | 501 o.attributes = buildUnnamed1186(); |
| 502 o.pushEndpoint = "foo"; | 502 o.pushEndpoint = "foo"; |
| 503 } | 503 } |
| 504 buildCounterPushConfig--; | 504 buildCounterPushConfig--; |
| 505 return o; | 505 return o; |
| 506 } | 506 } |
| 507 | 507 |
| 508 checkPushConfig(api.PushConfig o) { | 508 checkPushConfig(api.PushConfig o) { |
| 509 buildCounterPushConfig++; | 509 buildCounterPushConfig++; |
| 510 if (buildCounterPushConfig < 3) { | 510 if (buildCounterPushConfig < 3) { |
| 511 checkUnnamed1155(o.attributes); | 511 checkUnnamed1186(o.attributes); |
| 512 unittest.expect(o.pushEndpoint, unittest.equals('foo')); | 512 unittest.expect(o.pushEndpoint, unittest.equals('foo')); |
| 513 } | 513 } |
| 514 buildCounterPushConfig--; | 514 buildCounterPushConfig--; |
| 515 } | 515 } |
| 516 | 516 |
| 517 core.int buildCounterReceivedMessage = 0; | 517 core.int buildCounterReceivedMessage = 0; |
| 518 buildReceivedMessage() { | 518 buildReceivedMessage() { |
| 519 var o = new api.ReceivedMessage(); | 519 var o = new api.ReceivedMessage(); |
| 520 buildCounterReceivedMessage++; | 520 buildCounterReceivedMessage++; |
| 521 if (buildCounterReceivedMessage < 3) { | 521 if (buildCounterReceivedMessage < 3) { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 buildCounterSubscription++; | 572 buildCounterSubscription++; |
| 573 if (buildCounterSubscription < 3) { | 573 if (buildCounterSubscription < 3) { |
| 574 unittest.expect(o.ackDeadlineSeconds, unittest.equals(42)); | 574 unittest.expect(o.ackDeadlineSeconds, unittest.equals(42)); |
| 575 unittest.expect(o.name, unittest.equals('foo')); | 575 unittest.expect(o.name, unittest.equals('foo')); |
| 576 checkPushConfig(o.pushConfig); | 576 checkPushConfig(o.pushConfig); |
| 577 unittest.expect(o.topic, unittest.equals('foo')); | 577 unittest.expect(o.topic, unittest.equals('foo')); |
| 578 } | 578 } |
| 579 buildCounterSubscription--; | 579 buildCounterSubscription--; |
| 580 } | 580 } |
| 581 | 581 |
| 582 buildUnnamed1156() { | 582 buildUnnamed1187() { |
| 583 var o = new core.List<core.String>(); | 583 var o = new core.List<core.String>(); |
| 584 o.add("foo"); | 584 o.add("foo"); |
| 585 o.add("foo"); | 585 o.add("foo"); |
| 586 return o; | 586 return o; |
| 587 } | 587 } |
| 588 | 588 |
| 589 checkUnnamed1156(core.List<core.String> o) { | 589 checkUnnamed1187(core.List<core.String> o) { |
| 590 unittest.expect(o, unittest.hasLength(2)); | 590 unittest.expect(o, unittest.hasLength(2)); |
| 591 unittest.expect(o[0], unittest.equals('foo')); | 591 unittest.expect(o[0], unittest.equals('foo')); |
| 592 unittest.expect(o[1], unittest.equals('foo')); | 592 unittest.expect(o[1], unittest.equals('foo')); |
| 593 } | 593 } |
| 594 | 594 |
| 595 core.int buildCounterTestIamPermissionsRequest = 0; | 595 core.int buildCounterTestIamPermissionsRequest = 0; |
| 596 buildTestIamPermissionsRequest() { | 596 buildTestIamPermissionsRequest() { |
| 597 var o = new api.TestIamPermissionsRequest(); | 597 var o = new api.TestIamPermissionsRequest(); |
| 598 buildCounterTestIamPermissionsRequest++; | 598 buildCounterTestIamPermissionsRequest++; |
| 599 if (buildCounterTestIamPermissionsRequest < 3) { | 599 if (buildCounterTestIamPermissionsRequest < 3) { |
| 600 o.permissions = buildUnnamed1156(); | 600 o.permissions = buildUnnamed1187(); |
| 601 } | 601 } |
| 602 buildCounterTestIamPermissionsRequest--; | 602 buildCounterTestIamPermissionsRequest--; |
| 603 return o; | 603 return o; |
| 604 } | 604 } |
| 605 | 605 |
| 606 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { | 606 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { |
| 607 buildCounterTestIamPermissionsRequest++; | 607 buildCounterTestIamPermissionsRequest++; |
| 608 if (buildCounterTestIamPermissionsRequest < 3) { | 608 if (buildCounterTestIamPermissionsRequest < 3) { |
| 609 checkUnnamed1156(o.permissions); | 609 checkUnnamed1187(o.permissions); |
| 610 } | 610 } |
| 611 buildCounterTestIamPermissionsRequest--; | 611 buildCounterTestIamPermissionsRequest--; |
| 612 } | 612 } |
| 613 | 613 |
| 614 buildUnnamed1157() { | 614 buildUnnamed1188() { |
| 615 var o = new core.List<core.String>(); | 615 var o = new core.List<core.String>(); |
| 616 o.add("foo"); | 616 o.add("foo"); |
| 617 o.add("foo"); | 617 o.add("foo"); |
| 618 return o; | 618 return o; |
| 619 } | 619 } |
| 620 | 620 |
| 621 checkUnnamed1157(core.List<core.String> o) { | 621 checkUnnamed1188(core.List<core.String> o) { |
| 622 unittest.expect(o, unittest.hasLength(2)); | 622 unittest.expect(o, unittest.hasLength(2)); |
| 623 unittest.expect(o[0], unittest.equals('foo')); | 623 unittest.expect(o[0], unittest.equals('foo')); |
| 624 unittest.expect(o[1], unittest.equals('foo')); | 624 unittest.expect(o[1], unittest.equals('foo')); |
| 625 } | 625 } |
| 626 | 626 |
| 627 core.int buildCounterTestIamPermissionsResponse = 0; | 627 core.int buildCounterTestIamPermissionsResponse = 0; |
| 628 buildTestIamPermissionsResponse() { | 628 buildTestIamPermissionsResponse() { |
| 629 var o = new api.TestIamPermissionsResponse(); | 629 var o = new api.TestIamPermissionsResponse(); |
| 630 buildCounterTestIamPermissionsResponse++; | 630 buildCounterTestIamPermissionsResponse++; |
| 631 if (buildCounterTestIamPermissionsResponse < 3) { | 631 if (buildCounterTestIamPermissionsResponse < 3) { |
| 632 o.permissions = buildUnnamed1157(); | 632 o.permissions = buildUnnamed1188(); |
| 633 } | 633 } |
| 634 buildCounterTestIamPermissionsResponse--; | 634 buildCounterTestIamPermissionsResponse--; |
| 635 return o; | 635 return o; |
| 636 } | 636 } |
| 637 | 637 |
| 638 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { | 638 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
| 639 buildCounterTestIamPermissionsResponse++; | 639 buildCounterTestIamPermissionsResponse++; |
| 640 if (buildCounterTestIamPermissionsResponse < 3) { | 640 if (buildCounterTestIamPermissionsResponse < 3) { |
| 641 checkUnnamed1157(o.permissions); | 641 checkUnnamed1188(o.permissions); |
| 642 } | 642 } |
| 643 buildCounterTestIamPermissionsResponse--; | 643 buildCounterTestIamPermissionsResponse--; |
| 644 } | 644 } |
| 645 | 645 |
| 646 core.int buildCounterTopic = 0; | 646 core.int buildCounterTopic = 0; |
| 647 buildTopic() { | 647 buildTopic() { |
| 648 var o = new api.Topic(); | 648 var o = new api.Topic(); |
| 649 buildCounterTopic++; | 649 buildCounterTopic++; |
| 650 if (buildCounterTopic < 3) { | 650 if (buildCounterTopic < 3) { |
| 651 o.name = "foo"; | 651 o.name = "foo"; |
| (...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1714 res.getIamPolicy(arg_resource).then(unittest.expectAsync(((api.Policy resp
onse) { | 1714 res.getIamPolicy(arg_resource).then(unittest.expectAsync(((api.Policy resp
onse) { |
| 1715 checkPolicy(response); | 1715 checkPolicy(response); |
| 1716 }))); | 1716 }))); |
| 1717 }); | 1717 }); |
| 1718 | 1718 |
| 1719 unittest.test("method--list", () { | 1719 unittest.test("method--list", () { |
| 1720 | 1720 |
| 1721 var mock = new HttpServerMock(); | 1721 var mock = new HttpServerMock(); |
| 1722 api.ProjectsTopicsResourceApi res = new api.PubsubApi(mock).projects.topic
s; | 1722 api.ProjectsTopicsResourceApi res = new api.PubsubApi(mock).projects.topic
s; |
| 1723 var arg_project = "foo"; | 1723 var arg_project = "foo"; |
| 1724 var arg_pageToken = "foo"; |
| 1724 var arg_pageSize = 42; | 1725 var arg_pageSize = 42; |
| 1725 var arg_pageToken = "foo"; | |
| 1726 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1726 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1727 var path = (req.url).path; | 1727 var path = (req.url).path; |
| 1728 var pathOffset = 0; | 1728 var pathOffset = 0; |
| 1729 var index; | 1729 var index; |
| 1730 var subPart; | 1730 var subPart; |
| 1731 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1731 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1732 pathOffset += 1; | 1732 pathOffset += 1; |
| 1733 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1733 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1734 pathOffset += 3; | 1734 pathOffset += 3; |
| 1735 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1735 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1736 | 1736 |
| 1737 var query = (req.url).query; | 1737 var query = (req.url).query; |
| 1738 var queryOffset = 0; | 1738 var queryOffset = 0; |
| 1739 var queryMap = {}; | 1739 var queryMap = {}; |
| 1740 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1740 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1741 parseBool(n) { | 1741 parseBool(n) { |
| 1742 if (n == "true") return true; | 1742 if (n == "true") return true; |
| 1743 if (n == "false") return false; | 1743 if (n == "false") return false; |
| 1744 if (n == null) return null; | 1744 if (n == null) return null; |
| 1745 throw new core.ArgumentError("Invalid boolean: $n"); | 1745 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1746 } | 1746 } |
| 1747 if (query.length > 0) { | 1747 if (query.length > 0) { |
| 1748 for (var part in query.split("&")) { | 1748 for (var part in query.split("&")) { |
| 1749 var keyvalue = part.split("="); | 1749 var keyvalue = part.split("="); |
| 1750 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1750 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1751 } | 1751 } |
| 1752 } | 1752 } |
| 1753 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1753 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1754 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1754 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 1755 | 1755 |
| 1756 | 1756 |
| 1757 var h = { | 1757 var h = { |
| 1758 "content-type" : "application/json; charset=utf-8", | 1758 "content-type" : "application/json; charset=utf-8", |
| 1759 }; | 1759 }; |
| 1760 var resp = convert.JSON.encode(buildListTopicsResponse()); | 1760 var resp = convert.JSON.encode(buildListTopicsResponse()); |
| 1761 return new async.Future.value(stringResponse(200, h, resp)); | 1761 return new async.Future.value(stringResponse(200, h, resp)); |
| 1762 }), true); | 1762 }), true); |
| 1763 res.list(arg_project, pageSize: arg_pageSize, pageToken: arg_pageToken).th
en(unittest.expectAsync(((api.ListTopicsResponse response) { | 1763 res.list(arg_project, pageToken: arg_pageToken, pageSize: arg_pageSize).th
en(unittest.expectAsync(((api.ListTopicsResponse response) { |
| 1764 checkListTopicsResponse(response); | 1764 checkListTopicsResponse(response); |
| 1765 }))); | 1765 }))); |
| 1766 }); | 1766 }); |
| 1767 | 1767 |
| 1768 unittest.test("method--publish", () { | 1768 unittest.test("method--publish", () { |
| 1769 | 1769 |
| 1770 var mock = new HttpServerMock(); | 1770 var mock = new HttpServerMock(); |
| 1771 api.ProjectsTopicsResourceApi res = new api.PubsubApi(mock).projects.topic
s; | 1771 api.ProjectsTopicsResourceApi res = new api.PubsubApi(mock).projects.topic
s; |
| 1772 var arg_request = buildPublishRequest(); | 1772 var arg_request = buildPublishRequest(); |
| 1773 var arg_topic = "foo"; | 1773 var arg_topic = "foo"; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1963 res.list(arg_topic, pageToken: arg_pageToken, pageSize: arg_pageSize).then
(unittest.expectAsync(((api.ListTopicSubscriptionsResponse response) { | 1963 res.list(arg_topic, pageToken: arg_pageToken, pageSize: arg_pageSize).then
(unittest.expectAsync(((api.ListTopicSubscriptionsResponse response) { |
| 1964 checkListTopicSubscriptionsResponse(response); | 1964 checkListTopicSubscriptionsResponse(response); |
| 1965 }))); | 1965 }))); |
| 1966 }); | 1966 }); |
| 1967 | 1967 |
| 1968 }); | 1968 }); |
| 1969 | 1969 |
| 1970 | 1970 |
| 1971 } | 1971 } |
| 1972 | 1972 |
| OLD | NEW |