| OLD | NEW |
| 1 library googleapis.analytics.v3.test; | 1 library googleapis.analytics.v3.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | |
| 5 import "dart:async" as async; | 4 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 5 import "dart:convert" as convert; |
| 7 | 6 |
| 8 import 'package:http/http.dart' as http; | 7 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | |
| 10 import 'package:test/test.dart' as unittest; | 8 import 'package:test/test.dart' as unittest; |
| 11 | 9 |
| 12 import 'package:googleapis/analytics/v3.dart' as api; | 10 import 'package:googleapis/analytics/v3.dart' as api; |
| 13 | 11 |
| 14 class HttpServerMock extends http.BaseClient { | 12 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 13 core.Function _callback; |
| 16 core.bool _expectJson; | 14 core.bool _expectJson; |
| 17 | 15 |
| 18 void register(core.Function callback, core.bool expectJson) { | 16 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 17 _callback = callback; |
| 20 _expectJson = expectJson; | 18 _expectJson = expectJson; |
| 21 } | 19 } |
| 22 | 20 |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { | 21 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { | 22 if (_expectJson) { |
| 25 return request.finalize() | 23 return request |
| 24 .finalize() |
| 26 .transform(convert.UTF8.decoder) | 25 .transform(convert.UTF8.decoder) |
| 27 .join('') | 26 .join('') |
| 28 .then((core.String jsonString) { | 27 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { | 28 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); | 29 return _callback(request, null); |
| 31 } else { | 30 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); | 31 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } | 32 } |
| 34 }); | 33 }); |
| 35 } else { | 34 } else { |
| 36 var stream = request.finalize(); | 35 var stream = request.finalize(); |
| 37 if (stream == null) { | 36 if (stream == null) { |
| 38 return _callback(request, []); | 37 return _callback(request, []); |
| 39 } else { | 38 } else { |
| 40 return stream.toBytes().then((data) { | 39 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); | 40 return _callback(request, data); |
| 42 }); | 41 }); |
| 43 } | 42 } |
| 44 } | 43 } |
| 45 } | 44 } |
| 46 } | 45 } |
| 47 | 46 |
| 48 http.StreamedResponse stringResponse( | 47 http.StreamedResponse stringResponse(core.int status, |
| 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { | 48 core.Map<core.String, core.String> headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 49 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 50 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 51 } |
| 53 | 52 |
| 54 core.int buildCounterAccountChildLink = 0; | 53 core.int buildCounterAccountChildLink = 0; |
| 55 buildAccountChildLink() { | 54 buildAccountChildLink() { |
| 56 var o = new api.AccountChildLink(); | 55 var o = new api.AccountChildLink(); |
| 57 buildCounterAccountChildLink++; | 56 buildCounterAccountChildLink++; |
| 58 if (buildCounterAccountChildLink < 3) { | 57 if (buildCounterAccountChildLink < 3) { |
| 59 o.href = "foo"; | 58 o.href = "foo"; |
| 60 o.type = "foo"; | 59 o.type = "foo"; |
| 61 } | 60 } |
| 62 buildCounterAccountChildLink--; | 61 buildCounterAccountChildLink--; |
| 63 return o; | 62 return o; |
| 64 } | 63 } |
| 65 | 64 |
| 66 checkAccountChildLink(api.AccountChildLink o) { | 65 checkAccountChildLink(api.AccountChildLink o) { |
| 67 buildCounterAccountChildLink++; | 66 buildCounterAccountChildLink++; |
| 68 if (buildCounterAccountChildLink < 3) { | 67 if (buildCounterAccountChildLink < 3) { |
| 69 unittest.expect(o.href, unittest.equals('foo')); | 68 unittest.expect(o.href, unittest.equals('foo')); |
| 70 unittest.expect(o.type, unittest.equals('foo')); | 69 unittest.expect(o.type, unittest.equals('foo')); |
| 71 } | 70 } |
| 72 buildCounterAccountChildLink--; | 71 buildCounterAccountChildLink--; |
| 73 } | 72 } |
| 74 | 73 |
| 75 buildUnnamed999() { | 74 buildUnnamed1002() { |
| 76 var o = new core.List<core.String>(); | 75 var o = new core.List<core.String>(); |
| 77 o.add("foo"); | 76 o.add("foo"); |
| 78 o.add("foo"); | 77 o.add("foo"); |
| 79 return o; | 78 return o; |
| 80 } | 79 } |
| 81 | 80 |
| 82 checkUnnamed999(core.List<core.String> o) { | 81 checkUnnamed1002(core.List<core.String> o) { |
| 83 unittest.expect(o, unittest.hasLength(2)); | 82 unittest.expect(o, unittest.hasLength(2)); |
| 84 unittest.expect(o[0], unittest.equals('foo')); | 83 unittest.expect(o[0], unittest.equals('foo')); |
| 85 unittest.expect(o[1], unittest.equals('foo')); | 84 unittest.expect(o[1], unittest.equals('foo')); |
| 86 } | 85 } |
| 87 | 86 |
| 88 core.int buildCounterAccountPermissions = 0; | 87 core.int buildCounterAccountPermissions = 0; |
| 89 buildAccountPermissions() { | 88 buildAccountPermissions() { |
| 90 var o = new api.AccountPermissions(); | 89 var o = new api.AccountPermissions(); |
| 91 buildCounterAccountPermissions++; | 90 buildCounterAccountPermissions++; |
| 92 if (buildCounterAccountPermissions < 3) { | 91 if (buildCounterAccountPermissions < 3) { |
| 93 o.effective = buildUnnamed999(); | 92 o.effective = buildUnnamed1002(); |
| 94 } | 93 } |
| 95 buildCounterAccountPermissions--; | 94 buildCounterAccountPermissions--; |
| 96 return o; | 95 return o; |
| 97 } | 96 } |
| 98 | 97 |
| 99 checkAccountPermissions(api.AccountPermissions o) { | 98 checkAccountPermissions(api.AccountPermissions o) { |
| 100 buildCounterAccountPermissions++; | 99 buildCounterAccountPermissions++; |
| 101 if (buildCounterAccountPermissions < 3) { | 100 if (buildCounterAccountPermissions < 3) { |
| 102 checkUnnamed999(o.effective); | 101 checkUnnamed1002(o.effective); |
| 103 } | 102 } |
| 104 buildCounterAccountPermissions--; | 103 buildCounterAccountPermissions--; |
| 105 } | 104 } |
| 106 | 105 |
| 107 core.int buildCounterAccount = 0; | 106 core.int buildCounterAccount = 0; |
| 108 buildAccount() { | 107 buildAccount() { |
| 109 var o = new api.Account(); | 108 var o = new api.Account(); |
| 110 buildCounterAccount++; | 109 buildCounterAccount++; |
| 111 if (buildCounterAccount < 3) { | 110 if (buildCounterAccount < 3) { |
| 112 o.childLink = buildAccountChildLink(); | 111 o.childLink = buildAccountChildLink(); |
| 113 o.created = core.DateTime.parse("2002-02-27T14:01:02"); | 112 o.created = core.DateTime.parse("2002-02-27T14:01:02"); |
| 114 o.id = "foo"; | 113 o.id = "foo"; |
| 115 o.kind = "foo"; | 114 o.kind = "foo"; |
| 116 o.name = "foo"; | 115 o.name = "foo"; |
| 117 o.permissions = buildAccountPermissions(); | 116 o.permissions = buildAccountPermissions(); |
| 118 o.selfLink = "foo"; | 117 o.selfLink = "foo"; |
| 119 o.starred = true; | 118 o.starred = true; |
| 120 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 119 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 121 } | 120 } |
| 122 buildCounterAccount--; | 121 buildCounterAccount--; |
| 123 return o; | 122 return o; |
| 124 } | 123 } |
| 125 | 124 |
| 126 checkAccount(api.Account o) { | 125 checkAccount(api.Account o) { |
| 127 buildCounterAccount++; | 126 buildCounterAccount++; |
| 128 if (buildCounterAccount < 3) { | 127 if (buildCounterAccount < 3) { |
| 129 checkAccountChildLink(o.childLink); | 128 checkAccountChildLink(o.childLink); |
| 130 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 129 unittest.expect( |
| 130 o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 131 unittest.expect(o.id, unittest.equals('foo')); | 131 unittest.expect(o.id, unittest.equals('foo')); |
| 132 unittest.expect(o.kind, unittest.equals('foo')); | 132 unittest.expect(o.kind, unittest.equals('foo')); |
| 133 unittest.expect(o.name, unittest.equals('foo')); | 133 unittest.expect(o.name, unittest.equals('foo')); |
| 134 checkAccountPermissions(o.permissions); | 134 checkAccountPermissions(o.permissions); |
| 135 unittest.expect(o.selfLink, unittest.equals('foo')); | 135 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 136 unittest.expect(o.starred, unittest.isTrue); | 136 unittest.expect(o.starred, unittest.isTrue); |
| 137 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 137 unittest.expect( |
| 138 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 138 } | 139 } |
| 139 buildCounterAccount--; | 140 buildCounterAccount--; |
| 140 } | 141 } |
| 141 | 142 |
| 142 core.int buildCounterAccountRef = 0; | 143 core.int buildCounterAccountRef = 0; |
| 143 buildAccountRef() { | 144 buildAccountRef() { |
| 144 var o = new api.AccountRef(); | 145 var o = new api.AccountRef(); |
| 145 buildCounterAccountRef++; | 146 buildCounterAccountRef++; |
| 146 if (buildCounterAccountRef < 3) { | 147 if (buildCounterAccountRef < 3) { |
| 147 o.href = "foo"; | 148 o.href = "foo"; |
| 148 o.id = "foo"; | 149 o.id = "foo"; |
| 149 o.kind = "foo"; | 150 o.kind = "foo"; |
| 150 o.name = "foo"; | 151 o.name = "foo"; |
| 151 } | 152 } |
| 152 buildCounterAccountRef--; | 153 buildCounterAccountRef--; |
| 153 return o; | 154 return o; |
| 154 } | 155 } |
| 155 | 156 |
| 156 checkAccountRef(api.AccountRef o) { | 157 checkAccountRef(api.AccountRef o) { |
| 157 buildCounterAccountRef++; | 158 buildCounterAccountRef++; |
| 158 if (buildCounterAccountRef < 3) { | 159 if (buildCounterAccountRef < 3) { |
| 159 unittest.expect(o.href, unittest.equals('foo')); | 160 unittest.expect(o.href, unittest.equals('foo')); |
| 160 unittest.expect(o.id, unittest.equals('foo')); | 161 unittest.expect(o.id, unittest.equals('foo')); |
| 161 unittest.expect(o.kind, unittest.equals('foo')); | 162 unittest.expect(o.kind, unittest.equals('foo')); |
| 162 unittest.expect(o.name, unittest.equals('foo')); | 163 unittest.expect(o.name, unittest.equals('foo')); |
| 163 } | 164 } |
| 164 buildCounterAccountRef--; | 165 buildCounterAccountRef--; |
| 165 } | 166 } |
| 166 | 167 |
| 167 buildUnnamed1000() { | 168 buildUnnamed1003() { |
| 168 var o = new core.List<api.AccountSummary>(); | 169 var o = new core.List<api.AccountSummary>(); |
| 169 o.add(buildAccountSummary()); | 170 o.add(buildAccountSummary()); |
| 170 o.add(buildAccountSummary()); | 171 o.add(buildAccountSummary()); |
| 171 return o; | 172 return o; |
| 172 } | 173 } |
| 173 | 174 |
| 174 checkUnnamed1000(core.List<api.AccountSummary> o) { | 175 checkUnnamed1003(core.List<api.AccountSummary> o) { |
| 175 unittest.expect(o, unittest.hasLength(2)); | 176 unittest.expect(o, unittest.hasLength(2)); |
| 176 checkAccountSummary(o[0]); | 177 checkAccountSummary(o[0]); |
| 177 checkAccountSummary(o[1]); | 178 checkAccountSummary(o[1]); |
| 178 } | 179 } |
| 179 | 180 |
| 180 core.int buildCounterAccountSummaries = 0; | 181 core.int buildCounterAccountSummaries = 0; |
| 181 buildAccountSummaries() { | 182 buildAccountSummaries() { |
| 182 var o = new api.AccountSummaries(); | 183 var o = new api.AccountSummaries(); |
| 183 buildCounterAccountSummaries++; | 184 buildCounterAccountSummaries++; |
| 184 if (buildCounterAccountSummaries < 3) { | 185 if (buildCounterAccountSummaries < 3) { |
| 185 o.items = buildUnnamed1000(); | 186 o.items = buildUnnamed1003(); |
| 186 o.itemsPerPage = 42; | 187 o.itemsPerPage = 42; |
| 187 o.kind = "foo"; | 188 o.kind = "foo"; |
| 188 o.nextLink = "foo"; | 189 o.nextLink = "foo"; |
| 189 o.previousLink = "foo"; | 190 o.previousLink = "foo"; |
| 190 o.startIndex = 42; | 191 o.startIndex = 42; |
| 191 o.totalResults = 42; | 192 o.totalResults = 42; |
| 192 o.username = "foo"; | 193 o.username = "foo"; |
| 193 } | 194 } |
| 194 buildCounterAccountSummaries--; | 195 buildCounterAccountSummaries--; |
| 195 return o; | 196 return o; |
| 196 } | 197 } |
| 197 | 198 |
| 198 checkAccountSummaries(api.AccountSummaries o) { | 199 checkAccountSummaries(api.AccountSummaries o) { |
| 199 buildCounterAccountSummaries++; | 200 buildCounterAccountSummaries++; |
| 200 if (buildCounterAccountSummaries < 3) { | 201 if (buildCounterAccountSummaries < 3) { |
| 201 checkUnnamed1000(o.items); | 202 checkUnnamed1003(o.items); |
| 202 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 203 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 203 unittest.expect(o.kind, unittest.equals('foo')); | 204 unittest.expect(o.kind, unittest.equals('foo')); |
| 204 unittest.expect(o.nextLink, unittest.equals('foo')); | 205 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 205 unittest.expect(o.previousLink, unittest.equals('foo')); | 206 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 206 unittest.expect(o.startIndex, unittest.equals(42)); | 207 unittest.expect(o.startIndex, unittest.equals(42)); |
| 207 unittest.expect(o.totalResults, unittest.equals(42)); | 208 unittest.expect(o.totalResults, unittest.equals(42)); |
| 208 unittest.expect(o.username, unittest.equals('foo')); | 209 unittest.expect(o.username, unittest.equals('foo')); |
| 209 } | 210 } |
| 210 buildCounterAccountSummaries--; | 211 buildCounterAccountSummaries--; |
| 211 } | 212 } |
| 212 | 213 |
| 213 buildUnnamed1001() { | 214 buildUnnamed1004() { |
| 214 var o = new core.List<api.WebPropertySummary>(); | 215 var o = new core.List<api.WebPropertySummary>(); |
| 215 o.add(buildWebPropertySummary()); | 216 o.add(buildWebPropertySummary()); |
| 216 o.add(buildWebPropertySummary()); | 217 o.add(buildWebPropertySummary()); |
| 217 return o; | 218 return o; |
| 218 } | 219 } |
| 219 | 220 |
| 220 checkUnnamed1001(core.List<api.WebPropertySummary> o) { | 221 checkUnnamed1004(core.List<api.WebPropertySummary> o) { |
| 221 unittest.expect(o, unittest.hasLength(2)); | 222 unittest.expect(o, unittest.hasLength(2)); |
| 222 checkWebPropertySummary(o[0]); | 223 checkWebPropertySummary(o[0]); |
| 223 checkWebPropertySummary(o[1]); | 224 checkWebPropertySummary(o[1]); |
| 224 } | 225 } |
| 225 | 226 |
| 226 core.int buildCounterAccountSummary = 0; | 227 core.int buildCounterAccountSummary = 0; |
| 227 buildAccountSummary() { | 228 buildAccountSummary() { |
| 228 var o = new api.AccountSummary(); | 229 var o = new api.AccountSummary(); |
| 229 buildCounterAccountSummary++; | 230 buildCounterAccountSummary++; |
| 230 if (buildCounterAccountSummary < 3) { | 231 if (buildCounterAccountSummary < 3) { |
| 231 o.id = "foo"; | 232 o.id = "foo"; |
| 232 o.kind = "foo"; | 233 o.kind = "foo"; |
| 233 o.name = "foo"; | 234 o.name = "foo"; |
| 234 o.starred = true; | 235 o.starred = true; |
| 235 o.webProperties = buildUnnamed1001(); | 236 o.webProperties = buildUnnamed1004(); |
| 236 } | 237 } |
| 237 buildCounterAccountSummary--; | 238 buildCounterAccountSummary--; |
| 238 return o; | 239 return o; |
| 239 } | 240 } |
| 240 | 241 |
| 241 checkAccountSummary(api.AccountSummary o) { | 242 checkAccountSummary(api.AccountSummary o) { |
| 242 buildCounterAccountSummary++; | 243 buildCounterAccountSummary++; |
| 243 if (buildCounterAccountSummary < 3) { | 244 if (buildCounterAccountSummary < 3) { |
| 244 unittest.expect(o.id, unittest.equals('foo')); | 245 unittest.expect(o.id, unittest.equals('foo')); |
| 245 unittest.expect(o.kind, unittest.equals('foo')); | 246 unittest.expect(o.kind, unittest.equals('foo')); |
| 246 unittest.expect(o.name, unittest.equals('foo')); | 247 unittest.expect(o.name, unittest.equals('foo')); |
| 247 unittest.expect(o.starred, unittest.isTrue); | 248 unittest.expect(o.starred, unittest.isTrue); |
| 248 checkUnnamed1001(o.webProperties); | 249 checkUnnamed1004(o.webProperties); |
| 249 } | 250 } |
| 250 buildCounterAccountSummary--; | 251 buildCounterAccountSummary--; |
| 251 } | 252 } |
| 252 | 253 |
| 253 core.int buildCounterAccountTicket = 0; | 254 core.int buildCounterAccountTicket = 0; |
| 254 buildAccountTicket() { | 255 buildAccountTicket() { |
| 255 var o = new api.AccountTicket(); | 256 var o = new api.AccountTicket(); |
| 256 buildCounterAccountTicket++; | 257 buildCounterAccountTicket++; |
| 257 if (buildCounterAccountTicket < 3) { | 258 if (buildCounterAccountTicket < 3) { |
| 258 o.account = buildAccount(); | 259 o.account = buildAccount(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 272 checkAccount(o.account); | 273 checkAccount(o.account); |
| 273 unittest.expect(o.id, unittest.equals('foo')); | 274 unittest.expect(o.id, unittest.equals('foo')); |
| 274 unittest.expect(o.kind, unittest.equals('foo')); | 275 unittest.expect(o.kind, unittest.equals('foo')); |
| 275 checkProfile(o.profile); | 276 checkProfile(o.profile); |
| 276 unittest.expect(o.redirectUri, unittest.equals('foo')); | 277 unittest.expect(o.redirectUri, unittest.equals('foo')); |
| 277 checkWebproperty(o.webproperty); | 278 checkWebproperty(o.webproperty); |
| 278 } | 279 } |
| 279 buildCounterAccountTicket--; | 280 buildCounterAccountTicket--; |
| 280 } | 281 } |
| 281 | 282 |
| 282 buildUnnamed1002() { | 283 buildUnnamed1005() { |
| 283 var o = new core.List<api.Account>(); | 284 var o = new core.List<api.Account>(); |
| 284 o.add(buildAccount()); | 285 o.add(buildAccount()); |
| 285 o.add(buildAccount()); | 286 o.add(buildAccount()); |
| 286 return o; | 287 return o; |
| 287 } | 288 } |
| 288 | 289 |
| 289 checkUnnamed1002(core.List<api.Account> o) { | 290 checkUnnamed1005(core.List<api.Account> o) { |
| 290 unittest.expect(o, unittest.hasLength(2)); | 291 unittest.expect(o, unittest.hasLength(2)); |
| 291 checkAccount(o[0]); | 292 checkAccount(o[0]); |
| 292 checkAccount(o[1]); | 293 checkAccount(o[1]); |
| 293 } | 294 } |
| 294 | 295 |
| 295 core.int buildCounterAccounts = 0; | 296 core.int buildCounterAccounts = 0; |
| 296 buildAccounts() { | 297 buildAccounts() { |
| 297 var o = new api.Accounts(); | 298 var o = new api.Accounts(); |
| 298 buildCounterAccounts++; | 299 buildCounterAccounts++; |
| 299 if (buildCounterAccounts < 3) { | 300 if (buildCounterAccounts < 3) { |
| 300 o.items = buildUnnamed1002(); | 301 o.items = buildUnnamed1005(); |
| 301 o.itemsPerPage = 42; | 302 o.itemsPerPage = 42; |
| 302 o.kind = "foo"; | 303 o.kind = "foo"; |
| 303 o.nextLink = "foo"; | 304 o.nextLink = "foo"; |
| 304 o.previousLink = "foo"; | 305 o.previousLink = "foo"; |
| 305 o.startIndex = 42; | 306 o.startIndex = 42; |
| 306 o.totalResults = 42; | 307 o.totalResults = 42; |
| 307 o.username = "foo"; | 308 o.username = "foo"; |
| 308 } | 309 } |
| 309 buildCounterAccounts--; | 310 buildCounterAccounts--; |
| 310 return o; | 311 return o; |
| 311 } | 312 } |
| 312 | 313 |
| 313 checkAccounts(api.Accounts o) { | 314 checkAccounts(api.Accounts o) { |
| 314 buildCounterAccounts++; | 315 buildCounterAccounts++; |
| 315 if (buildCounterAccounts < 3) { | 316 if (buildCounterAccounts < 3) { |
| 316 checkUnnamed1002(o.items); | 317 checkUnnamed1005(o.items); |
| 317 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 318 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 318 unittest.expect(o.kind, unittest.equals('foo')); | 319 unittest.expect(o.kind, unittest.equals('foo')); |
| 319 unittest.expect(o.nextLink, unittest.equals('foo')); | 320 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 320 unittest.expect(o.previousLink, unittest.equals('foo')); | 321 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 321 unittest.expect(o.startIndex, unittest.equals(42)); | 322 unittest.expect(o.startIndex, unittest.equals(42)); |
| 322 unittest.expect(o.totalResults, unittest.equals(42)); | 323 unittest.expect(o.totalResults, unittest.equals(42)); |
| 323 unittest.expect(o.username, unittest.equals('foo')); | 324 unittest.expect(o.username, unittest.equals('foo')); |
| 324 } | 325 } |
| 325 buildCounterAccounts--; | 326 buildCounterAccounts--; |
| 326 } | 327 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 341 checkAdWordsAccount(api.AdWordsAccount o) { | 342 checkAdWordsAccount(api.AdWordsAccount o) { |
| 342 buildCounterAdWordsAccount++; | 343 buildCounterAdWordsAccount++; |
| 343 if (buildCounterAdWordsAccount < 3) { | 344 if (buildCounterAdWordsAccount < 3) { |
| 344 unittest.expect(o.autoTaggingEnabled, unittest.isTrue); | 345 unittest.expect(o.autoTaggingEnabled, unittest.isTrue); |
| 345 unittest.expect(o.customerId, unittest.equals('foo')); | 346 unittest.expect(o.customerId, unittest.equals('foo')); |
| 346 unittest.expect(o.kind, unittest.equals('foo')); | 347 unittest.expect(o.kind, unittest.equals('foo')); |
| 347 } | 348 } |
| 348 buildCounterAdWordsAccount--; | 349 buildCounterAdWordsAccount--; |
| 349 } | 350 } |
| 350 | 351 |
| 351 buildUnnamed1003() { | 352 buildUnnamed1006() { |
| 352 var o = new core.List<core.String>(); | 353 var o = new core.List<core.String>(); |
| 353 o.add("foo"); | 354 o.add("foo"); |
| 354 o.add("foo"); | 355 o.add("foo"); |
| 355 return o; | 356 return o; |
| 356 } | 357 } |
| 357 | 358 |
| 358 checkUnnamed1003(core.List<core.String> o) { | 359 checkUnnamed1006(core.List<core.String> o) { |
| 359 unittest.expect(o, unittest.hasLength(2)); | 360 unittest.expect(o, unittest.hasLength(2)); |
| 360 unittest.expect(o[0], unittest.equals('foo')); | 361 unittest.expect(o[0], unittest.equals('foo')); |
| 361 unittest.expect(o[1], unittest.equals('foo')); | 362 unittest.expect(o[1], unittest.equals('foo')); |
| 362 } | 363 } |
| 363 | 364 |
| 364 core.int buildCounterAnalyticsDataimportDeleteUploadDataRequest = 0; | 365 core.int buildCounterAnalyticsDataimportDeleteUploadDataRequest = 0; |
| 365 buildAnalyticsDataimportDeleteUploadDataRequest() { | 366 buildAnalyticsDataimportDeleteUploadDataRequest() { |
| 366 var o = new api.AnalyticsDataimportDeleteUploadDataRequest(); | 367 var o = new api.AnalyticsDataimportDeleteUploadDataRequest(); |
| 367 buildCounterAnalyticsDataimportDeleteUploadDataRequest++; | 368 buildCounterAnalyticsDataimportDeleteUploadDataRequest++; |
| 368 if (buildCounterAnalyticsDataimportDeleteUploadDataRequest < 3) { | 369 if (buildCounterAnalyticsDataimportDeleteUploadDataRequest < 3) { |
| 369 o.customDataImportUids = buildUnnamed1003(); | 370 o.customDataImportUids = buildUnnamed1006(); |
| 370 } | 371 } |
| 371 buildCounterAnalyticsDataimportDeleteUploadDataRequest--; | 372 buildCounterAnalyticsDataimportDeleteUploadDataRequest--; |
| 372 return o; | 373 return o; |
| 373 } | 374 } |
| 374 | 375 |
| 375 checkAnalyticsDataimportDeleteUploadDataRequest(api.AnalyticsDataimportDeleteUpl
oadDataRequest o) { | 376 checkAnalyticsDataimportDeleteUploadDataRequest( |
| 377 api.AnalyticsDataimportDeleteUploadDataRequest o) { |
| 376 buildCounterAnalyticsDataimportDeleteUploadDataRequest++; | 378 buildCounterAnalyticsDataimportDeleteUploadDataRequest++; |
| 377 if (buildCounterAnalyticsDataimportDeleteUploadDataRequest < 3) { | 379 if (buildCounterAnalyticsDataimportDeleteUploadDataRequest < 3) { |
| 378 checkUnnamed1003(o.customDataImportUids); | 380 checkUnnamed1006(o.customDataImportUids); |
| 379 } | 381 } |
| 380 buildCounterAnalyticsDataimportDeleteUploadDataRequest--; | 382 buildCounterAnalyticsDataimportDeleteUploadDataRequest--; |
| 381 } | 383 } |
| 382 | 384 |
| 383 buildUnnamed1004() { | 385 buildUnnamed1007() { |
| 384 var o = new core.Map<core.String, core.String>(); | 386 var o = new core.Map<core.String, core.String>(); |
| 385 o["x"] = "foo"; | 387 o["x"] = "foo"; |
| 386 o["y"] = "foo"; | 388 o["y"] = "foo"; |
| 387 return o; | 389 return o; |
| 388 } | 390 } |
| 389 | 391 |
| 390 checkUnnamed1004(core.Map<core.String, core.String> o) { | 392 checkUnnamed1007(core.Map<core.String, core.String> o) { |
| 391 unittest.expect(o, unittest.hasLength(2)); | 393 unittest.expect(o, unittest.hasLength(2)); |
| 392 unittest.expect(o["x"], unittest.equals('foo')); | 394 unittest.expect(o["x"], unittest.equals('foo')); |
| 393 unittest.expect(o["y"], unittest.equals('foo')); | 395 unittest.expect(o["y"], unittest.equals('foo')); |
| 394 } | 396 } |
| 395 | 397 |
| 396 core.int buildCounterColumn = 0; | 398 core.int buildCounterColumn = 0; |
| 397 buildColumn() { | 399 buildColumn() { |
| 398 var o = new api.Column(); | 400 var o = new api.Column(); |
| 399 buildCounterColumn++; | 401 buildCounterColumn++; |
| 400 if (buildCounterColumn < 3) { | 402 if (buildCounterColumn < 3) { |
| 401 o.attributes = buildUnnamed1004(); | 403 o.attributes = buildUnnamed1007(); |
| 402 o.id = "foo"; | 404 o.id = "foo"; |
| 403 o.kind = "foo"; | 405 o.kind = "foo"; |
| 404 } | 406 } |
| 405 buildCounterColumn--; | 407 buildCounterColumn--; |
| 406 return o; | 408 return o; |
| 407 } | 409 } |
| 408 | 410 |
| 409 checkColumn(api.Column o) { | 411 checkColumn(api.Column o) { |
| 410 buildCounterColumn++; | 412 buildCounterColumn++; |
| 411 if (buildCounterColumn < 3) { | 413 if (buildCounterColumn < 3) { |
| 412 checkUnnamed1004(o.attributes); | 414 checkUnnamed1007(o.attributes); |
| 413 unittest.expect(o.id, unittest.equals('foo')); | 415 unittest.expect(o.id, unittest.equals('foo')); |
| 414 unittest.expect(o.kind, unittest.equals('foo')); | 416 unittest.expect(o.kind, unittest.equals('foo')); |
| 415 } | 417 } |
| 416 buildCounterColumn--; | 418 buildCounterColumn--; |
| 417 } | 419 } |
| 418 | 420 |
| 419 buildUnnamed1005() { | 421 buildUnnamed1008() { |
| 420 var o = new core.List<core.String>(); | 422 var o = new core.List<core.String>(); |
| 421 o.add("foo"); | 423 o.add("foo"); |
| 422 o.add("foo"); | 424 o.add("foo"); |
| 423 return o; | 425 return o; |
| 424 } | 426 } |
| 425 | 427 |
| 426 checkUnnamed1005(core.List<core.String> o) { | 428 checkUnnamed1008(core.List<core.String> o) { |
| 427 unittest.expect(o, unittest.hasLength(2)); | 429 unittest.expect(o, unittest.hasLength(2)); |
| 428 unittest.expect(o[0], unittest.equals('foo')); | 430 unittest.expect(o[0], unittest.equals('foo')); |
| 429 unittest.expect(o[1], unittest.equals('foo')); | 431 unittest.expect(o[1], unittest.equals('foo')); |
| 430 } | 432 } |
| 431 | 433 |
| 432 buildUnnamed1006() { | 434 buildUnnamed1009() { |
| 433 var o = new core.List<api.Column>(); | 435 var o = new core.List<api.Column>(); |
| 434 o.add(buildColumn()); | 436 o.add(buildColumn()); |
| 435 o.add(buildColumn()); | 437 o.add(buildColumn()); |
| 436 return o; | 438 return o; |
| 437 } | 439 } |
| 438 | 440 |
| 439 checkUnnamed1006(core.List<api.Column> o) { | 441 checkUnnamed1009(core.List<api.Column> o) { |
| 440 unittest.expect(o, unittest.hasLength(2)); | 442 unittest.expect(o, unittest.hasLength(2)); |
| 441 checkColumn(o[0]); | 443 checkColumn(o[0]); |
| 442 checkColumn(o[1]); | 444 checkColumn(o[1]); |
| 443 } | 445 } |
| 444 | 446 |
| 445 core.int buildCounterColumns = 0; | 447 core.int buildCounterColumns = 0; |
| 446 buildColumns() { | 448 buildColumns() { |
| 447 var o = new api.Columns(); | 449 var o = new api.Columns(); |
| 448 buildCounterColumns++; | 450 buildCounterColumns++; |
| 449 if (buildCounterColumns < 3) { | 451 if (buildCounterColumns < 3) { |
| 450 o.attributeNames = buildUnnamed1005(); | 452 o.attributeNames = buildUnnamed1008(); |
| 451 o.etag = "foo"; | 453 o.etag = "foo"; |
| 452 o.items = buildUnnamed1006(); | 454 o.items = buildUnnamed1009(); |
| 453 o.kind = "foo"; | 455 o.kind = "foo"; |
| 454 o.totalResults = 42; | 456 o.totalResults = 42; |
| 455 } | 457 } |
| 456 buildCounterColumns--; | 458 buildCounterColumns--; |
| 457 return o; | 459 return o; |
| 458 } | 460 } |
| 459 | 461 |
| 460 checkColumns(api.Columns o) { | 462 checkColumns(api.Columns o) { |
| 461 buildCounterColumns++; | 463 buildCounterColumns++; |
| 462 if (buildCounterColumns < 3) { | 464 if (buildCounterColumns < 3) { |
| 463 checkUnnamed1005(o.attributeNames); | 465 checkUnnamed1008(o.attributeNames); |
| 464 unittest.expect(o.etag, unittest.equals('foo')); | 466 unittest.expect(o.etag, unittest.equals('foo')); |
| 465 checkUnnamed1006(o.items); | 467 checkUnnamed1009(o.items); |
| 466 unittest.expect(o.kind, unittest.equals('foo')); | 468 unittest.expect(o.kind, unittest.equals('foo')); |
| 467 unittest.expect(o.totalResults, unittest.equals(42)); | 469 unittest.expect(o.totalResults, unittest.equals(42)); |
| 468 } | 470 } |
| 469 buildCounterColumns--; | 471 buildCounterColumns--; |
| 470 } | 472 } |
| 471 | 473 |
| 472 core.int buildCounterCustomDataSourceChildLink = 0; | 474 core.int buildCounterCustomDataSourceChildLink = 0; |
| 473 buildCustomDataSourceChildLink() { | 475 buildCustomDataSourceChildLink() { |
| 474 var o = new api.CustomDataSourceChildLink(); | 476 var o = new api.CustomDataSourceChildLink(); |
| 475 buildCounterCustomDataSourceChildLink++; | 477 buildCounterCustomDataSourceChildLink++; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 504 | 506 |
| 505 checkCustomDataSourceParentLink(api.CustomDataSourceParentLink o) { | 507 checkCustomDataSourceParentLink(api.CustomDataSourceParentLink o) { |
| 506 buildCounterCustomDataSourceParentLink++; | 508 buildCounterCustomDataSourceParentLink++; |
| 507 if (buildCounterCustomDataSourceParentLink < 3) { | 509 if (buildCounterCustomDataSourceParentLink < 3) { |
| 508 unittest.expect(o.href, unittest.equals('foo')); | 510 unittest.expect(o.href, unittest.equals('foo')); |
| 509 unittest.expect(o.type, unittest.equals('foo')); | 511 unittest.expect(o.type, unittest.equals('foo')); |
| 510 } | 512 } |
| 511 buildCounterCustomDataSourceParentLink--; | 513 buildCounterCustomDataSourceParentLink--; |
| 512 } | 514 } |
| 513 | 515 |
| 514 buildUnnamed1007() { | 516 buildUnnamed1010() { |
| 515 var o = new core.List<core.String>(); | 517 var o = new core.List<core.String>(); |
| 516 o.add("foo"); | 518 o.add("foo"); |
| 517 o.add("foo"); | 519 o.add("foo"); |
| 518 return o; | 520 return o; |
| 519 } | 521 } |
| 520 | 522 |
| 521 checkUnnamed1007(core.List<core.String> o) { | 523 checkUnnamed1010(core.List<core.String> o) { |
| 522 unittest.expect(o, unittest.hasLength(2)); | 524 unittest.expect(o, unittest.hasLength(2)); |
| 523 unittest.expect(o[0], unittest.equals('foo')); | 525 unittest.expect(o[0], unittest.equals('foo')); |
| 524 unittest.expect(o[1], unittest.equals('foo')); | 526 unittest.expect(o[1], unittest.equals('foo')); |
| 525 } | 527 } |
| 526 | 528 |
| 527 buildUnnamed1008() { | 529 buildUnnamed1011() { |
| 528 var o = new core.List<core.String>(); | 530 var o = new core.List<core.String>(); |
| 529 o.add("foo"); | 531 o.add("foo"); |
| 530 o.add("foo"); | 532 o.add("foo"); |
| 531 return o; | 533 return o; |
| 532 } | 534 } |
| 533 | 535 |
| 534 checkUnnamed1008(core.List<core.String> o) { | 536 checkUnnamed1011(core.List<core.String> o) { |
| 535 unittest.expect(o, unittest.hasLength(2)); | 537 unittest.expect(o, unittest.hasLength(2)); |
| 536 unittest.expect(o[0], unittest.equals('foo')); | 538 unittest.expect(o[0], unittest.equals('foo')); |
| 537 unittest.expect(o[1], unittest.equals('foo')); | 539 unittest.expect(o[1], unittest.equals('foo')); |
| 538 } | 540 } |
| 539 | 541 |
| 540 core.int buildCounterCustomDataSource = 0; | 542 core.int buildCounterCustomDataSource = 0; |
| 541 buildCustomDataSource() { | 543 buildCustomDataSource() { |
| 542 var o = new api.CustomDataSource(); | 544 var o = new api.CustomDataSource(); |
| 543 buildCounterCustomDataSource++; | 545 buildCounterCustomDataSource++; |
| 544 if (buildCounterCustomDataSource < 3) { | 546 if (buildCounterCustomDataSource < 3) { |
| 545 o.accountId = "foo"; | 547 o.accountId = "foo"; |
| 546 o.childLink = buildCustomDataSourceChildLink(); | 548 o.childLink = buildCustomDataSourceChildLink(); |
| 547 o.created = core.DateTime.parse("2002-02-27T14:01:02"); | 549 o.created = core.DateTime.parse("2002-02-27T14:01:02"); |
| 548 o.description = "foo"; | 550 o.description = "foo"; |
| 549 o.id = "foo"; | 551 o.id = "foo"; |
| 550 o.importBehavior = "foo"; | 552 o.importBehavior = "foo"; |
| 551 o.kind = "foo"; | 553 o.kind = "foo"; |
| 552 o.name = "foo"; | 554 o.name = "foo"; |
| 553 o.parentLink = buildCustomDataSourceParentLink(); | 555 o.parentLink = buildCustomDataSourceParentLink(); |
| 554 o.profilesLinked = buildUnnamed1007(); | 556 o.profilesLinked = buildUnnamed1010(); |
| 555 o.schema = buildUnnamed1008(); | 557 o.schema = buildUnnamed1011(); |
| 556 o.selfLink = "foo"; | 558 o.selfLink = "foo"; |
| 557 o.type = "foo"; | 559 o.type = "foo"; |
| 558 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 560 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 559 o.uploadType = "foo"; | 561 o.uploadType = "foo"; |
| 560 o.webPropertyId = "foo"; | 562 o.webPropertyId = "foo"; |
| 561 } | 563 } |
| 562 buildCounterCustomDataSource--; | 564 buildCounterCustomDataSource--; |
| 563 return o; | 565 return o; |
| 564 } | 566 } |
| 565 | 567 |
| 566 checkCustomDataSource(api.CustomDataSource o) { | 568 checkCustomDataSource(api.CustomDataSource o) { |
| 567 buildCounterCustomDataSource++; | 569 buildCounterCustomDataSource++; |
| 568 if (buildCounterCustomDataSource < 3) { | 570 if (buildCounterCustomDataSource < 3) { |
| 569 unittest.expect(o.accountId, unittest.equals('foo')); | 571 unittest.expect(o.accountId, unittest.equals('foo')); |
| 570 checkCustomDataSourceChildLink(o.childLink); | 572 checkCustomDataSourceChildLink(o.childLink); |
| 571 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 573 unittest.expect( |
| 574 o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 572 unittest.expect(o.description, unittest.equals('foo')); | 575 unittest.expect(o.description, unittest.equals('foo')); |
| 573 unittest.expect(o.id, unittest.equals('foo')); | 576 unittest.expect(o.id, unittest.equals('foo')); |
| 574 unittest.expect(o.importBehavior, unittest.equals('foo')); | 577 unittest.expect(o.importBehavior, unittest.equals('foo')); |
| 575 unittest.expect(o.kind, unittest.equals('foo')); | 578 unittest.expect(o.kind, unittest.equals('foo')); |
| 576 unittest.expect(o.name, unittest.equals('foo')); | 579 unittest.expect(o.name, unittest.equals('foo')); |
| 577 checkCustomDataSourceParentLink(o.parentLink); | 580 checkCustomDataSourceParentLink(o.parentLink); |
| 578 checkUnnamed1007(o.profilesLinked); | 581 checkUnnamed1010(o.profilesLinked); |
| 579 checkUnnamed1008(o.schema); | 582 checkUnnamed1011(o.schema); |
| 580 unittest.expect(o.selfLink, unittest.equals('foo')); | 583 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 581 unittest.expect(o.type, unittest.equals('foo')); | 584 unittest.expect(o.type, unittest.equals('foo')); |
| 582 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 585 unittest.expect( |
| 586 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 583 unittest.expect(o.uploadType, unittest.equals('foo')); | 587 unittest.expect(o.uploadType, unittest.equals('foo')); |
| 584 unittest.expect(o.webPropertyId, unittest.equals('foo')); | 588 unittest.expect(o.webPropertyId, unittest.equals('foo')); |
| 585 } | 589 } |
| 586 buildCounterCustomDataSource--; | 590 buildCounterCustomDataSource--; |
| 587 } | 591 } |
| 588 | 592 |
| 589 buildUnnamed1009() { | 593 buildUnnamed1012() { |
| 590 var o = new core.List<api.CustomDataSource>(); | 594 var o = new core.List<api.CustomDataSource>(); |
| 591 o.add(buildCustomDataSource()); | 595 o.add(buildCustomDataSource()); |
| 592 o.add(buildCustomDataSource()); | 596 o.add(buildCustomDataSource()); |
| 593 return o; | 597 return o; |
| 594 } | 598 } |
| 595 | 599 |
| 596 checkUnnamed1009(core.List<api.CustomDataSource> o) { | 600 checkUnnamed1012(core.List<api.CustomDataSource> o) { |
| 597 unittest.expect(o, unittest.hasLength(2)); | 601 unittest.expect(o, unittest.hasLength(2)); |
| 598 checkCustomDataSource(o[0]); | 602 checkCustomDataSource(o[0]); |
| 599 checkCustomDataSource(o[1]); | 603 checkCustomDataSource(o[1]); |
| 600 } | 604 } |
| 601 | 605 |
| 602 core.int buildCounterCustomDataSources = 0; | 606 core.int buildCounterCustomDataSources = 0; |
| 603 buildCustomDataSources() { | 607 buildCustomDataSources() { |
| 604 var o = new api.CustomDataSources(); | 608 var o = new api.CustomDataSources(); |
| 605 buildCounterCustomDataSources++; | 609 buildCounterCustomDataSources++; |
| 606 if (buildCounterCustomDataSources < 3) { | 610 if (buildCounterCustomDataSources < 3) { |
| 607 o.items = buildUnnamed1009(); | 611 o.items = buildUnnamed1012(); |
| 608 o.itemsPerPage = 42; | 612 o.itemsPerPage = 42; |
| 609 o.kind = "foo"; | 613 o.kind = "foo"; |
| 610 o.nextLink = "foo"; | 614 o.nextLink = "foo"; |
| 611 o.previousLink = "foo"; | 615 o.previousLink = "foo"; |
| 612 o.startIndex = 42; | 616 o.startIndex = 42; |
| 613 o.totalResults = 42; | 617 o.totalResults = 42; |
| 614 o.username = "foo"; | 618 o.username = "foo"; |
| 615 } | 619 } |
| 616 buildCounterCustomDataSources--; | 620 buildCounterCustomDataSources--; |
| 617 return o; | 621 return o; |
| 618 } | 622 } |
| 619 | 623 |
| 620 checkCustomDataSources(api.CustomDataSources o) { | 624 checkCustomDataSources(api.CustomDataSources o) { |
| 621 buildCounterCustomDataSources++; | 625 buildCounterCustomDataSources++; |
| 622 if (buildCounterCustomDataSources < 3) { | 626 if (buildCounterCustomDataSources < 3) { |
| 623 checkUnnamed1009(o.items); | 627 checkUnnamed1012(o.items); |
| 624 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 628 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 625 unittest.expect(o.kind, unittest.equals('foo')); | 629 unittest.expect(o.kind, unittest.equals('foo')); |
| 626 unittest.expect(o.nextLink, unittest.equals('foo')); | 630 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 627 unittest.expect(o.previousLink, unittest.equals('foo')); | 631 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 628 unittest.expect(o.startIndex, unittest.equals(42)); | 632 unittest.expect(o.startIndex, unittest.equals(42)); |
| 629 unittest.expect(o.totalResults, unittest.equals(42)); | 633 unittest.expect(o.totalResults, unittest.equals(42)); |
| 630 unittest.expect(o.username, unittest.equals('foo')); | 634 unittest.expect(o.username, unittest.equals('foo')); |
| 631 } | 635 } |
| 632 buildCounterCustomDataSources--; | 636 buildCounterCustomDataSources--; |
| 633 } | 637 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 } | 677 } |
| 674 buildCounterCustomDimension--; | 678 buildCounterCustomDimension--; |
| 675 return o; | 679 return o; |
| 676 } | 680 } |
| 677 | 681 |
| 678 checkCustomDimension(api.CustomDimension o) { | 682 checkCustomDimension(api.CustomDimension o) { |
| 679 buildCounterCustomDimension++; | 683 buildCounterCustomDimension++; |
| 680 if (buildCounterCustomDimension < 3) { | 684 if (buildCounterCustomDimension < 3) { |
| 681 unittest.expect(o.accountId, unittest.equals('foo')); | 685 unittest.expect(o.accountId, unittest.equals('foo')); |
| 682 unittest.expect(o.active, unittest.isTrue); | 686 unittest.expect(o.active, unittest.isTrue); |
| 683 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 687 unittest.expect( |
| 688 o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 684 unittest.expect(o.id, unittest.equals('foo')); | 689 unittest.expect(o.id, unittest.equals('foo')); |
| 685 unittest.expect(o.index, unittest.equals(42)); | 690 unittest.expect(o.index, unittest.equals(42)); |
| 686 unittest.expect(o.kind, unittest.equals('foo')); | 691 unittest.expect(o.kind, unittest.equals('foo')); |
| 687 unittest.expect(o.name, unittest.equals('foo')); | 692 unittest.expect(o.name, unittest.equals('foo')); |
| 688 checkCustomDimensionParentLink(o.parentLink); | 693 checkCustomDimensionParentLink(o.parentLink); |
| 689 unittest.expect(o.scope, unittest.equals('foo')); | 694 unittest.expect(o.scope, unittest.equals('foo')); |
| 690 unittest.expect(o.selfLink, unittest.equals('foo')); | 695 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 691 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 696 unittest.expect( |
| 697 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 692 unittest.expect(o.webPropertyId, unittest.equals('foo')); | 698 unittest.expect(o.webPropertyId, unittest.equals('foo')); |
| 693 } | 699 } |
| 694 buildCounterCustomDimension--; | 700 buildCounterCustomDimension--; |
| 695 } | 701 } |
| 696 | 702 |
| 697 buildUnnamed1010() { | 703 buildUnnamed1013() { |
| 698 var o = new core.List<api.CustomDimension>(); | 704 var o = new core.List<api.CustomDimension>(); |
| 699 o.add(buildCustomDimension()); | 705 o.add(buildCustomDimension()); |
| 700 o.add(buildCustomDimension()); | 706 o.add(buildCustomDimension()); |
| 701 return o; | 707 return o; |
| 702 } | 708 } |
| 703 | 709 |
| 704 checkUnnamed1010(core.List<api.CustomDimension> o) { | 710 checkUnnamed1013(core.List<api.CustomDimension> o) { |
| 705 unittest.expect(o, unittest.hasLength(2)); | 711 unittest.expect(o, unittest.hasLength(2)); |
| 706 checkCustomDimension(o[0]); | 712 checkCustomDimension(o[0]); |
| 707 checkCustomDimension(o[1]); | 713 checkCustomDimension(o[1]); |
| 708 } | 714 } |
| 709 | 715 |
| 710 core.int buildCounterCustomDimensions = 0; | 716 core.int buildCounterCustomDimensions = 0; |
| 711 buildCustomDimensions() { | 717 buildCustomDimensions() { |
| 712 var o = new api.CustomDimensions(); | 718 var o = new api.CustomDimensions(); |
| 713 buildCounterCustomDimensions++; | 719 buildCounterCustomDimensions++; |
| 714 if (buildCounterCustomDimensions < 3) { | 720 if (buildCounterCustomDimensions < 3) { |
| 715 o.items = buildUnnamed1010(); | 721 o.items = buildUnnamed1013(); |
| 716 o.itemsPerPage = 42; | 722 o.itemsPerPage = 42; |
| 717 o.kind = "foo"; | 723 o.kind = "foo"; |
| 718 o.nextLink = "foo"; | 724 o.nextLink = "foo"; |
| 719 o.previousLink = "foo"; | 725 o.previousLink = "foo"; |
| 720 o.startIndex = 42; | 726 o.startIndex = 42; |
| 721 o.totalResults = 42; | 727 o.totalResults = 42; |
| 722 o.username = "foo"; | 728 o.username = "foo"; |
| 723 } | 729 } |
| 724 buildCounterCustomDimensions--; | 730 buildCounterCustomDimensions--; |
| 725 return o; | 731 return o; |
| 726 } | 732 } |
| 727 | 733 |
| 728 checkCustomDimensions(api.CustomDimensions o) { | 734 checkCustomDimensions(api.CustomDimensions o) { |
| 729 buildCounterCustomDimensions++; | 735 buildCounterCustomDimensions++; |
| 730 if (buildCounterCustomDimensions < 3) { | 736 if (buildCounterCustomDimensions < 3) { |
| 731 checkUnnamed1010(o.items); | 737 checkUnnamed1013(o.items); |
| 732 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 738 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 733 unittest.expect(o.kind, unittest.equals('foo')); | 739 unittest.expect(o.kind, unittest.equals('foo')); |
| 734 unittest.expect(o.nextLink, unittest.equals('foo')); | 740 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 735 unittest.expect(o.previousLink, unittest.equals('foo')); | 741 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 736 unittest.expect(o.startIndex, unittest.equals(42)); | 742 unittest.expect(o.startIndex, unittest.equals(42)); |
| 737 unittest.expect(o.totalResults, unittest.equals(42)); | 743 unittest.expect(o.totalResults, unittest.equals(42)); |
| 738 unittest.expect(o.username, unittest.equals('foo')); | 744 unittest.expect(o.username, unittest.equals('foo')); |
| 739 } | 745 } |
| 740 buildCounterCustomDimensions--; | 746 buildCounterCustomDimensions--; |
| 741 } | 747 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 } | 790 } |
| 785 buildCounterCustomMetric--; | 791 buildCounterCustomMetric--; |
| 786 return o; | 792 return o; |
| 787 } | 793 } |
| 788 | 794 |
| 789 checkCustomMetric(api.CustomMetric o) { | 795 checkCustomMetric(api.CustomMetric o) { |
| 790 buildCounterCustomMetric++; | 796 buildCounterCustomMetric++; |
| 791 if (buildCounterCustomMetric < 3) { | 797 if (buildCounterCustomMetric < 3) { |
| 792 unittest.expect(o.accountId, unittest.equals('foo')); | 798 unittest.expect(o.accountId, unittest.equals('foo')); |
| 793 unittest.expect(o.active, unittest.isTrue); | 799 unittest.expect(o.active, unittest.isTrue); |
| 794 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 800 unittest.expect( |
| 801 o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 795 unittest.expect(o.id, unittest.equals('foo')); | 802 unittest.expect(o.id, unittest.equals('foo')); |
| 796 unittest.expect(o.index, unittest.equals(42)); | 803 unittest.expect(o.index, unittest.equals(42)); |
| 797 unittest.expect(o.kind, unittest.equals('foo')); | 804 unittest.expect(o.kind, unittest.equals('foo')); |
| 798 unittest.expect(o.maxValue, unittest.equals('foo')); | 805 unittest.expect(o.maxValue, unittest.equals('foo')); |
| 799 unittest.expect(o.minValue, unittest.equals('foo')); | 806 unittest.expect(o.minValue, unittest.equals('foo')); |
| 800 unittest.expect(o.name, unittest.equals('foo')); | 807 unittest.expect(o.name, unittest.equals('foo')); |
| 801 checkCustomMetricParentLink(o.parentLink); | 808 checkCustomMetricParentLink(o.parentLink); |
| 802 unittest.expect(o.scope, unittest.equals('foo')); | 809 unittest.expect(o.scope, unittest.equals('foo')); |
| 803 unittest.expect(o.selfLink, unittest.equals('foo')); | 810 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 804 unittest.expect(o.type, unittest.equals('foo')); | 811 unittest.expect(o.type, unittest.equals('foo')); |
| 805 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 812 unittest.expect( |
| 813 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 806 unittest.expect(o.webPropertyId, unittest.equals('foo')); | 814 unittest.expect(o.webPropertyId, unittest.equals('foo')); |
| 807 } | 815 } |
| 808 buildCounterCustomMetric--; | 816 buildCounterCustomMetric--; |
| 809 } | 817 } |
| 810 | 818 |
| 811 buildUnnamed1011() { | 819 buildUnnamed1014() { |
| 812 var o = new core.List<api.CustomMetric>(); | 820 var o = new core.List<api.CustomMetric>(); |
| 813 o.add(buildCustomMetric()); | 821 o.add(buildCustomMetric()); |
| 814 o.add(buildCustomMetric()); | 822 o.add(buildCustomMetric()); |
| 815 return o; | 823 return o; |
| 816 } | 824 } |
| 817 | 825 |
| 818 checkUnnamed1011(core.List<api.CustomMetric> o) { | 826 checkUnnamed1014(core.List<api.CustomMetric> o) { |
| 819 unittest.expect(o, unittest.hasLength(2)); | 827 unittest.expect(o, unittest.hasLength(2)); |
| 820 checkCustomMetric(o[0]); | 828 checkCustomMetric(o[0]); |
| 821 checkCustomMetric(o[1]); | 829 checkCustomMetric(o[1]); |
| 822 } | 830 } |
| 823 | 831 |
| 824 core.int buildCounterCustomMetrics = 0; | 832 core.int buildCounterCustomMetrics = 0; |
| 825 buildCustomMetrics() { | 833 buildCustomMetrics() { |
| 826 var o = new api.CustomMetrics(); | 834 var o = new api.CustomMetrics(); |
| 827 buildCounterCustomMetrics++; | 835 buildCounterCustomMetrics++; |
| 828 if (buildCounterCustomMetrics < 3) { | 836 if (buildCounterCustomMetrics < 3) { |
| 829 o.items = buildUnnamed1011(); | 837 o.items = buildUnnamed1014(); |
| 830 o.itemsPerPage = 42; | 838 o.itemsPerPage = 42; |
| 831 o.kind = "foo"; | 839 o.kind = "foo"; |
| 832 o.nextLink = "foo"; | 840 o.nextLink = "foo"; |
| 833 o.previousLink = "foo"; | 841 o.previousLink = "foo"; |
| 834 o.startIndex = 42; | 842 o.startIndex = 42; |
| 835 o.totalResults = 42; | 843 o.totalResults = 42; |
| 836 o.username = "foo"; | 844 o.username = "foo"; |
| 837 } | 845 } |
| 838 buildCounterCustomMetrics--; | 846 buildCounterCustomMetrics--; |
| 839 return o; | 847 return o; |
| 840 } | 848 } |
| 841 | 849 |
| 842 checkCustomMetrics(api.CustomMetrics o) { | 850 checkCustomMetrics(api.CustomMetrics o) { |
| 843 buildCounterCustomMetrics++; | 851 buildCounterCustomMetrics++; |
| 844 if (buildCounterCustomMetrics < 3) { | 852 if (buildCounterCustomMetrics < 3) { |
| 845 checkUnnamed1011(o.items); | 853 checkUnnamed1014(o.items); |
| 846 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 854 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 847 unittest.expect(o.kind, unittest.equals('foo')); | 855 unittest.expect(o.kind, unittest.equals('foo')); |
| 848 unittest.expect(o.nextLink, unittest.equals('foo')); | 856 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 849 unittest.expect(o.previousLink, unittest.equals('foo')); | 857 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 850 unittest.expect(o.startIndex, unittest.equals(42)); | 858 unittest.expect(o.startIndex, unittest.equals(42)); |
| 851 unittest.expect(o.totalResults, unittest.equals(42)); | 859 unittest.expect(o.totalResults, unittest.equals(42)); |
| 852 unittest.expect(o.username, unittest.equals('foo')); | 860 unittest.expect(o.username, unittest.equals('foo')); |
| 853 } | 861 } |
| 854 buildCounterCustomMetrics--; | 862 buildCounterCustomMetrics--; |
| 855 } | 863 } |
| 856 | 864 |
| 857 buildUnnamed1012() { | 865 buildUnnamed1015() { |
| 858 var o = new core.List<api.AdWordsAccount>(); | 866 var o = new core.List<api.AdWordsAccount>(); |
| 859 o.add(buildAdWordsAccount()); | 867 o.add(buildAdWordsAccount()); |
| 860 o.add(buildAdWordsAccount()); | 868 o.add(buildAdWordsAccount()); |
| 861 return o; | 869 return o; |
| 862 } | 870 } |
| 863 | 871 |
| 864 checkUnnamed1012(core.List<api.AdWordsAccount> o) { | 872 checkUnnamed1015(core.List<api.AdWordsAccount> o) { |
| 865 unittest.expect(o, unittest.hasLength(2)); | 873 unittest.expect(o, unittest.hasLength(2)); |
| 866 checkAdWordsAccount(o[0]); | 874 checkAdWordsAccount(o[0]); |
| 867 checkAdWordsAccount(o[1]); | 875 checkAdWordsAccount(o[1]); |
| 868 } | 876 } |
| 869 | 877 |
| 870 core.int buildCounterEntityAdWordsLinkEntity = 0; | 878 core.int buildCounterEntityAdWordsLinkEntity = 0; |
| 871 buildEntityAdWordsLinkEntity() { | 879 buildEntityAdWordsLinkEntity() { |
| 872 var o = new api.EntityAdWordsLinkEntity(); | 880 var o = new api.EntityAdWordsLinkEntity(); |
| 873 buildCounterEntityAdWordsLinkEntity++; | 881 buildCounterEntityAdWordsLinkEntity++; |
| 874 if (buildCounterEntityAdWordsLinkEntity < 3) { | 882 if (buildCounterEntityAdWordsLinkEntity < 3) { |
| 875 o.webPropertyRef = buildWebPropertyRef(); | 883 o.webPropertyRef = buildWebPropertyRef(); |
| 876 } | 884 } |
| 877 buildCounterEntityAdWordsLinkEntity--; | 885 buildCounterEntityAdWordsLinkEntity--; |
| 878 return o; | 886 return o; |
| 879 } | 887 } |
| 880 | 888 |
| 881 checkEntityAdWordsLinkEntity(api.EntityAdWordsLinkEntity o) { | 889 checkEntityAdWordsLinkEntity(api.EntityAdWordsLinkEntity o) { |
| 882 buildCounterEntityAdWordsLinkEntity++; | 890 buildCounterEntityAdWordsLinkEntity++; |
| 883 if (buildCounterEntityAdWordsLinkEntity < 3) { | 891 if (buildCounterEntityAdWordsLinkEntity < 3) { |
| 884 checkWebPropertyRef(o.webPropertyRef); | 892 checkWebPropertyRef(o.webPropertyRef); |
| 885 } | 893 } |
| 886 buildCounterEntityAdWordsLinkEntity--; | 894 buildCounterEntityAdWordsLinkEntity--; |
| 887 } | 895 } |
| 888 | 896 |
| 889 buildUnnamed1013() { | 897 buildUnnamed1016() { |
| 890 var o = new core.List<core.String>(); | 898 var o = new core.List<core.String>(); |
| 891 o.add("foo"); | 899 o.add("foo"); |
| 892 o.add("foo"); | 900 o.add("foo"); |
| 893 return o; | 901 return o; |
| 894 } | 902 } |
| 895 | 903 |
| 896 checkUnnamed1013(core.List<core.String> o) { | 904 checkUnnamed1016(core.List<core.String> o) { |
| 897 unittest.expect(o, unittest.hasLength(2)); | 905 unittest.expect(o, unittest.hasLength(2)); |
| 898 unittest.expect(o[0], unittest.equals('foo')); | 906 unittest.expect(o[0], unittest.equals('foo')); |
| 899 unittest.expect(o[1], unittest.equals('foo')); | 907 unittest.expect(o[1], unittest.equals('foo')); |
| 900 } | 908 } |
| 901 | 909 |
| 902 core.int buildCounterEntityAdWordsLink = 0; | 910 core.int buildCounterEntityAdWordsLink = 0; |
| 903 buildEntityAdWordsLink() { | 911 buildEntityAdWordsLink() { |
| 904 var o = new api.EntityAdWordsLink(); | 912 var o = new api.EntityAdWordsLink(); |
| 905 buildCounterEntityAdWordsLink++; | 913 buildCounterEntityAdWordsLink++; |
| 906 if (buildCounterEntityAdWordsLink < 3) { | 914 if (buildCounterEntityAdWordsLink < 3) { |
| 907 o.adWordsAccounts = buildUnnamed1012(); | 915 o.adWordsAccounts = buildUnnamed1015(); |
| 908 o.entity = buildEntityAdWordsLinkEntity(); | 916 o.entity = buildEntityAdWordsLinkEntity(); |
| 909 o.id = "foo"; | 917 o.id = "foo"; |
| 910 o.kind = "foo"; | 918 o.kind = "foo"; |
| 911 o.name = "foo"; | 919 o.name = "foo"; |
| 912 o.profileIds = buildUnnamed1013(); | 920 o.profileIds = buildUnnamed1016(); |
| 913 o.selfLink = "foo"; | 921 o.selfLink = "foo"; |
| 914 } | 922 } |
| 915 buildCounterEntityAdWordsLink--; | 923 buildCounterEntityAdWordsLink--; |
| 916 return o; | 924 return o; |
| 917 } | 925 } |
| 918 | 926 |
| 919 checkEntityAdWordsLink(api.EntityAdWordsLink o) { | 927 checkEntityAdWordsLink(api.EntityAdWordsLink o) { |
| 920 buildCounterEntityAdWordsLink++; | 928 buildCounterEntityAdWordsLink++; |
| 921 if (buildCounterEntityAdWordsLink < 3) { | 929 if (buildCounterEntityAdWordsLink < 3) { |
| 922 checkUnnamed1012(o.adWordsAccounts); | 930 checkUnnamed1015(o.adWordsAccounts); |
| 923 checkEntityAdWordsLinkEntity(o.entity); | 931 checkEntityAdWordsLinkEntity(o.entity); |
| 924 unittest.expect(o.id, unittest.equals('foo')); | 932 unittest.expect(o.id, unittest.equals('foo')); |
| 925 unittest.expect(o.kind, unittest.equals('foo')); | 933 unittest.expect(o.kind, unittest.equals('foo')); |
| 926 unittest.expect(o.name, unittest.equals('foo')); | 934 unittest.expect(o.name, unittest.equals('foo')); |
| 927 checkUnnamed1013(o.profileIds); | 935 checkUnnamed1016(o.profileIds); |
| 928 unittest.expect(o.selfLink, unittest.equals('foo')); | 936 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 929 } | 937 } |
| 930 buildCounterEntityAdWordsLink--; | 938 buildCounterEntityAdWordsLink--; |
| 931 } | 939 } |
| 932 | 940 |
| 933 buildUnnamed1014() { | 941 buildUnnamed1017() { |
| 934 var o = new core.List<api.EntityAdWordsLink>(); | 942 var o = new core.List<api.EntityAdWordsLink>(); |
| 935 o.add(buildEntityAdWordsLink()); | 943 o.add(buildEntityAdWordsLink()); |
| 936 o.add(buildEntityAdWordsLink()); | 944 o.add(buildEntityAdWordsLink()); |
| 937 return o; | 945 return o; |
| 938 } | 946 } |
| 939 | 947 |
| 940 checkUnnamed1014(core.List<api.EntityAdWordsLink> o) { | 948 checkUnnamed1017(core.List<api.EntityAdWordsLink> o) { |
| 941 unittest.expect(o, unittest.hasLength(2)); | 949 unittest.expect(o, unittest.hasLength(2)); |
| 942 checkEntityAdWordsLink(o[0]); | 950 checkEntityAdWordsLink(o[0]); |
| 943 checkEntityAdWordsLink(o[1]); | 951 checkEntityAdWordsLink(o[1]); |
| 944 } | 952 } |
| 945 | 953 |
| 946 core.int buildCounterEntityAdWordsLinks = 0; | 954 core.int buildCounterEntityAdWordsLinks = 0; |
| 947 buildEntityAdWordsLinks() { | 955 buildEntityAdWordsLinks() { |
| 948 var o = new api.EntityAdWordsLinks(); | 956 var o = new api.EntityAdWordsLinks(); |
| 949 buildCounterEntityAdWordsLinks++; | 957 buildCounterEntityAdWordsLinks++; |
| 950 if (buildCounterEntityAdWordsLinks < 3) { | 958 if (buildCounterEntityAdWordsLinks < 3) { |
| 951 o.items = buildUnnamed1014(); | 959 o.items = buildUnnamed1017(); |
| 952 o.itemsPerPage = 42; | 960 o.itemsPerPage = 42; |
| 953 o.kind = "foo"; | 961 o.kind = "foo"; |
| 954 o.nextLink = "foo"; | 962 o.nextLink = "foo"; |
| 955 o.previousLink = "foo"; | 963 o.previousLink = "foo"; |
| 956 o.startIndex = 42; | 964 o.startIndex = 42; |
| 957 o.totalResults = 42; | 965 o.totalResults = 42; |
| 958 } | 966 } |
| 959 buildCounterEntityAdWordsLinks--; | 967 buildCounterEntityAdWordsLinks--; |
| 960 return o; | 968 return o; |
| 961 } | 969 } |
| 962 | 970 |
| 963 checkEntityAdWordsLinks(api.EntityAdWordsLinks o) { | 971 checkEntityAdWordsLinks(api.EntityAdWordsLinks o) { |
| 964 buildCounterEntityAdWordsLinks++; | 972 buildCounterEntityAdWordsLinks++; |
| 965 if (buildCounterEntityAdWordsLinks < 3) { | 973 if (buildCounterEntityAdWordsLinks < 3) { |
| 966 checkUnnamed1014(o.items); | 974 checkUnnamed1017(o.items); |
| 967 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 975 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 968 unittest.expect(o.kind, unittest.equals('foo')); | 976 unittest.expect(o.kind, unittest.equals('foo')); |
| 969 unittest.expect(o.nextLink, unittest.equals('foo')); | 977 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 970 unittest.expect(o.previousLink, unittest.equals('foo')); | 978 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 971 unittest.expect(o.startIndex, unittest.equals(42)); | 979 unittest.expect(o.startIndex, unittest.equals(42)); |
| 972 unittest.expect(o.totalResults, unittest.equals(42)); | 980 unittest.expect(o.totalResults, unittest.equals(42)); |
| 973 } | 981 } |
| 974 buildCounterEntityAdWordsLinks--; | 982 buildCounterEntityAdWordsLinks--; |
| 975 } | 983 } |
| 976 | 984 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 990 checkEntityUserLinkEntity(api.EntityUserLinkEntity o) { | 998 checkEntityUserLinkEntity(api.EntityUserLinkEntity o) { |
| 991 buildCounterEntityUserLinkEntity++; | 999 buildCounterEntityUserLinkEntity++; |
| 992 if (buildCounterEntityUserLinkEntity < 3) { | 1000 if (buildCounterEntityUserLinkEntity < 3) { |
| 993 checkAccountRef(o.accountRef); | 1001 checkAccountRef(o.accountRef); |
| 994 checkProfileRef(o.profileRef); | 1002 checkProfileRef(o.profileRef); |
| 995 checkWebPropertyRef(o.webPropertyRef); | 1003 checkWebPropertyRef(o.webPropertyRef); |
| 996 } | 1004 } |
| 997 buildCounterEntityUserLinkEntity--; | 1005 buildCounterEntityUserLinkEntity--; |
| 998 } | 1006 } |
| 999 | 1007 |
| 1000 buildUnnamed1015() { | 1008 buildUnnamed1018() { |
| 1001 var o = new core.List<core.String>(); | 1009 var o = new core.List<core.String>(); |
| 1002 o.add("foo"); | 1010 o.add("foo"); |
| 1003 o.add("foo"); | 1011 o.add("foo"); |
| 1004 return o; | 1012 return o; |
| 1005 } | 1013 } |
| 1006 | 1014 |
| 1007 checkUnnamed1015(core.List<core.String> o) { | 1015 checkUnnamed1018(core.List<core.String> o) { |
| 1008 unittest.expect(o, unittest.hasLength(2)); | 1016 unittest.expect(o, unittest.hasLength(2)); |
| 1009 unittest.expect(o[0], unittest.equals('foo')); | 1017 unittest.expect(o[0], unittest.equals('foo')); |
| 1010 unittest.expect(o[1], unittest.equals('foo')); | 1018 unittest.expect(o[1], unittest.equals('foo')); |
| 1011 } | 1019 } |
| 1012 | 1020 |
| 1013 buildUnnamed1016() { | 1021 buildUnnamed1019() { |
| 1014 var o = new core.List<core.String>(); | 1022 var o = new core.List<core.String>(); |
| 1015 o.add("foo"); | 1023 o.add("foo"); |
| 1016 o.add("foo"); | 1024 o.add("foo"); |
| 1017 return o; | 1025 return o; |
| 1018 } | 1026 } |
| 1019 | 1027 |
| 1020 checkUnnamed1016(core.List<core.String> o) { | 1028 checkUnnamed1019(core.List<core.String> o) { |
| 1021 unittest.expect(o, unittest.hasLength(2)); | 1029 unittest.expect(o, unittest.hasLength(2)); |
| 1022 unittest.expect(o[0], unittest.equals('foo')); | 1030 unittest.expect(o[0], unittest.equals('foo')); |
| 1023 unittest.expect(o[1], unittest.equals('foo')); | 1031 unittest.expect(o[1], unittest.equals('foo')); |
| 1024 } | 1032 } |
| 1025 | 1033 |
| 1026 core.int buildCounterEntityUserLinkPermissions = 0; | 1034 core.int buildCounterEntityUserLinkPermissions = 0; |
| 1027 buildEntityUserLinkPermissions() { | 1035 buildEntityUserLinkPermissions() { |
| 1028 var o = new api.EntityUserLinkPermissions(); | 1036 var o = new api.EntityUserLinkPermissions(); |
| 1029 buildCounterEntityUserLinkPermissions++; | 1037 buildCounterEntityUserLinkPermissions++; |
| 1030 if (buildCounterEntityUserLinkPermissions < 3) { | 1038 if (buildCounterEntityUserLinkPermissions < 3) { |
| 1031 o.effective = buildUnnamed1015(); | 1039 o.effective = buildUnnamed1018(); |
| 1032 o.local = buildUnnamed1016(); | 1040 o.local = buildUnnamed1019(); |
| 1033 } | 1041 } |
| 1034 buildCounterEntityUserLinkPermissions--; | 1042 buildCounterEntityUserLinkPermissions--; |
| 1035 return o; | 1043 return o; |
| 1036 } | 1044 } |
| 1037 | 1045 |
| 1038 checkEntityUserLinkPermissions(api.EntityUserLinkPermissions o) { | 1046 checkEntityUserLinkPermissions(api.EntityUserLinkPermissions o) { |
| 1039 buildCounterEntityUserLinkPermissions++; | 1047 buildCounterEntityUserLinkPermissions++; |
| 1040 if (buildCounterEntityUserLinkPermissions < 3) { | 1048 if (buildCounterEntityUserLinkPermissions < 3) { |
| 1041 checkUnnamed1015(o.effective); | 1049 checkUnnamed1018(o.effective); |
| 1042 checkUnnamed1016(o.local); | 1050 checkUnnamed1019(o.local); |
| 1043 } | 1051 } |
| 1044 buildCounterEntityUserLinkPermissions--; | 1052 buildCounterEntityUserLinkPermissions--; |
| 1045 } | 1053 } |
| 1046 | 1054 |
| 1047 core.int buildCounterEntityUserLink = 0; | 1055 core.int buildCounterEntityUserLink = 0; |
| 1048 buildEntityUserLink() { | 1056 buildEntityUserLink() { |
| 1049 var o = new api.EntityUserLink(); | 1057 var o = new api.EntityUserLink(); |
| 1050 buildCounterEntityUserLink++; | 1058 buildCounterEntityUserLink++; |
| 1051 if (buildCounterEntityUserLink < 3) { | 1059 if (buildCounterEntityUserLink < 3) { |
| 1052 o.entity = buildEntityUserLinkEntity(); | 1060 o.entity = buildEntityUserLinkEntity(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1066 checkEntityUserLinkEntity(o.entity); | 1074 checkEntityUserLinkEntity(o.entity); |
| 1067 unittest.expect(o.id, unittest.equals('foo')); | 1075 unittest.expect(o.id, unittest.equals('foo')); |
| 1068 unittest.expect(o.kind, unittest.equals('foo')); | 1076 unittest.expect(o.kind, unittest.equals('foo')); |
| 1069 checkEntityUserLinkPermissions(o.permissions); | 1077 checkEntityUserLinkPermissions(o.permissions); |
| 1070 unittest.expect(o.selfLink, unittest.equals('foo')); | 1078 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1071 checkUserRef(o.userRef); | 1079 checkUserRef(o.userRef); |
| 1072 } | 1080 } |
| 1073 buildCounterEntityUserLink--; | 1081 buildCounterEntityUserLink--; |
| 1074 } | 1082 } |
| 1075 | 1083 |
| 1076 buildUnnamed1017() { | 1084 buildUnnamed1020() { |
| 1077 var o = new core.List<api.EntityUserLink>(); | 1085 var o = new core.List<api.EntityUserLink>(); |
| 1078 o.add(buildEntityUserLink()); | 1086 o.add(buildEntityUserLink()); |
| 1079 o.add(buildEntityUserLink()); | 1087 o.add(buildEntityUserLink()); |
| 1080 return o; | 1088 return o; |
| 1081 } | 1089 } |
| 1082 | 1090 |
| 1083 checkUnnamed1017(core.List<api.EntityUserLink> o) { | 1091 checkUnnamed1020(core.List<api.EntityUserLink> o) { |
| 1084 unittest.expect(o, unittest.hasLength(2)); | 1092 unittest.expect(o, unittest.hasLength(2)); |
| 1085 checkEntityUserLink(o[0]); | 1093 checkEntityUserLink(o[0]); |
| 1086 checkEntityUserLink(o[1]); | 1094 checkEntityUserLink(o[1]); |
| 1087 } | 1095 } |
| 1088 | 1096 |
| 1089 core.int buildCounterEntityUserLinks = 0; | 1097 core.int buildCounterEntityUserLinks = 0; |
| 1090 buildEntityUserLinks() { | 1098 buildEntityUserLinks() { |
| 1091 var o = new api.EntityUserLinks(); | 1099 var o = new api.EntityUserLinks(); |
| 1092 buildCounterEntityUserLinks++; | 1100 buildCounterEntityUserLinks++; |
| 1093 if (buildCounterEntityUserLinks < 3) { | 1101 if (buildCounterEntityUserLinks < 3) { |
| 1094 o.items = buildUnnamed1017(); | 1102 o.items = buildUnnamed1020(); |
| 1095 o.itemsPerPage = 42; | 1103 o.itemsPerPage = 42; |
| 1096 o.kind = "foo"; | 1104 o.kind = "foo"; |
| 1097 o.nextLink = "foo"; | 1105 o.nextLink = "foo"; |
| 1098 o.previousLink = "foo"; | 1106 o.previousLink = "foo"; |
| 1099 o.startIndex = 42; | 1107 o.startIndex = 42; |
| 1100 o.totalResults = 42; | 1108 o.totalResults = 42; |
| 1101 } | 1109 } |
| 1102 buildCounterEntityUserLinks--; | 1110 buildCounterEntityUserLinks--; |
| 1103 return o; | 1111 return o; |
| 1104 } | 1112 } |
| 1105 | 1113 |
| 1106 checkEntityUserLinks(api.EntityUserLinks o) { | 1114 checkEntityUserLinks(api.EntityUserLinks o) { |
| 1107 buildCounterEntityUserLinks++; | 1115 buildCounterEntityUserLinks++; |
| 1108 if (buildCounterEntityUserLinks < 3) { | 1116 if (buildCounterEntityUserLinks < 3) { |
| 1109 checkUnnamed1017(o.items); | 1117 checkUnnamed1020(o.items); |
| 1110 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 1118 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 1111 unittest.expect(o.kind, unittest.equals('foo')); | 1119 unittest.expect(o.kind, unittest.equals('foo')); |
| 1112 unittest.expect(o.nextLink, unittest.equals('foo')); | 1120 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 1113 unittest.expect(o.previousLink, unittest.equals('foo')); | 1121 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 1114 unittest.expect(o.startIndex, unittest.equals(42)); | 1122 unittest.expect(o.startIndex, unittest.equals(42)); |
| 1115 unittest.expect(o.totalResults, unittest.equals(42)); | 1123 unittest.expect(o.totalResults, unittest.equals(42)); |
| 1116 } | 1124 } |
| 1117 buildCounterEntityUserLinks--; | 1125 buildCounterEntityUserLinks--; |
| 1118 } | 1126 } |
| 1119 | 1127 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 if (buildCounterExperimentVariations < 3) { | 1166 if (buildCounterExperimentVariations < 3) { |
| 1159 unittest.expect(o.name, unittest.equals('foo')); | 1167 unittest.expect(o.name, unittest.equals('foo')); |
| 1160 unittest.expect(o.status, unittest.equals('foo')); | 1168 unittest.expect(o.status, unittest.equals('foo')); |
| 1161 unittest.expect(o.url, unittest.equals('foo')); | 1169 unittest.expect(o.url, unittest.equals('foo')); |
| 1162 unittest.expect(o.weight, unittest.equals(42.0)); | 1170 unittest.expect(o.weight, unittest.equals(42.0)); |
| 1163 unittest.expect(o.won, unittest.isTrue); | 1171 unittest.expect(o.won, unittest.isTrue); |
| 1164 } | 1172 } |
| 1165 buildCounterExperimentVariations--; | 1173 buildCounterExperimentVariations--; |
| 1166 } | 1174 } |
| 1167 | 1175 |
| 1168 buildUnnamed1018() { | 1176 buildUnnamed1021() { |
| 1169 var o = new core.List<api.ExperimentVariations>(); | 1177 var o = new core.List<api.ExperimentVariations>(); |
| 1170 o.add(buildExperimentVariations()); | 1178 o.add(buildExperimentVariations()); |
| 1171 o.add(buildExperimentVariations()); | 1179 o.add(buildExperimentVariations()); |
| 1172 return o; | 1180 return o; |
| 1173 } | 1181 } |
| 1174 | 1182 |
| 1175 checkUnnamed1018(core.List<api.ExperimentVariations> o) { | 1183 checkUnnamed1021(core.List<api.ExperimentVariations> o) { |
| 1176 unittest.expect(o, unittest.hasLength(2)); | 1184 unittest.expect(o, unittest.hasLength(2)); |
| 1177 checkExperimentVariations(o[0]); | 1185 checkExperimentVariations(o[0]); |
| 1178 checkExperimentVariations(o[1]); | 1186 checkExperimentVariations(o[1]); |
| 1179 } | 1187 } |
| 1180 | 1188 |
| 1181 core.int buildCounterExperiment = 0; | 1189 core.int buildCounterExperiment = 0; |
| 1182 buildExperiment() { | 1190 buildExperiment() { |
| 1183 var o = new api.Experiment(); | 1191 var o = new api.Experiment(); |
| 1184 buildCounterExperiment++; | 1192 buildCounterExperiment++; |
| 1185 if (buildCounterExperiment < 3) { | 1193 if (buildCounterExperiment < 3) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1200 o.profileId = "foo"; | 1208 o.profileId = "foo"; |
| 1201 o.reasonExperimentEnded = "foo"; | 1209 o.reasonExperimentEnded = "foo"; |
| 1202 o.rewriteVariationUrlsAsOriginal = true; | 1210 o.rewriteVariationUrlsAsOriginal = true; |
| 1203 o.selfLink = "foo"; | 1211 o.selfLink = "foo"; |
| 1204 o.servingFramework = "foo"; | 1212 o.servingFramework = "foo"; |
| 1205 o.snippet = "foo"; | 1213 o.snippet = "foo"; |
| 1206 o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); | 1214 o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1207 o.status = "foo"; | 1215 o.status = "foo"; |
| 1208 o.trafficCoverage = 42.0; | 1216 o.trafficCoverage = 42.0; |
| 1209 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 1217 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1210 o.variations = buildUnnamed1018(); | 1218 o.variations = buildUnnamed1021(); |
| 1211 o.webPropertyId = "foo"; | 1219 o.webPropertyId = "foo"; |
| 1212 o.winnerConfidenceLevel = 42.0; | 1220 o.winnerConfidenceLevel = 42.0; |
| 1213 o.winnerFound = true; | 1221 o.winnerFound = true; |
| 1214 } | 1222 } |
| 1215 buildCounterExperiment--; | 1223 buildCounterExperiment--; |
| 1216 return o; | 1224 return o; |
| 1217 } | 1225 } |
| 1218 | 1226 |
| 1219 checkExperiment(api.Experiment o) { | 1227 checkExperiment(api.Experiment o) { |
| 1220 buildCounterExperiment++; | 1228 buildCounterExperiment++; |
| 1221 if (buildCounterExperiment < 3) { | 1229 if (buildCounterExperiment < 3) { |
| 1222 unittest.expect(o.accountId, unittest.equals('foo')); | 1230 unittest.expect(o.accountId, unittest.equals('foo')); |
| 1223 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 1231 unittest.expect( |
| 1232 o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 1224 unittest.expect(o.description, unittest.equals('foo')); | 1233 unittest.expect(o.description, unittest.equals('foo')); |
| 1225 unittest.expect(o.editableInGaUi, unittest.isTrue); | 1234 unittest.expect(o.editableInGaUi, unittest.isTrue); |
| 1226 unittest.expect(o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 1235 unittest.expect( |
| 1236 o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 1227 unittest.expect(o.equalWeighting, unittest.isTrue); | 1237 unittest.expect(o.equalWeighting, unittest.isTrue); |
| 1228 unittest.expect(o.id, unittest.equals('foo')); | 1238 unittest.expect(o.id, unittest.equals('foo')); |
| 1229 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); | 1239 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); |
| 1230 unittest.expect(o.kind, unittest.equals('foo')); | 1240 unittest.expect(o.kind, unittest.equals('foo')); |
| 1231 unittest.expect(o.minimumExperimentLengthInDays, unittest.equals(42)); | 1241 unittest.expect(o.minimumExperimentLengthInDays, unittest.equals(42)); |
| 1232 unittest.expect(o.name, unittest.equals('foo')); | 1242 unittest.expect(o.name, unittest.equals('foo')); |
| 1233 unittest.expect(o.objectiveMetric, unittest.equals('foo')); | 1243 unittest.expect(o.objectiveMetric, unittest.equals('foo')); |
| 1234 unittest.expect(o.optimizationType, unittest.equals('foo')); | 1244 unittest.expect(o.optimizationType, unittest.equals('foo')); |
| 1235 checkExperimentParentLink(o.parentLink); | 1245 checkExperimentParentLink(o.parentLink); |
| 1236 unittest.expect(o.profileId, unittest.equals('foo')); | 1246 unittest.expect(o.profileId, unittest.equals('foo')); |
| 1237 unittest.expect(o.reasonExperimentEnded, unittest.equals('foo')); | 1247 unittest.expect(o.reasonExperimentEnded, unittest.equals('foo')); |
| 1238 unittest.expect(o.rewriteVariationUrlsAsOriginal, unittest.isTrue); | 1248 unittest.expect(o.rewriteVariationUrlsAsOriginal, unittest.isTrue); |
| 1239 unittest.expect(o.selfLink, unittest.equals('foo')); | 1249 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1240 unittest.expect(o.servingFramework, unittest.equals('foo')); | 1250 unittest.expect(o.servingFramework, unittest.equals('foo')); |
| 1241 unittest.expect(o.snippet, unittest.equals('foo')); | 1251 unittest.expect(o.snippet, unittest.equals('foo')); |
| 1242 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 1252 unittest.expect(o.startTime, |
| 1253 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 1243 unittest.expect(o.status, unittest.equals('foo')); | 1254 unittest.expect(o.status, unittest.equals('foo')); |
| 1244 unittest.expect(o.trafficCoverage, unittest.equals(42.0)); | 1255 unittest.expect(o.trafficCoverage, unittest.equals(42.0)); |
| 1245 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 1256 unittest.expect( |
| 1246 checkUnnamed1018(o.variations); | 1257 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 1258 checkUnnamed1021(o.variations); |
| 1247 unittest.expect(o.webPropertyId, unittest.equals('foo')); | 1259 unittest.expect(o.webPropertyId, unittest.equals('foo')); |
| 1248 unittest.expect(o.winnerConfidenceLevel, unittest.equals(42.0)); | 1260 unittest.expect(o.winnerConfidenceLevel, unittest.equals(42.0)); |
| 1249 unittest.expect(o.winnerFound, unittest.isTrue); | 1261 unittest.expect(o.winnerFound, unittest.isTrue); |
| 1250 } | 1262 } |
| 1251 buildCounterExperiment--; | 1263 buildCounterExperiment--; |
| 1252 } | 1264 } |
| 1253 | 1265 |
| 1254 buildUnnamed1019() { | 1266 buildUnnamed1022() { |
| 1255 var o = new core.List<api.Experiment>(); | 1267 var o = new core.List<api.Experiment>(); |
| 1256 o.add(buildExperiment()); | 1268 o.add(buildExperiment()); |
| 1257 o.add(buildExperiment()); | 1269 o.add(buildExperiment()); |
| 1258 return o; | 1270 return o; |
| 1259 } | 1271 } |
| 1260 | 1272 |
| 1261 checkUnnamed1019(core.List<api.Experiment> o) { | 1273 checkUnnamed1022(core.List<api.Experiment> o) { |
| 1262 unittest.expect(o, unittest.hasLength(2)); | 1274 unittest.expect(o, unittest.hasLength(2)); |
| 1263 checkExperiment(o[0]); | 1275 checkExperiment(o[0]); |
| 1264 checkExperiment(o[1]); | 1276 checkExperiment(o[1]); |
| 1265 } | 1277 } |
| 1266 | 1278 |
| 1267 core.int buildCounterExperiments = 0; | 1279 core.int buildCounterExperiments = 0; |
| 1268 buildExperiments() { | 1280 buildExperiments() { |
| 1269 var o = new api.Experiments(); | 1281 var o = new api.Experiments(); |
| 1270 buildCounterExperiments++; | 1282 buildCounterExperiments++; |
| 1271 if (buildCounterExperiments < 3) { | 1283 if (buildCounterExperiments < 3) { |
| 1272 o.items = buildUnnamed1019(); | 1284 o.items = buildUnnamed1022(); |
| 1273 o.itemsPerPage = 42; | 1285 o.itemsPerPage = 42; |
| 1274 o.kind = "foo"; | 1286 o.kind = "foo"; |
| 1275 o.nextLink = "foo"; | 1287 o.nextLink = "foo"; |
| 1276 o.previousLink = "foo"; | 1288 o.previousLink = "foo"; |
| 1277 o.startIndex = 42; | 1289 o.startIndex = 42; |
| 1278 o.totalResults = 42; | 1290 o.totalResults = 42; |
| 1279 o.username = "foo"; | 1291 o.username = "foo"; |
| 1280 } | 1292 } |
| 1281 buildCounterExperiments--; | 1293 buildCounterExperiments--; |
| 1282 return o; | 1294 return o; |
| 1283 } | 1295 } |
| 1284 | 1296 |
| 1285 checkExperiments(api.Experiments o) { | 1297 checkExperiments(api.Experiments o) { |
| 1286 buildCounterExperiments++; | 1298 buildCounterExperiments++; |
| 1287 if (buildCounterExperiments < 3) { | 1299 if (buildCounterExperiments < 3) { |
| 1288 checkUnnamed1019(o.items); | 1300 checkUnnamed1022(o.items); |
| 1289 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 1301 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 1290 unittest.expect(o.kind, unittest.equals('foo')); | 1302 unittest.expect(o.kind, unittest.equals('foo')); |
| 1291 unittest.expect(o.nextLink, unittest.equals('foo')); | 1303 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 1292 unittest.expect(o.previousLink, unittest.equals('foo')); | 1304 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 1293 unittest.expect(o.startIndex, unittest.equals(42)); | 1305 unittest.expect(o.startIndex, unittest.equals(42)); |
| 1294 unittest.expect(o.totalResults, unittest.equals(42)); | 1306 unittest.expect(o.totalResults, unittest.equals(42)); |
| 1295 unittest.expect(o.username, unittest.equals('foo')); | 1307 unittest.expect(o.username, unittest.equals('foo')); |
| 1296 } | 1308 } |
| 1297 buildCounterExperiments--; | 1309 buildCounterExperiments--; |
| 1298 } | 1310 } |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 } | 1465 } |
| 1454 buildCounterFilter--; | 1466 buildCounterFilter--; |
| 1455 return o; | 1467 return o; |
| 1456 } | 1468 } |
| 1457 | 1469 |
| 1458 checkFilter(api.Filter o) { | 1470 checkFilter(api.Filter o) { |
| 1459 buildCounterFilter++; | 1471 buildCounterFilter++; |
| 1460 if (buildCounterFilter < 3) { | 1472 if (buildCounterFilter < 3) { |
| 1461 unittest.expect(o.accountId, unittest.equals('foo')); | 1473 unittest.expect(o.accountId, unittest.equals('foo')); |
| 1462 checkFilterAdvancedDetails(o.advancedDetails); | 1474 checkFilterAdvancedDetails(o.advancedDetails); |
| 1463 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 1475 unittest.expect( |
| 1476 o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 1464 checkFilterExpression(o.excludeDetails); | 1477 checkFilterExpression(o.excludeDetails); |
| 1465 unittest.expect(o.id, unittest.equals('foo')); | 1478 unittest.expect(o.id, unittest.equals('foo')); |
| 1466 checkFilterExpression(o.includeDetails); | 1479 checkFilterExpression(o.includeDetails); |
| 1467 unittest.expect(o.kind, unittest.equals('foo')); | 1480 unittest.expect(o.kind, unittest.equals('foo')); |
| 1468 checkFilterLowercaseDetails(o.lowercaseDetails); | 1481 checkFilterLowercaseDetails(o.lowercaseDetails); |
| 1469 unittest.expect(o.name, unittest.equals('foo')); | 1482 unittest.expect(o.name, unittest.equals('foo')); |
| 1470 checkFilterParentLink(o.parentLink); | 1483 checkFilterParentLink(o.parentLink); |
| 1471 checkFilterSearchAndReplaceDetails(o.searchAndReplaceDetails); | 1484 checkFilterSearchAndReplaceDetails(o.searchAndReplaceDetails); |
| 1472 unittest.expect(o.selfLink, unittest.equals('foo')); | 1485 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1473 unittest.expect(o.type, unittest.equals('foo')); | 1486 unittest.expect(o.type, unittest.equals('foo')); |
| 1474 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 1487 unittest.expect( |
| 1488 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 1475 checkFilterUppercaseDetails(o.uppercaseDetails); | 1489 checkFilterUppercaseDetails(o.uppercaseDetails); |
| 1476 } | 1490 } |
| 1477 buildCounterFilter--; | 1491 buildCounterFilter--; |
| 1478 } | 1492 } |
| 1479 | 1493 |
| 1480 core.int buildCounterFilterExpression = 0; | 1494 core.int buildCounterFilterExpression = 0; |
| 1481 buildFilterExpression() { | 1495 buildFilterExpression() { |
| 1482 var o = new api.FilterExpression(); | 1496 var o = new api.FilterExpression(); |
| 1483 buildCounterFilterExpression++; | 1497 buildCounterFilterExpression++; |
| 1484 if (buildCounterFilterExpression < 3) { | 1498 if (buildCounterFilterExpression < 3) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 if (buildCounterFilterRef < 3) { | 1540 if (buildCounterFilterRef < 3) { |
| 1527 unittest.expect(o.accountId, unittest.equals('foo')); | 1541 unittest.expect(o.accountId, unittest.equals('foo')); |
| 1528 unittest.expect(o.href, unittest.equals('foo')); | 1542 unittest.expect(o.href, unittest.equals('foo')); |
| 1529 unittest.expect(o.id, unittest.equals('foo')); | 1543 unittest.expect(o.id, unittest.equals('foo')); |
| 1530 unittest.expect(o.kind, unittest.equals('foo')); | 1544 unittest.expect(o.kind, unittest.equals('foo')); |
| 1531 unittest.expect(o.name, unittest.equals('foo')); | 1545 unittest.expect(o.name, unittest.equals('foo')); |
| 1532 } | 1546 } |
| 1533 buildCounterFilterRef--; | 1547 buildCounterFilterRef--; |
| 1534 } | 1548 } |
| 1535 | 1549 |
| 1536 buildUnnamed1020() { | 1550 buildUnnamed1023() { |
| 1537 var o = new core.List<api.Filter>(); | 1551 var o = new core.List<api.Filter>(); |
| 1538 o.add(buildFilter()); | 1552 o.add(buildFilter()); |
| 1539 o.add(buildFilter()); | 1553 o.add(buildFilter()); |
| 1540 return o; | 1554 return o; |
| 1541 } | 1555 } |
| 1542 | 1556 |
| 1543 checkUnnamed1020(core.List<api.Filter> o) { | 1557 checkUnnamed1023(core.List<api.Filter> o) { |
| 1544 unittest.expect(o, unittest.hasLength(2)); | 1558 unittest.expect(o, unittest.hasLength(2)); |
| 1545 checkFilter(o[0]); | 1559 checkFilter(o[0]); |
| 1546 checkFilter(o[1]); | 1560 checkFilter(o[1]); |
| 1547 } | 1561 } |
| 1548 | 1562 |
| 1549 core.int buildCounterFilters = 0; | 1563 core.int buildCounterFilters = 0; |
| 1550 buildFilters() { | 1564 buildFilters() { |
| 1551 var o = new api.Filters(); | 1565 var o = new api.Filters(); |
| 1552 buildCounterFilters++; | 1566 buildCounterFilters++; |
| 1553 if (buildCounterFilters < 3) { | 1567 if (buildCounterFilters < 3) { |
| 1554 o.items = buildUnnamed1020(); | 1568 o.items = buildUnnamed1023(); |
| 1555 o.itemsPerPage = 42; | 1569 o.itemsPerPage = 42; |
| 1556 o.kind = "foo"; | 1570 o.kind = "foo"; |
| 1557 o.nextLink = "foo"; | 1571 o.nextLink = "foo"; |
| 1558 o.previousLink = "foo"; | 1572 o.previousLink = "foo"; |
| 1559 o.startIndex = 42; | 1573 o.startIndex = 42; |
| 1560 o.totalResults = 42; | 1574 o.totalResults = 42; |
| 1561 o.username = "foo"; | 1575 o.username = "foo"; |
| 1562 } | 1576 } |
| 1563 buildCounterFilters--; | 1577 buildCounterFilters--; |
| 1564 return o; | 1578 return o; |
| 1565 } | 1579 } |
| 1566 | 1580 |
| 1567 checkFilters(api.Filters o) { | 1581 checkFilters(api.Filters o) { |
| 1568 buildCounterFilters++; | 1582 buildCounterFilters++; |
| 1569 if (buildCounterFilters < 3) { | 1583 if (buildCounterFilters < 3) { |
| 1570 checkUnnamed1020(o.items); | 1584 checkUnnamed1023(o.items); |
| 1571 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 1585 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 1572 unittest.expect(o.kind, unittest.equals('foo')); | 1586 unittest.expect(o.kind, unittest.equals('foo')); |
| 1573 unittest.expect(o.nextLink, unittest.equals('foo')); | 1587 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 1574 unittest.expect(o.previousLink, unittest.equals('foo')); | 1588 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 1575 unittest.expect(o.startIndex, unittest.equals(42)); | 1589 unittest.expect(o.startIndex, unittest.equals(42)); |
| 1576 unittest.expect(o.totalResults, unittest.equals(42)); | 1590 unittest.expect(o.totalResults, unittest.equals(42)); |
| 1577 unittest.expect(o.username, unittest.equals('foo')); | 1591 unittest.expect(o.username, unittest.equals('foo')); |
| 1578 } | 1592 } |
| 1579 buildCounterFilters--; | 1593 buildCounterFilters--; |
| 1580 } | 1594 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1595 checkGaDataColumnHeaders(api.GaDataColumnHeaders o) { | 1609 checkGaDataColumnHeaders(api.GaDataColumnHeaders o) { |
| 1596 buildCounterGaDataColumnHeaders++; | 1610 buildCounterGaDataColumnHeaders++; |
| 1597 if (buildCounterGaDataColumnHeaders < 3) { | 1611 if (buildCounterGaDataColumnHeaders < 3) { |
| 1598 unittest.expect(o.columnType, unittest.equals('foo')); | 1612 unittest.expect(o.columnType, unittest.equals('foo')); |
| 1599 unittest.expect(o.dataType, unittest.equals('foo')); | 1613 unittest.expect(o.dataType, unittest.equals('foo')); |
| 1600 unittest.expect(o.name, unittest.equals('foo')); | 1614 unittest.expect(o.name, unittest.equals('foo')); |
| 1601 } | 1615 } |
| 1602 buildCounterGaDataColumnHeaders--; | 1616 buildCounterGaDataColumnHeaders--; |
| 1603 } | 1617 } |
| 1604 | 1618 |
| 1605 buildUnnamed1021() { | 1619 buildUnnamed1024() { |
| 1606 var o = new core.List<api.GaDataColumnHeaders>(); | 1620 var o = new core.List<api.GaDataColumnHeaders>(); |
| 1607 o.add(buildGaDataColumnHeaders()); | 1621 o.add(buildGaDataColumnHeaders()); |
| 1608 o.add(buildGaDataColumnHeaders()); | 1622 o.add(buildGaDataColumnHeaders()); |
| 1609 return o; | 1623 return o; |
| 1610 } | 1624 } |
| 1611 | 1625 |
| 1612 checkUnnamed1021(core.List<api.GaDataColumnHeaders> o) { | 1626 checkUnnamed1024(core.List<api.GaDataColumnHeaders> o) { |
| 1613 unittest.expect(o, unittest.hasLength(2)); | 1627 unittest.expect(o, unittest.hasLength(2)); |
| 1614 checkGaDataColumnHeaders(o[0]); | 1628 checkGaDataColumnHeaders(o[0]); |
| 1615 checkGaDataColumnHeaders(o[1]); | 1629 checkGaDataColumnHeaders(o[1]); |
| 1616 } | 1630 } |
| 1617 | 1631 |
| 1618 core.int buildCounterGaDataDataTableCols = 0; | 1632 core.int buildCounterGaDataDataTableCols = 0; |
| 1619 buildGaDataDataTableCols() { | 1633 buildGaDataDataTableCols() { |
| 1620 var o = new api.GaDataDataTableCols(); | 1634 var o = new api.GaDataDataTableCols(); |
| 1621 buildCounterGaDataDataTableCols++; | 1635 buildCounterGaDataDataTableCols++; |
| 1622 if (buildCounterGaDataDataTableCols < 3) { | 1636 if (buildCounterGaDataDataTableCols < 3) { |
| 1623 o.id = "foo"; | 1637 o.id = "foo"; |
| 1624 o.label = "foo"; | 1638 o.label = "foo"; |
| 1625 o.type = "foo"; | 1639 o.type = "foo"; |
| 1626 } | 1640 } |
| 1627 buildCounterGaDataDataTableCols--; | 1641 buildCounterGaDataDataTableCols--; |
| 1628 return o; | 1642 return o; |
| 1629 } | 1643 } |
| 1630 | 1644 |
| 1631 checkGaDataDataTableCols(api.GaDataDataTableCols o) { | 1645 checkGaDataDataTableCols(api.GaDataDataTableCols o) { |
| 1632 buildCounterGaDataDataTableCols++; | 1646 buildCounterGaDataDataTableCols++; |
| 1633 if (buildCounterGaDataDataTableCols < 3) { | 1647 if (buildCounterGaDataDataTableCols < 3) { |
| 1634 unittest.expect(o.id, unittest.equals('foo')); | 1648 unittest.expect(o.id, unittest.equals('foo')); |
| 1635 unittest.expect(o.label, unittest.equals('foo')); | 1649 unittest.expect(o.label, unittest.equals('foo')); |
| 1636 unittest.expect(o.type, unittest.equals('foo')); | 1650 unittest.expect(o.type, unittest.equals('foo')); |
| 1637 } | 1651 } |
| 1638 buildCounterGaDataDataTableCols--; | 1652 buildCounterGaDataDataTableCols--; |
| 1639 } | 1653 } |
| 1640 | 1654 |
| 1641 buildUnnamed1022() { | 1655 buildUnnamed1025() { |
| 1642 var o = new core.List<api.GaDataDataTableCols>(); | 1656 var o = new core.List<api.GaDataDataTableCols>(); |
| 1643 o.add(buildGaDataDataTableCols()); | 1657 o.add(buildGaDataDataTableCols()); |
| 1644 o.add(buildGaDataDataTableCols()); | 1658 o.add(buildGaDataDataTableCols()); |
| 1645 return o; | 1659 return o; |
| 1646 } | 1660 } |
| 1647 | 1661 |
| 1648 checkUnnamed1022(core.List<api.GaDataDataTableCols> o) { | 1662 checkUnnamed1025(core.List<api.GaDataDataTableCols> o) { |
| 1649 unittest.expect(o, unittest.hasLength(2)); | 1663 unittest.expect(o, unittest.hasLength(2)); |
| 1650 checkGaDataDataTableCols(o[0]); | 1664 checkGaDataDataTableCols(o[0]); |
| 1651 checkGaDataDataTableCols(o[1]); | 1665 checkGaDataDataTableCols(o[1]); |
| 1652 } | 1666 } |
| 1653 | 1667 |
| 1654 core.int buildCounterGaDataDataTableRowsC = 0; | 1668 core.int buildCounterGaDataDataTableRowsC = 0; |
| 1655 buildGaDataDataTableRowsC() { | 1669 buildGaDataDataTableRowsC() { |
| 1656 var o = new api.GaDataDataTableRowsC(); | 1670 var o = new api.GaDataDataTableRowsC(); |
| 1657 buildCounterGaDataDataTableRowsC++; | 1671 buildCounterGaDataDataTableRowsC++; |
| 1658 if (buildCounterGaDataDataTableRowsC < 3) { | 1672 if (buildCounterGaDataDataTableRowsC < 3) { |
| 1659 o.v = "foo"; | 1673 o.v = "foo"; |
| 1660 } | 1674 } |
| 1661 buildCounterGaDataDataTableRowsC--; | 1675 buildCounterGaDataDataTableRowsC--; |
| 1662 return o; | 1676 return o; |
| 1663 } | 1677 } |
| 1664 | 1678 |
| 1665 checkGaDataDataTableRowsC(api.GaDataDataTableRowsC o) { | 1679 checkGaDataDataTableRowsC(api.GaDataDataTableRowsC o) { |
| 1666 buildCounterGaDataDataTableRowsC++; | 1680 buildCounterGaDataDataTableRowsC++; |
| 1667 if (buildCounterGaDataDataTableRowsC < 3) { | 1681 if (buildCounterGaDataDataTableRowsC < 3) { |
| 1668 unittest.expect(o.v, unittest.equals('foo')); | 1682 unittest.expect(o.v, unittest.equals('foo')); |
| 1669 } | 1683 } |
| 1670 buildCounterGaDataDataTableRowsC--; | 1684 buildCounterGaDataDataTableRowsC--; |
| 1671 } | 1685 } |
| 1672 | 1686 |
| 1673 buildUnnamed1023() { | 1687 buildUnnamed1026() { |
| 1674 var o = new core.List<api.GaDataDataTableRowsC>(); | 1688 var o = new core.List<api.GaDataDataTableRowsC>(); |
| 1675 o.add(buildGaDataDataTableRowsC()); | 1689 o.add(buildGaDataDataTableRowsC()); |
| 1676 o.add(buildGaDataDataTableRowsC()); | 1690 o.add(buildGaDataDataTableRowsC()); |
| 1677 return o; | 1691 return o; |
| 1678 } | 1692 } |
| 1679 | 1693 |
| 1680 checkUnnamed1023(core.List<api.GaDataDataTableRowsC> o) { | 1694 checkUnnamed1026(core.List<api.GaDataDataTableRowsC> o) { |
| 1681 unittest.expect(o, unittest.hasLength(2)); | 1695 unittest.expect(o, unittest.hasLength(2)); |
| 1682 checkGaDataDataTableRowsC(o[0]); | 1696 checkGaDataDataTableRowsC(o[0]); |
| 1683 checkGaDataDataTableRowsC(o[1]); | 1697 checkGaDataDataTableRowsC(o[1]); |
| 1684 } | 1698 } |
| 1685 | 1699 |
| 1686 core.int buildCounterGaDataDataTableRows = 0; | 1700 core.int buildCounterGaDataDataTableRows = 0; |
| 1687 buildGaDataDataTableRows() { | 1701 buildGaDataDataTableRows() { |
| 1688 var o = new api.GaDataDataTableRows(); | 1702 var o = new api.GaDataDataTableRows(); |
| 1689 buildCounterGaDataDataTableRows++; | 1703 buildCounterGaDataDataTableRows++; |
| 1690 if (buildCounterGaDataDataTableRows < 3) { | 1704 if (buildCounterGaDataDataTableRows < 3) { |
| 1691 o.c = buildUnnamed1023(); | 1705 o.c = buildUnnamed1026(); |
| 1692 } | 1706 } |
| 1693 buildCounterGaDataDataTableRows--; | 1707 buildCounterGaDataDataTableRows--; |
| 1694 return o; | 1708 return o; |
| 1695 } | 1709 } |
| 1696 | 1710 |
| 1697 checkGaDataDataTableRows(api.GaDataDataTableRows o) { | 1711 checkGaDataDataTableRows(api.GaDataDataTableRows o) { |
| 1698 buildCounterGaDataDataTableRows++; | 1712 buildCounterGaDataDataTableRows++; |
| 1699 if (buildCounterGaDataDataTableRows < 3) { | 1713 if (buildCounterGaDataDataTableRows < 3) { |
| 1700 checkUnnamed1023(o.c); | 1714 checkUnnamed1026(o.c); |
| 1701 } | 1715 } |
| 1702 buildCounterGaDataDataTableRows--; | 1716 buildCounterGaDataDataTableRows--; |
| 1703 } | 1717 } |
| 1704 | 1718 |
| 1705 buildUnnamed1024() { | 1719 buildUnnamed1027() { |
| 1706 var o = new core.List<api.GaDataDataTableRows>(); | 1720 var o = new core.List<api.GaDataDataTableRows>(); |
| 1707 o.add(buildGaDataDataTableRows()); | 1721 o.add(buildGaDataDataTableRows()); |
| 1708 o.add(buildGaDataDataTableRows()); | 1722 o.add(buildGaDataDataTableRows()); |
| 1709 return o; | 1723 return o; |
| 1710 } | 1724 } |
| 1711 | 1725 |
| 1712 checkUnnamed1024(core.List<api.GaDataDataTableRows> o) { | 1726 checkUnnamed1027(core.List<api.GaDataDataTableRows> o) { |
| 1713 unittest.expect(o, unittest.hasLength(2)); | 1727 unittest.expect(o, unittest.hasLength(2)); |
| 1714 checkGaDataDataTableRows(o[0]); | 1728 checkGaDataDataTableRows(o[0]); |
| 1715 checkGaDataDataTableRows(o[1]); | 1729 checkGaDataDataTableRows(o[1]); |
| 1716 } | 1730 } |
| 1717 | 1731 |
| 1718 core.int buildCounterGaDataDataTable = 0; | 1732 core.int buildCounterGaDataDataTable = 0; |
| 1719 buildGaDataDataTable() { | 1733 buildGaDataDataTable() { |
| 1720 var o = new api.GaDataDataTable(); | 1734 var o = new api.GaDataDataTable(); |
| 1721 buildCounterGaDataDataTable++; | 1735 buildCounterGaDataDataTable++; |
| 1722 if (buildCounterGaDataDataTable < 3) { | 1736 if (buildCounterGaDataDataTable < 3) { |
| 1723 o.cols = buildUnnamed1022(); | 1737 o.cols = buildUnnamed1025(); |
| 1724 o.rows = buildUnnamed1024(); | 1738 o.rows = buildUnnamed1027(); |
| 1725 } | 1739 } |
| 1726 buildCounterGaDataDataTable--; | 1740 buildCounterGaDataDataTable--; |
| 1727 return o; | 1741 return o; |
| 1728 } | 1742 } |
| 1729 | 1743 |
| 1730 checkGaDataDataTable(api.GaDataDataTable o) { | 1744 checkGaDataDataTable(api.GaDataDataTable o) { |
| 1731 buildCounterGaDataDataTable++; | 1745 buildCounterGaDataDataTable++; |
| 1732 if (buildCounterGaDataDataTable < 3) { | 1746 if (buildCounterGaDataDataTable < 3) { |
| 1733 checkUnnamed1022(o.cols); | 1747 checkUnnamed1025(o.cols); |
| 1734 checkUnnamed1024(o.rows); | 1748 checkUnnamed1027(o.rows); |
| 1735 } | 1749 } |
| 1736 buildCounterGaDataDataTable--; | 1750 buildCounterGaDataDataTable--; |
| 1737 } | 1751 } |
| 1738 | 1752 |
| 1739 core.int buildCounterGaDataProfileInfo = 0; | 1753 core.int buildCounterGaDataProfileInfo = 0; |
| 1740 buildGaDataProfileInfo() { | 1754 buildGaDataProfileInfo() { |
| 1741 var o = new api.GaDataProfileInfo(); | 1755 var o = new api.GaDataProfileInfo(); |
| 1742 buildCounterGaDataProfileInfo++; | 1756 buildCounterGaDataProfileInfo++; |
| 1743 if (buildCounterGaDataProfileInfo < 3) { | 1757 if (buildCounterGaDataProfileInfo < 3) { |
| 1744 o.accountId = "foo"; | 1758 o.accountId = "foo"; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1758 unittest.expect(o.accountId, unittest.equals('foo')); | 1772 unittest.expect(o.accountId, unittest.equals('foo')); |
| 1759 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); | 1773 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); |
| 1760 unittest.expect(o.profileId, unittest.equals('foo')); | 1774 unittest.expect(o.profileId, unittest.equals('foo')); |
| 1761 unittest.expect(o.profileName, unittest.equals('foo')); | 1775 unittest.expect(o.profileName, unittest.equals('foo')); |
| 1762 unittest.expect(o.tableId, unittest.equals('foo')); | 1776 unittest.expect(o.tableId, unittest.equals('foo')); |
| 1763 unittest.expect(o.webPropertyId, unittest.equals('foo')); | 1777 unittest.expect(o.webPropertyId, unittest.equals('foo')); |
| 1764 } | 1778 } |
| 1765 buildCounterGaDataProfileInfo--; | 1779 buildCounterGaDataProfileInfo--; |
| 1766 } | 1780 } |
| 1767 | 1781 |
| 1768 buildUnnamed1025() { | 1782 buildUnnamed1028() { |
| 1769 var o = new core.List<core.String>(); | 1783 var o = new core.List<core.String>(); |
| 1770 o.add("foo"); | 1784 o.add("foo"); |
| 1771 o.add("foo"); | 1785 o.add("foo"); |
| 1772 return o; | 1786 return o; |
| 1773 } | 1787 } |
| 1774 | 1788 |
| 1775 checkUnnamed1025(core.List<core.String> o) { | 1789 checkUnnamed1028(core.List<core.String> o) { |
| 1776 unittest.expect(o, unittest.hasLength(2)); | 1790 unittest.expect(o, unittest.hasLength(2)); |
| 1777 unittest.expect(o[0], unittest.equals('foo')); | 1791 unittest.expect(o[0], unittest.equals('foo')); |
| 1778 unittest.expect(o[1], unittest.equals('foo')); | 1792 unittest.expect(o[1], unittest.equals('foo')); |
| 1779 } | 1793 } |
| 1780 | 1794 |
| 1781 buildUnnamed1026() { | 1795 buildUnnamed1029() { |
| 1782 var o = new core.List<core.String>(); | 1796 var o = new core.List<core.String>(); |
| 1783 o.add("foo"); | 1797 o.add("foo"); |
| 1784 o.add("foo"); | 1798 o.add("foo"); |
| 1785 return o; | 1799 return o; |
| 1786 } | 1800 } |
| 1787 | 1801 |
| 1788 checkUnnamed1026(core.List<core.String> o) { | 1802 checkUnnamed1029(core.List<core.String> o) { |
| 1789 unittest.expect(o, unittest.hasLength(2)); | 1803 unittest.expect(o, unittest.hasLength(2)); |
| 1790 unittest.expect(o[0], unittest.equals('foo')); | 1804 unittest.expect(o[0], unittest.equals('foo')); |
| 1791 unittest.expect(o[1], unittest.equals('foo')); | 1805 unittest.expect(o[1], unittest.equals('foo')); |
| 1792 } | 1806 } |
| 1793 | 1807 |
| 1794 core.int buildCounterGaDataQuery = 0; | 1808 core.int buildCounterGaDataQuery = 0; |
| 1795 buildGaDataQuery() { | 1809 buildGaDataQuery() { |
| 1796 var o = new api.GaDataQuery(); | 1810 var o = new api.GaDataQuery(); |
| 1797 buildCounterGaDataQuery++; | 1811 buildCounterGaDataQuery++; |
| 1798 if (buildCounterGaDataQuery < 3) { | 1812 if (buildCounterGaDataQuery < 3) { |
| 1799 o.dimensions = "foo"; | 1813 o.dimensions = "foo"; |
| 1800 o.end_date = "foo"; | 1814 o.end_date = "foo"; |
| 1801 o.filters = "foo"; | 1815 o.filters = "foo"; |
| 1802 o.ids = "foo"; | 1816 o.ids = "foo"; |
| 1803 o.max_results = 42; | 1817 o.max_results = 42; |
| 1804 o.metrics = buildUnnamed1025(); | 1818 o.metrics = buildUnnamed1028(); |
| 1805 o.samplingLevel = "foo"; | 1819 o.samplingLevel = "foo"; |
| 1806 o.segment = "foo"; | 1820 o.segment = "foo"; |
| 1807 o.sort = buildUnnamed1026(); | 1821 o.sort = buildUnnamed1029(); |
| 1808 o.start_date = "foo"; | 1822 o.start_date = "foo"; |
| 1809 o.start_index = 42; | 1823 o.start_index = 42; |
| 1810 } | 1824 } |
| 1811 buildCounterGaDataQuery--; | 1825 buildCounterGaDataQuery--; |
| 1812 return o; | 1826 return o; |
| 1813 } | 1827 } |
| 1814 | 1828 |
| 1815 checkGaDataQuery(api.GaDataQuery o) { | 1829 checkGaDataQuery(api.GaDataQuery o) { |
| 1816 buildCounterGaDataQuery++; | 1830 buildCounterGaDataQuery++; |
| 1817 if (buildCounterGaDataQuery < 3) { | 1831 if (buildCounterGaDataQuery < 3) { |
| 1818 unittest.expect(o.dimensions, unittest.equals('foo')); | 1832 unittest.expect(o.dimensions, unittest.equals('foo')); |
| 1819 unittest.expect(o.end_date, unittest.equals('foo')); | 1833 unittest.expect(o.end_date, unittest.equals('foo')); |
| 1820 unittest.expect(o.filters, unittest.equals('foo')); | 1834 unittest.expect(o.filters, unittest.equals('foo')); |
| 1821 unittest.expect(o.ids, unittest.equals('foo')); | 1835 unittest.expect(o.ids, unittest.equals('foo')); |
| 1822 unittest.expect(o.max_results, unittest.equals(42)); | 1836 unittest.expect(o.max_results, unittest.equals(42)); |
| 1823 checkUnnamed1025(o.metrics); | 1837 checkUnnamed1028(o.metrics); |
| 1824 unittest.expect(o.samplingLevel, unittest.equals('foo')); | 1838 unittest.expect(o.samplingLevel, unittest.equals('foo')); |
| 1825 unittest.expect(o.segment, unittest.equals('foo')); | 1839 unittest.expect(o.segment, unittest.equals('foo')); |
| 1826 checkUnnamed1026(o.sort); | 1840 checkUnnamed1029(o.sort); |
| 1827 unittest.expect(o.start_date, unittest.equals('foo')); | 1841 unittest.expect(o.start_date, unittest.equals('foo')); |
| 1828 unittest.expect(o.start_index, unittest.equals(42)); | 1842 unittest.expect(o.start_index, unittest.equals(42)); |
| 1829 } | 1843 } |
| 1830 buildCounterGaDataQuery--; | 1844 buildCounterGaDataQuery--; |
| 1831 } | 1845 } |
| 1832 | 1846 |
| 1833 buildUnnamed1027() { | 1847 buildUnnamed1030() { |
| 1834 var o = new core.List<core.String>(); | 1848 var o = new core.List<core.String>(); |
| 1835 o.add("foo"); | 1849 o.add("foo"); |
| 1836 o.add("foo"); | 1850 o.add("foo"); |
| 1837 return o; | 1851 return o; |
| 1838 } | 1852 } |
| 1839 | 1853 |
| 1840 checkUnnamed1027(core.List<core.String> o) { | 1854 checkUnnamed1030(core.List<core.String> o) { |
| 1841 unittest.expect(o, unittest.hasLength(2)); | 1855 unittest.expect(o, unittest.hasLength(2)); |
| 1842 unittest.expect(o[0], unittest.equals('foo')); | 1856 unittest.expect(o[0], unittest.equals('foo')); |
| 1843 unittest.expect(o[1], unittest.equals('foo')); | 1857 unittest.expect(o[1], unittest.equals('foo')); |
| 1844 } | 1858 } |
| 1845 | 1859 |
| 1846 buildUnnamed1028() { | 1860 buildUnnamed1031() { |
| 1847 var o = new core.List<core.List<core.String>>(); | 1861 var o = new core.List<core.List<core.String>>(); |
| 1848 o.add(buildUnnamed1027()); | 1862 o.add(buildUnnamed1030()); |
| 1849 o.add(buildUnnamed1027()); | 1863 o.add(buildUnnamed1030()); |
| 1850 return o; | 1864 return o; |
| 1851 } | 1865 } |
| 1852 | 1866 |
| 1853 checkUnnamed1028(core.List<core.List<core.String>> o) { | 1867 checkUnnamed1031(core.List<core.List<core.String>> o) { |
| 1854 unittest.expect(o, unittest.hasLength(2)); | 1868 unittest.expect(o, unittest.hasLength(2)); |
| 1855 checkUnnamed1027(o[0]); | 1869 checkUnnamed1030(o[0]); |
| 1856 checkUnnamed1027(o[1]); | 1870 checkUnnamed1030(o[1]); |
| 1857 } | 1871 } |
| 1858 | 1872 |
| 1859 buildUnnamed1029() { | 1873 buildUnnamed1032() { |
| 1860 var o = new core.Map<core.String, core.String>(); | 1874 var o = new core.Map<core.String, core.String>(); |
| 1861 o["x"] = "foo"; | 1875 o["x"] = "foo"; |
| 1862 o["y"] = "foo"; | 1876 o["y"] = "foo"; |
| 1863 return o; | 1877 return o; |
| 1864 } | 1878 } |
| 1865 | 1879 |
| 1866 checkUnnamed1029(core.Map<core.String, core.String> o) { | 1880 checkUnnamed1032(core.Map<core.String, core.String> o) { |
| 1867 unittest.expect(o, unittest.hasLength(2)); | 1881 unittest.expect(o, unittest.hasLength(2)); |
| 1868 unittest.expect(o["x"], unittest.equals('foo')); | 1882 unittest.expect(o["x"], unittest.equals('foo')); |
| 1869 unittest.expect(o["y"], unittest.equals('foo')); | 1883 unittest.expect(o["y"], unittest.equals('foo')); |
| 1870 } | 1884 } |
| 1871 | 1885 |
| 1872 core.int buildCounterGaData = 0; | 1886 core.int buildCounterGaData = 0; |
| 1873 buildGaData() { | 1887 buildGaData() { |
| 1874 var o = new api.GaData(); | 1888 var o = new api.GaData(); |
| 1875 buildCounterGaData++; | 1889 buildCounterGaData++; |
| 1876 if (buildCounterGaData < 3) { | 1890 if (buildCounterGaData < 3) { |
| 1877 o.columnHeaders = buildUnnamed1021(); | 1891 o.columnHeaders = buildUnnamed1024(); |
| 1878 o.containsSampledData = true; | 1892 o.containsSampledData = true; |
| 1879 o.dataLastRefreshed = "foo"; | 1893 o.dataLastRefreshed = "foo"; |
| 1880 o.dataTable = buildGaDataDataTable(); | 1894 o.dataTable = buildGaDataDataTable(); |
| 1881 o.id = "foo"; | 1895 o.id = "foo"; |
| 1882 o.itemsPerPage = 42; | 1896 o.itemsPerPage = 42; |
| 1883 o.kind = "foo"; | 1897 o.kind = "foo"; |
| 1884 o.nextLink = "foo"; | 1898 o.nextLink = "foo"; |
| 1885 o.previousLink = "foo"; | 1899 o.previousLink = "foo"; |
| 1886 o.profileInfo = buildGaDataProfileInfo(); | 1900 o.profileInfo = buildGaDataProfileInfo(); |
| 1887 o.query = buildGaDataQuery(); | 1901 o.query = buildGaDataQuery(); |
| 1888 o.rows = buildUnnamed1028(); | 1902 o.rows = buildUnnamed1031(); |
| 1889 o.sampleSize = "foo"; | 1903 o.sampleSize = "foo"; |
| 1890 o.sampleSpace = "foo"; | 1904 o.sampleSpace = "foo"; |
| 1891 o.selfLink = "foo"; | 1905 o.selfLink = "foo"; |
| 1892 o.totalResults = 42; | 1906 o.totalResults = 42; |
| 1893 o.totalsForAllResults = buildUnnamed1029(); | 1907 o.totalsForAllResults = buildUnnamed1032(); |
| 1894 } | 1908 } |
| 1895 buildCounterGaData--; | 1909 buildCounterGaData--; |
| 1896 return o; | 1910 return o; |
| 1897 } | 1911 } |
| 1898 | 1912 |
| 1899 checkGaData(api.GaData o) { | 1913 checkGaData(api.GaData o) { |
| 1900 buildCounterGaData++; | 1914 buildCounterGaData++; |
| 1901 if (buildCounterGaData < 3) { | 1915 if (buildCounterGaData < 3) { |
| 1902 checkUnnamed1021(o.columnHeaders); | 1916 checkUnnamed1024(o.columnHeaders); |
| 1903 unittest.expect(o.containsSampledData, unittest.isTrue); | 1917 unittest.expect(o.containsSampledData, unittest.isTrue); |
| 1904 unittest.expect(o.dataLastRefreshed, unittest.equals('foo')); | 1918 unittest.expect(o.dataLastRefreshed, unittest.equals('foo')); |
| 1905 checkGaDataDataTable(o.dataTable); | 1919 checkGaDataDataTable(o.dataTable); |
| 1906 unittest.expect(o.id, unittest.equals('foo')); | 1920 unittest.expect(o.id, unittest.equals('foo')); |
| 1907 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 1921 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 1908 unittest.expect(o.kind, unittest.equals('foo')); | 1922 unittest.expect(o.kind, unittest.equals('foo')); |
| 1909 unittest.expect(o.nextLink, unittest.equals('foo')); | 1923 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 1910 unittest.expect(o.previousLink, unittest.equals('foo')); | 1924 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 1911 checkGaDataProfileInfo(o.profileInfo); | 1925 checkGaDataProfileInfo(o.profileInfo); |
| 1912 checkGaDataQuery(o.query); | 1926 checkGaDataQuery(o.query); |
| 1913 checkUnnamed1028(o.rows); | 1927 checkUnnamed1031(o.rows); |
| 1914 unittest.expect(o.sampleSize, unittest.equals('foo')); | 1928 unittest.expect(o.sampleSize, unittest.equals('foo')); |
| 1915 unittest.expect(o.sampleSpace, unittest.equals('foo')); | 1929 unittest.expect(o.sampleSpace, unittest.equals('foo')); |
| 1916 unittest.expect(o.selfLink, unittest.equals('foo')); | 1930 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1917 unittest.expect(o.totalResults, unittest.equals(42)); | 1931 unittest.expect(o.totalResults, unittest.equals(42)); |
| 1918 checkUnnamed1029(o.totalsForAllResults); | 1932 checkUnnamed1032(o.totalsForAllResults); |
| 1919 } | 1933 } |
| 1920 buildCounterGaData--; | 1934 buildCounterGaData--; |
| 1921 } | 1935 } |
| 1922 | 1936 |
| 1923 core.int buildCounterGoalEventDetailsEventConditions = 0; | 1937 core.int buildCounterGoalEventDetailsEventConditions = 0; |
| 1924 buildGoalEventDetailsEventConditions() { | 1938 buildGoalEventDetailsEventConditions() { |
| 1925 var o = new api.GoalEventDetailsEventConditions(); | 1939 var o = new api.GoalEventDetailsEventConditions(); |
| 1926 buildCounterGoalEventDetailsEventConditions++; | 1940 buildCounterGoalEventDetailsEventConditions++; |
| 1927 if (buildCounterGoalEventDetailsEventConditions < 3) { | 1941 if (buildCounterGoalEventDetailsEventConditions < 3) { |
| 1928 o.comparisonType = "foo"; | 1942 o.comparisonType = "foo"; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1940 if (buildCounterGoalEventDetailsEventConditions < 3) { | 1954 if (buildCounterGoalEventDetailsEventConditions < 3) { |
| 1941 unittest.expect(o.comparisonType, unittest.equals('foo')); | 1955 unittest.expect(o.comparisonType, unittest.equals('foo')); |
| 1942 unittest.expect(o.comparisonValue, unittest.equals('foo')); | 1956 unittest.expect(o.comparisonValue, unittest.equals('foo')); |
| 1943 unittest.expect(o.expression, unittest.equals('foo')); | 1957 unittest.expect(o.expression, unittest.equals('foo')); |
| 1944 unittest.expect(o.matchType, unittest.equals('foo')); | 1958 unittest.expect(o.matchType, unittest.equals('foo')); |
| 1945 unittest.expect(o.type, unittest.equals('foo')); | 1959 unittest.expect(o.type, unittest.equals('foo')); |
| 1946 } | 1960 } |
| 1947 buildCounterGoalEventDetailsEventConditions--; | 1961 buildCounterGoalEventDetailsEventConditions--; |
| 1948 } | 1962 } |
| 1949 | 1963 |
| 1950 buildUnnamed1030() { | 1964 buildUnnamed1033() { |
| 1951 var o = new core.List<api.GoalEventDetailsEventConditions>(); | 1965 var o = new core.List<api.GoalEventDetailsEventConditions>(); |
| 1952 o.add(buildGoalEventDetailsEventConditions()); | 1966 o.add(buildGoalEventDetailsEventConditions()); |
| 1953 o.add(buildGoalEventDetailsEventConditions()); | 1967 o.add(buildGoalEventDetailsEventConditions()); |
| 1954 return o; | 1968 return o; |
| 1955 } | 1969 } |
| 1956 | 1970 |
| 1957 checkUnnamed1030(core.List<api.GoalEventDetailsEventConditions> o) { | 1971 checkUnnamed1033(core.List<api.GoalEventDetailsEventConditions> o) { |
| 1958 unittest.expect(o, unittest.hasLength(2)); | 1972 unittest.expect(o, unittest.hasLength(2)); |
| 1959 checkGoalEventDetailsEventConditions(o[0]); | 1973 checkGoalEventDetailsEventConditions(o[0]); |
| 1960 checkGoalEventDetailsEventConditions(o[1]); | 1974 checkGoalEventDetailsEventConditions(o[1]); |
| 1961 } | 1975 } |
| 1962 | 1976 |
| 1963 core.int buildCounterGoalEventDetails = 0; | 1977 core.int buildCounterGoalEventDetails = 0; |
| 1964 buildGoalEventDetails() { | 1978 buildGoalEventDetails() { |
| 1965 var o = new api.GoalEventDetails(); | 1979 var o = new api.GoalEventDetails(); |
| 1966 buildCounterGoalEventDetails++; | 1980 buildCounterGoalEventDetails++; |
| 1967 if (buildCounterGoalEventDetails < 3) { | 1981 if (buildCounterGoalEventDetails < 3) { |
| 1968 o.eventConditions = buildUnnamed1030(); | 1982 o.eventConditions = buildUnnamed1033(); |
| 1969 o.useEventValue = true; | 1983 o.useEventValue = true; |
| 1970 } | 1984 } |
| 1971 buildCounterGoalEventDetails--; | 1985 buildCounterGoalEventDetails--; |
| 1972 return o; | 1986 return o; |
| 1973 } | 1987 } |
| 1974 | 1988 |
| 1975 checkGoalEventDetails(api.GoalEventDetails o) { | 1989 checkGoalEventDetails(api.GoalEventDetails o) { |
| 1976 buildCounterGoalEventDetails++; | 1990 buildCounterGoalEventDetails++; |
| 1977 if (buildCounterGoalEventDetails < 3) { | 1991 if (buildCounterGoalEventDetails < 3) { |
| 1978 checkUnnamed1030(o.eventConditions); | 1992 checkUnnamed1033(o.eventConditions); |
| 1979 unittest.expect(o.useEventValue, unittest.isTrue); | 1993 unittest.expect(o.useEventValue, unittest.isTrue); |
| 1980 } | 1994 } |
| 1981 buildCounterGoalEventDetails--; | 1995 buildCounterGoalEventDetails--; |
| 1982 } | 1996 } |
| 1983 | 1997 |
| 1984 core.int buildCounterGoalParentLink = 0; | 1998 core.int buildCounterGoalParentLink = 0; |
| 1985 buildGoalParentLink() { | 1999 buildGoalParentLink() { |
| 1986 var o = new api.GoalParentLink(); | 2000 var o = new api.GoalParentLink(); |
| 1987 buildCounterGoalParentLink++; | 2001 buildCounterGoalParentLink++; |
| 1988 if (buildCounterGoalParentLink < 3) { | 2002 if (buildCounterGoalParentLink < 3) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2018 checkGoalUrlDestinationDetailsSteps(api.GoalUrlDestinationDetailsSteps o) { | 2032 checkGoalUrlDestinationDetailsSteps(api.GoalUrlDestinationDetailsSteps o) { |
| 2019 buildCounterGoalUrlDestinationDetailsSteps++; | 2033 buildCounterGoalUrlDestinationDetailsSteps++; |
| 2020 if (buildCounterGoalUrlDestinationDetailsSteps < 3) { | 2034 if (buildCounterGoalUrlDestinationDetailsSteps < 3) { |
| 2021 unittest.expect(o.name, unittest.equals('foo')); | 2035 unittest.expect(o.name, unittest.equals('foo')); |
| 2022 unittest.expect(o.number, unittest.equals(42)); | 2036 unittest.expect(o.number, unittest.equals(42)); |
| 2023 unittest.expect(o.url, unittest.equals('foo')); | 2037 unittest.expect(o.url, unittest.equals('foo')); |
| 2024 } | 2038 } |
| 2025 buildCounterGoalUrlDestinationDetailsSteps--; | 2039 buildCounterGoalUrlDestinationDetailsSteps--; |
| 2026 } | 2040 } |
| 2027 | 2041 |
| 2028 buildUnnamed1031() { | 2042 buildUnnamed1034() { |
| 2029 var o = new core.List<api.GoalUrlDestinationDetailsSteps>(); | 2043 var o = new core.List<api.GoalUrlDestinationDetailsSteps>(); |
| 2030 o.add(buildGoalUrlDestinationDetailsSteps()); | 2044 o.add(buildGoalUrlDestinationDetailsSteps()); |
| 2031 o.add(buildGoalUrlDestinationDetailsSteps()); | 2045 o.add(buildGoalUrlDestinationDetailsSteps()); |
| 2032 return o; | 2046 return o; |
| 2033 } | 2047 } |
| 2034 | 2048 |
| 2035 checkUnnamed1031(core.List<api.GoalUrlDestinationDetailsSteps> o) { | 2049 checkUnnamed1034(core.List<api.GoalUrlDestinationDetailsSteps> o) { |
| 2036 unittest.expect(o, unittest.hasLength(2)); | 2050 unittest.expect(o, unittest.hasLength(2)); |
| 2037 checkGoalUrlDestinationDetailsSteps(o[0]); | 2051 checkGoalUrlDestinationDetailsSteps(o[0]); |
| 2038 checkGoalUrlDestinationDetailsSteps(o[1]); | 2052 checkGoalUrlDestinationDetailsSteps(o[1]); |
| 2039 } | 2053 } |
| 2040 | 2054 |
| 2041 core.int buildCounterGoalUrlDestinationDetails = 0; | 2055 core.int buildCounterGoalUrlDestinationDetails = 0; |
| 2042 buildGoalUrlDestinationDetails() { | 2056 buildGoalUrlDestinationDetails() { |
| 2043 var o = new api.GoalUrlDestinationDetails(); | 2057 var o = new api.GoalUrlDestinationDetails(); |
| 2044 buildCounterGoalUrlDestinationDetails++; | 2058 buildCounterGoalUrlDestinationDetails++; |
| 2045 if (buildCounterGoalUrlDestinationDetails < 3) { | 2059 if (buildCounterGoalUrlDestinationDetails < 3) { |
| 2046 o.caseSensitive = true; | 2060 o.caseSensitive = true; |
| 2047 o.firstStepRequired = true; | 2061 o.firstStepRequired = true; |
| 2048 o.matchType = "foo"; | 2062 o.matchType = "foo"; |
| 2049 o.steps = buildUnnamed1031(); | 2063 o.steps = buildUnnamed1034(); |
| 2050 o.url = "foo"; | 2064 o.url = "foo"; |
| 2051 } | 2065 } |
| 2052 buildCounterGoalUrlDestinationDetails--; | 2066 buildCounterGoalUrlDestinationDetails--; |
| 2053 return o; | 2067 return o; |
| 2054 } | 2068 } |
| 2055 | 2069 |
| 2056 checkGoalUrlDestinationDetails(api.GoalUrlDestinationDetails o) { | 2070 checkGoalUrlDestinationDetails(api.GoalUrlDestinationDetails o) { |
| 2057 buildCounterGoalUrlDestinationDetails++; | 2071 buildCounterGoalUrlDestinationDetails++; |
| 2058 if (buildCounterGoalUrlDestinationDetails < 3) { | 2072 if (buildCounterGoalUrlDestinationDetails < 3) { |
| 2059 unittest.expect(o.caseSensitive, unittest.isTrue); | 2073 unittest.expect(o.caseSensitive, unittest.isTrue); |
| 2060 unittest.expect(o.firstStepRequired, unittest.isTrue); | 2074 unittest.expect(o.firstStepRequired, unittest.isTrue); |
| 2061 unittest.expect(o.matchType, unittest.equals('foo')); | 2075 unittest.expect(o.matchType, unittest.equals('foo')); |
| 2062 checkUnnamed1031(o.steps); | 2076 checkUnnamed1034(o.steps); |
| 2063 unittest.expect(o.url, unittest.equals('foo')); | 2077 unittest.expect(o.url, unittest.equals('foo')); |
| 2064 } | 2078 } |
| 2065 buildCounterGoalUrlDestinationDetails--; | 2079 buildCounterGoalUrlDestinationDetails--; |
| 2066 } | 2080 } |
| 2067 | 2081 |
| 2068 core.int buildCounterGoalVisitNumPagesDetails = 0; | 2082 core.int buildCounterGoalVisitNumPagesDetails = 0; |
| 2069 buildGoalVisitNumPagesDetails() { | 2083 buildGoalVisitNumPagesDetails() { |
| 2070 var o = new api.GoalVisitNumPagesDetails(); | 2084 var o = new api.GoalVisitNumPagesDetails(); |
| 2071 buildCounterGoalVisitNumPagesDetails++; | 2085 buildCounterGoalVisitNumPagesDetails++; |
| 2072 if (buildCounterGoalVisitNumPagesDetails < 3) { | 2086 if (buildCounterGoalVisitNumPagesDetails < 3) { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2133 } | 2147 } |
| 2134 buildCounterGoal--; | 2148 buildCounterGoal--; |
| 2135 return o; | 2149 return o; |
| 2136 } | 2150 } |
| 2137 | 2151 |
| 2138 checkGoal(api.Goal o) { | 2152 checkGoal(api.Goal o) { |
| 2139 buildCounterGoal++; | 2153 buildCounterGoal++; |
| 2140 if (buildCounterGoal < 3) { | 2154 if (buildCounterGoal < 3) { |
| 2141 unittest.expect(o.accountId, unittest.equals('foo')); | 2155 unittest.expect(o.accountId, unittest.equals('foo')); |
| 2142 unittest.expect(o.active, unittest.isTrue); | 2156 unittest.expect(o.active, unittest.isTrue); |
| 2143 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 2157 unittest.expect( |
| 2158 o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2144 checkGoalEventDetails(o.eventDetails); | 2159 checkGoalEventDetails(o.eventDetails); |
| 2145 unittest.expect(o.id, unittest.equals('foo')); | 2160 unittest.expect(o.id, unittest.equals('foo')); |
| 2146 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); | 2161 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); |
| 2147 unittest.expect(o.kind, unittest.equals('foo')); | 2162 unittest.expect(o.kind, unittest.equals('foo')); |
| 2148 unittest.expect(o.name, unittest.equals('foo')); | 2163 unittest.expect(o.name, unittest.equals('foo')); |
| 2149 checkGoalParentLink(o.parentLink); | 2164 checkGoalParentLink(o.parentLink); |
| 2150 unittest.expect(o.profileId, unittest.equals('foo')); | 2165 unittest.expect(o.profileId, unittest.equals('foo')); |
| 2151 unittest.expect(o.selfLink, unittest.equals('foo')); | 2166 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 2152 unittest.expect(o.type, unittest.equals('foo')); | 2167 unittest.expect(o.type, unittest.equals('foo')); |
| 2153 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 2168 unittest.expect( |
| 2169 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2154 checkGoalUrlDestinationDetails(o.urlDestinationDetails); | 2170 checkGoalUrlDestinationDetails(o.urlDestinationDetails); |
| 2155 unittest.expect(o.value, unittest.equals(42.0)); | 2171 unittest.expect(o.value, unittest.equals(42.0)); |
| 2156 checkGoalVisitNumPagesDetails(o.visitNumPagesDetails); | 2172 checkGoalVisitNumPagesDetails(o.visitNumPagesDetails); |
| 2157 checkGoalVisitTimeOnSiteDetails(o.visitTimeOnSiteDetails); | 2173 checkGoalVisitTimeOnSiteDetails(o.visitTimeOnSiteDetails); |
| 2158 unittest.expect(o.webPropertyId, unittest.equals('foo')); | 2174 unittest.expect(o.webPropertyId, unittest.equals('foo')); |
| 2159 } | 2175 } |
| 2160 buildCounterGoal--; | 2176 buildCounterGoal--; |
| 2161 } | 2177 } |
| 2162 | 2178 |
| 2163 buildUnnamed1032() { | 2179 buildUnnamed1035() { |
| 2164 var o = new core.List<api.Goal>(); | 2180 var o = new core.List<api.Goal>(); |
| 2165 o.add(buildGoal()); | 2181 o.add(buildGoal()); |
| 2166 o.add(buildGoal()); | 2182 o.add(buildGoal()); |
| 2167 return o; | 2183 return o; |
| 2168 } | 2184 } |
| 2169 | 2185 |
| 2170 checkUnnamed1032(core.List<api.Goal> o) { | 2186 checkUnnamed1035(core.List<api.Goal> o) { |
| 2171 unittest.expect(o, unittest.hasLength(2)); | 2187 unittest.expect(o, unittest.hasLength(2)); |
| 2172 checkGoal(o[0]); | 2188 checkGoal(o[0]); |
| 2173 checkGoal(o[1]); | 2189 checkGoal(o[1]); |
| 2174 } | 2190 } |
| 2175 | 2191 |
| 2176 core.int buildCounterGoals = 0; | 2192 core.int buildCounterGoals = 0; |
| 2177 buildGoals() { | 2193 buildGoals() { |
| 2178 var o = new api.Goals(); | 2194 var o = new api.Goals(); |
| 2179 buildCounterGoals++; | 2195 buildCounterGoals++; |
| 2180 if (buildCounterGoals < 3) { | 2196 if (buildCounterGoals < 3) { |
| 2181 o.items = buildUnnamed1032(); | 2197 o.items = buildUnnamed1035(); |
| 2182 o.itemsPerPage = 42; | 2198 o.itemsPerPage = 42; |
| 2183 o.kind = "foo"; | 2199 o.kind = "foo"; |
| 2184 o.nextLink = "foo"; | 2200 o.nextLink = "foo"; |
| 2185 o.previousLink = "foo"; | 2201 o.previousLink = "foo"; |
| 2186 o.startIndex = 42; | 2202 o.startIndex = 42; |
| 2187 o.totalResults = 42; | 2203 o.totalResults = 42; |
| 2188 o.username = "foo"; | 2204 o.username = "foo"; |
| 2189 } | 2205 } |
| 2190 buildCounterGoals--; | 2206 buildCounterGoals--; |
| 2191 return o; | 2207 return o; |
| 2192 } | 2208 } |
| 2193 | 2209 |
| 2194 checkGoals(api.Goals o) { | 2210 checkGoals(api.Goals o) { |
| 2195 buildCounterGoals++; | 2211 buildCounterGoals++; |
| 2196 if (buildCounterGoals < 3) { | 2212 if (buildCounterGoals < 3) { |
| 2197 checkUnnamed1032(o.items); | 2213 checkUnnamed1035(o.items); |
| 2198 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 2214 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 2199 unittest.expect(o.kind, unittest.equals('foo')); | 2215 unittest.expect(o.kind, unittest.equals('foo')); |
| 2200 unittest.expect(o.nextLink, unittest.equals('foo')); | 2216 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 2201 unittest.expect(o.previousLink, unittest.equals('foo')); | 2217 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 2202 unittest.expect(o.startIndex, unittest.equals(42)); | 2218 unittest.expect(o.startIndex, unittest.equals(42)); |
| 2203 unittest.expect(o.totalResults, unittest.equals(42)); | 2219 unittest.expect(o.totalResults, unittest.equals(42)); |
| 2204 unittest.expect(o.username, unittest.equals('foo')); | 2220 unittest.expect(o.username, unittest.equals('foo')); |
| 2205 } | 2221 } |
| 2206 buildCounterGoals--; | 2222 buildCounterGoals--; |
| 2207 } | 2223 } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2286 checkMcfDataColumnHeaders(api.McfDataColumnHeaders o) { | 2302 checkMcfDataColumnHeaders(api.McfDataColumnHeaders o) { |
| 2287 buildCounterMcfDataColumnHeaders++; | 2303 buildCounterMcfDataColumnHeaders++; |
| 2288 if (buildCounterMcfDataColumnHeaders < 3) { | 2304 if (buildCounterMcfDataColumnHeaders < 3) { |
| 2289 unittest.expect(o.columnType, unittest.equals('foo')); | 2305 unittest.expect(o.columnType, unittest.equals('foo')); |
| 2290 unittest.expect(o.dataType, unittest.equals('foo')); | 2306 unittest.expect(o.dataType, unittest.equals('foo')); |
| 2291 unittest.expect(o.name, unittest.equals('foo')); | 2307 unittest.expect(o.name, unittest.equals('foo')); |
| 2292 } | 2308 } |
| 2293 buildCounterMcfDataColumnHeaders--; | 2309 buildCounterMcfDataColumnHeaders--; |
| 2294 } | 2310 } |
| 2295 | 2311 |
| 2296 buildUnnamed1033() { | 2312 buildUnnamed1036() { |
| 2297 var o = new core.List<api.McfDataColumnHeaders>(); | 2313 var o = new core.List<api.McfDataColumnHeaders>(); |
| 2298 o.add(buildMcfDataColumnHeaders()); | 2314 o.add(buildMcfDataColumnHeaders()); |
| 2299 o.add(buildMcfDataColumnHeaders()); | 2315 o.add(buildMcfDataColumnHeaders()); |
| 2300 return o; | 2316 return o; |
| 2301 } | 2317 } |
| 2302 | 2318 |
| 2303 checkUnnamed1033(core.List<api.McfDataColumnHeaders> o) { | 2319 checkUnnamed1036(core.List<api.McfDataColumnHeaders> o) { |
| 2304 unittest.expect(o, unittest.hasLength(2)); | 2320 unittest.expect(o, unittest.hasLength(2)); |
| 2305 checkMcfDataColumnHeaders(o[0]); | 2321 checkMcfDataColumnHeaders(o[0]); |
| 2306 checkMcfDataColumnHeaders(o[1]); | 2322 checkMcfDataColumnHeaders(o[1]); |
| 2307 } | 2323 } |
| 2308 | 2324 |
| 2309 core.int buildCounterMcfDataProfileInfo = 0; | 2325 core.int buildCounterMcfDataProfileInfo = 0; |
| 2310 buildMcfDataProfileInfo() { | 2326 buildMcfDataProfileInfo() { |
| 2311 var o = new api.McfDataProfileInfo(); | 2327 var o = new api.McfDataProfileInfo(); |
| 2312 buildCounterMcfDataProfileInfo++; | 2328 buildCounterMcfDataProfileInfo++; |
| 2313 if (buildCounterMcfDataProfileInfo < 3) { | 2329 if (buildCounterMcfDataProfileInfo < 3) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2328 unittest.expect(o.accountId, unittest.equals('foo')); | 2344 unittest.expect(o.accountId, unittest.equals('foo')); |
| 2329 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); | 2345 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); |
| 2330 unittest.expect(o.profileId, unittest.equals('foo')); | 2346 unittest.expect(o.profileId, unittest.equals('foo')); |
| 2331 unittest.expect(o.profileName, unittest.equals('foo')); | 2347 unittest.expect(o.profileName, unittest.equals('foo')); |
| 2332 unittest.expect(o.tableId, unittest.equals('foo')); | 2348 unittest.expect(o.tableId, unittest.equals('foo')); |
| 2333 unittest.expect(o.webPropertyId, unittest.equals('foo')); | 2349 unittest.expect(o.webPropertyId, unittest.equals('foo')); |
| 2334 } | 2350 } |
| 2335 buildCounterMcfDataProfileInfo--; | 2351 buildCounterMcfDataProfileInfo--; |
| 2336 } | 2352 } |
| 2337 | 2353 |
| 2338 buildUnnamed1034() { | 2354 buildUnnamed1037() { |
| 2339 var o = new core.List<core.String>(); | 2355 var o = new core.List<core.String>(); |
| 2340 o.add("foo"); | 2356 o.add("foo"); |
| 2341 o.add("foo"); | 2357 o.add("foo"); |
| 2342 return o; | 2358 return o; |
| 2343 } | 2359 } |
| 2344 | 2360 |
| 2345 checkUnnamed1034(core.List<core.String> o) { | 2361 checkUnnamed1037(core.List<core.String> o) { |
| 2346 unittest.expect(o, unittest.hasLength(2)); | 2362 unittest.expect(o, unittest.hasLength(2)); |
| 2347 unittest.expect(o[0], unittest.equals('foo')); | 2363 unittest.expect(o[0], unittest.equals('foo')); |
| 2348 unittest.expect(o[1], unittest.equals('foo')); | 2364 unittest.expect(o[1], unittest.equals('foo')); |
| 2349 } | 2365 } |
| 2350 | 2366 |
| 2351 buildUnnamed1035() { | 2367 buildUnnamed1038() { |
| 2352 var o = new core.List<core.String>(); | 2368 var o = new core.List<core.String>(); |
| 2353 o.add("foo"); | 2369 o.add("foo"); |
| 2354 o.add("foo"); | 2370 o.add("foo"); |
| 2355 return o; | 2371 return o; |
| 2356 } | 2372 } |
| 2357 | 2373 |
| 2358 checkUnnamed1035(core.List<core.String> o) { | 2374 checkUnnamed1038(core.List<core.String> o) { |
| 2359 unittest.expect(o, unittest.hasLength(2)); | 2375 unittest.expect(o, unittest.hasLength(2)); |
| 2360 unittest.expect(o[0], unittest.equals('foo')); | 2376 unittest.expect(o[0], unittest.equals('foo')); |
| 2361 unittest.expect(o[1], unittest.equals('foo')); | 2377 unittest.expect(o[1], unittest.equals('foo')); |
| 2362 } | 2378 } |
| 2363 | 2379 |
| 2364 core.int buildCounterMcfDataQuery = 0; | 2380 core.int buildCounterMcfDataQuery = 0; |
| 2365 buildMcfDataQuery() { | 2381 buildMcfDataQuery() { |
| 2366 var o = new api.McfDataQuery(); | 2382 var o = new api.McfDataQuery(); |
| 2367 buildCounterMcfDataQuery++; | 2383 buildCounterMcfDataQuery++; |
| 2368 if (buildCounterMcfDataQuery < 3) { | 2384 if (buildCounterMcfDataQuery < 3) { |
| 2369 o.dimensions = "foo"; | 2385 o.dimensions = "foo"; |
| 2370 o.end_date = "foo"; | 2386 o.end_date = "foo"; |
| 2371 o.filters = "foo"; | 2387 o.filters = "foo"; |
| 2372 o.ids = "foo"; | 2388 o.ids = "foo"; |
| 2373 o.max_results = 42; | 2389 o.max_results = 42; |
| 2374 o.metrics = buildUnnamed1034(); | 2390 o.metrics = buildUnnamed1037(); |
| 2375 o.samplingLevel = "foo"; | 2391 o.samplingLevel = "foo"; |
| 2376 o.segment = "foo"; | 2392 o.segment = "foo"; |
| 2377 o.sort = buildUnnamed1035(); | 2393 o.sort = buildUnnamed1038(); |
| 2378 o.start_date = "foo"; | 2394 o.start_date = "foo"; |
| 2379 o.start_index = 42; | 2395 o.start_index = 42; |
| 2380 } | 2396 } |
| 2381 buildCounterMcfDataQuery--; | 2397 buildCounterMcfDataQuery--; |
| 2382 return o; | 2398 return o; |
| 2383 } | 2399 } |
| 2384 | 2400 |
| 2385 checkMcfDataQuery(api.McfDataQuery o) { | 2401 checkMcfDataQuery(api.McfDataQuery o) { |
| 2386 buildCounterMcfDataQuery++; | 2402 buildCounterMcfDataQuery++; |
| 2387 if (buildCounterMcfDataQuery < 3) { | 2403 if (buildCounterMcfDataQuery < 3) { |
| 2388 unittest.expect(o.dimensions, unittest.equals('foo')); | 2404 unittest.expect(o.dimensions, unittest.equals('foo')); |
| 2389 unittest.expect(o.end_date, unittest.equals('foo')); | 2405 unittest.expect(o.end_date, unittest.equals('foo')); |
| 2390 unittest.expect(o.filters, unittest.equals('foo')); | 2406 unittest.expect(o.filters, unittest.equals('foo')); |
| 2391 unittest.expect(o.ids, unittest.equals('foo')); | 2407 unittest.expect(o.ids, unittest.equals('foo')); |
| 2392 unittest.expect(o.max_results, unittest.equals(42)); | 2408 unittest.expect(o.max_results, unittest.equals(42)); |
| 2393 checkUnnamed1034(o.metrics); | 2409 checkUnnamed1037(o.metrics); |
| 2394 unittest.expect(o.samplingLevel, unittest.equals('foo')); | 2410 unittest.expect(o.samplingLevel, unittest.equals('foo')); |
| 2395 unittest.expect(o.segment, unittest.equals('foo')); | 2411 unittest.expect(o.segment, unittest.equals('foo')); |
| 2396 checkUnnamed1035(o.sort); | 2412 checkUnnamed1038(o.sort); |
| 2397 unittest.expect(o.start_date, unittest.equals('foo')); | 2413 unittest.expect(o.start_date, unittest.equals('foo')); |
| 2398 unittest.expect(o.start_index, unittest.equals(42)); | 2414 unittest.expect(o.start_index, unittest.equals(42)); |
| 2399 } | 2415 } |
| 2400 buildCounterMcfDataQuery--; | 2416 buildCounterMcfDataQuery--; |
| 2401 } | 2417 } |
| 2402 | 2418 |
| 2403 core.int buildCounterMcfDataRowsConversionPathValue = 0; | 2419 core.int buildCounterMcfDataRowsConversionPathValue = 0; |
| 2404 buildMcfDataRowsConversionPathValue() { | 2420 buildMcfDataRowsConversionPathValue() { |
| 2405 var o = new api.McfDataRowsConversionPathValue(); | 2421 var o = new api.McfDataRowsConversionPathValue(); |
| 2406 buildCounterMcfDataRowsConversionPathValue++; | 2422 buildCounterMcfDataRowsConversionPathValue++; |
| 2407 if (buildCounterMcfDataRowsConversionPathValue < 3) { | 2423 if (buildCounterMcfDataRowsConversionPathValue < 3) { |
| 2408 o.interactionType = "foo"; | 2424 o.interactionType = "foo"; |
| 2409 o.nodeValue = "foo"; | 2425 o.nodeValue = "foo"; |
| 2410 } | 2426 } |
| 2411 buildCounterMcfDataRowsConversionPathValue--; | 2427 buildCounterMcfDataRowsConversionPathValue--; |
| 2412 return o; | 2428 return o; |
| 2413 } | 2429 } |
| 2414 | 2430 |
| 2415 checkMcfDataRowsConversionPathValue(api.McfDataRowsConversionPathValue o) { | 2431 checkMcfDataRowsConversionPathValue(api.McfDataRowsConversionPathValue o) { |
| 2416 buildCounterMcfDataRowsConversionPathValue++; | 2432 buildCounterMcfDataRowsConversionPathValue++; |
| 2417 if (buildCounterMcfDataRowsConversionPathValue < 3) { | 2433 if (buildCounterMcfDataRowsConversionPathValue < 3) { |
| 2418 unittest.expect(o.interactionType, unittest.equals('foo')); | 2434 unittest.expect(o.interactionType, unittest.equals('foo')); |
| 2419 unittest.expect(o.nodeValue, unittest.equals('foo')); | 2435 unittest.expect(o.nodeValue, unittest.equals('foo')); |
| 2420 } | 2436 } |
| 2421 buildCounterMcfDataRowsConversionPathValue--; | 2437 buildCounterMcfDataRowsConversionPathValue--; |
| 2422 } | 2438 } |
| 2423 | 2439 |
| 2424 buildUnnamed1036() { | 2440 buildUnnamed1039() { |
| 2425 var o = new core.List<api.McfDataRowsConversionPathValue>(); | 2441 var o = new core.List<api.McfDataRowsConversionPathValue>(); |
| 2426 o.add(buildMcfDataRowsConversionPathValue()); | 2442 o.add(buildMcfDataRowsConversionPathValue()); |
| 2427 o.add(buildMcfDataRowsConversionPathValue()); | 2443 o.add(buildMcfDataRowsConversionPathValue()); |
| 2428 return o; | 2444 return o; |
| 2429 } | 2445 } |
| 2430 | 2446 |
| 2431 checkUnnamed1036(core.List<api.McfDataRowsConversionPathValue> o) { | 2447 checkUnnamed1039(core.List<api.McfDataRowsConversionPathValue> o) { |
| 2432 unittest.expect(o, unittest.hasLength(2)); | 2448 unittest.expect(o, unittest.hasLength(2)); |
| 2433 checkMcfDataRowsConversionPathValue(o[0]); | 2449 checkMcfDataRowsConversionPathValue(o[0]); |
| 2434 checkMcfDataRowsConversionPathValue(o[1]); | 2450 checkMcfDataRowsConversionPathValue(o[1]); |
| 2435 } | 2451 } |
| 2436 | 2452 |
| 2437 core.int buildCounterMcfDataRows = 0; | 2453 core.int buildCounterMcfDataRows = 0; |
| 2438 buildMcfDataRows() { | 2454 buildMcfDataRows() { |
| 2439 var o = new api.McfDataRows(); | 2455 var o = new api.McfDataRows(); |
| 2440 buildCounterMcfDataRows++; | 2456 buildCounterMcfDataRows++; |
| 2441 if (buildCounterMcfDataRows < 3) { | 2457 if (buildCounterMcfDataRows < 3) { |
| 2442 o.conversionPathValue = buildUnnamed1036(); | 2458 o.conversionPathValue = buildUnnamed1039(); |
| 2443 o.primitiveValue = "foo"; | 2459 o.primitiveValue = "foo"; |
| 2444 } | 2460 } |
| 2445 buildCounterMcfDataRows--; | 2461 buildCounterMcfDataRows--; |
| 2446 return o; | 2462 return o; |
| 2447 } | 2463 } |
| 2448 | 2464 |
| 2449 checkMcfDataRows(api.McfDataRows o) { | 2465 checkMcfDataRows(api.McfDataRows o) { |
| 2450 buildCounterMcfDataRows++; | 2466 buildCounterMcfDataRows++; |
| 2451 if (buildCounterMcfDataRows < 3) { | 2467 if (buildCounterMcfDataRows < 3) { |
| 2452 checkUnnamed1036(o.conversionPathValue); | 2468 checkUnnamed1039(o.conversionPathValue); |
| 2453 unittest.expect(o.primitiveValue, unittest.equals('foo')); | 2469 unittest.expect(o.primitiveValue, unittest.equals('foo')); |
| 2454 } | 2470 } |
| 2455 buildCounterMcfDataRows--; | 2471 buildCounterMcfDataRows--; |
| 2456 } | 2472 } |
| 2457 | 2473 |
| 2458 buildUnnamed1037() { | 2474 buildUnnamed1040() { |
| 2459 var o = new core.List<api.McfDataRows>(); | 2475 var o = new core.List<api.McfDataRows>(); |
| 2460 o.add(buildMcfDataRows()); | 2476 o.add(buildMcfDataRows()); |
| 2461 o.add(buildMcfDataRows()); | 2477 o.add(buildMcfDataRows()); |
| 2462 return o; | 2478 return o; |
| 2463 } | 2479 } |
| 2464 | 2480 |
| 2465 checkUnnamed1037(core.List<api.McfDataRows> o) { | 2481 checkUnnamed1040(core.List<api.McfDataRows> o) { |
| 2466 unittest.expect(o, unittest.hasLength(2)); | 2482 unittest.expect(o, unittest.hasLength(2)); |
| 2467 checkMcfDataRows(o[0]); | 2483 checkMcfDataRows(o[0]); |
| 2468 checkMcfDataRows(o[1]); | 2484 checkMcfDataRows(o[1]); |
| 2469 } | 2485 } |
| 2470 | 2486 |
| 2471 buildUnnamed1038() { | 2487 buildUnnamed1041() { |
| 2472 var o = new core.List<core.List<api.McfDataRows>>(); | 2488 var o = new core.List<core.List<api.McfDataRows>>(); |
| 2473 o.add(buildUnnamed1037()); | 2489 o.add(buildUnnamed1040()); |
| 2474 o.add(buildUnnamed1037()); | 2490 o.add(buildUnnamed1040()); |
| 2475 return o; | 2491 return o; |
| 2476 } | 2492 } |
| 2477 | 2493 |
| 2478 checkUnnamed1038(core.List<core.List<api.McfDataRows>> o) { | 2494 checkUnnamed1041(core.List<core.List<api.McfDataRows>> o) { |
| 2479 unittest.expect(o, unittest.hasLength(2)); | 2495 unittest.expect(o, unittest.hasLength(2)); |
| 2480 checkUnnamed1037(o[0]); | 2496 checkUnnamed1040(o[0]); |
| 2481 checkUnnamed1037(o[1]); | 2497 checkUnnamed1040(o[1]); |
| 2482 } | 2498 } |
| 2483 | 2499 |
| 2484 buildUnnamed1039() { | 2500 buildUnnamed1042() { |
| 2485 var o = new core.Map<core.String, core.String>(); | 2501 var o = new core.Map<core.String, core.String>(); |
| 2486 o["x"] = "foo"; | 2502 o["x"] = "foo"; |
| 2487 o["y"] = "foo"; | 2503 o["y"] = "foo"; |
| 2488 return o; | 2504 return o; |
| 2489 } | 2505 } |
| 2490 | 2506 |
| 2491 checkUnnamed1039(core.Map<core.String, core.String> o) { | 2507 checkUnnamed1042(core.Map<core.String, core.String> o) { |
| 2492 unittest.expect(o, unittest.hasLength(2)); | 2508 unittest.expect(o, unittest.hasLength(2)); |
| 2493 unittest.expect(o["x"], unittest.equals('foo')); | 2509 unittest.expect(o["x"], unittest.equals('foo')); |
| 2494 unittest.expect(o["y"], unittest.equals('foo')); | 2510 unittest.expect(o["y"], unittest.equals('foo')); |
| 2495 } | 2511 } |
| 2496 | 2512 |
| 2497 core.int buildCounterMcfData = 0; | 2513 core.int buildCounterMcfData = 0; |
| 2498 buildMcfData() { | 2514 buildMcfData() { |
| 2499 var o = new api.McfData(); | 2515 var o = new api.McfData(); |
| 2500 buildCounterMcfData++; | 2516 buildCounterMcfData++; |
| 2501 if (buildCounterMcfData < 3) { | 2517 if (buildCounterMcfData < 3) { |
| 2502 o.columnHeaders = buildUnnamed1033(); | 2518 o.columnHeaders = buildUnnamed1036(); |
| 2503 o.containsSampledData = true; | 2519 o.containsSampledData = true; |
| 2504 o.id = "foo"; | 2520 o.id = "foo"; |
| 2505 o.itemsPerPage = 42; | 2521 o.itemsPerPage = 42; |
| 2506 o.kind = "foo"; | 2522 o.kind = "foo"; |
| 2507 o.nextLink = "foo"; | 2523 o.nextLink = "foo"; |
| 2508 o.previousLink = "foo"; | 2524 o.previousLink = "foo"; |
| 2509 o.profileInfo = buildMcfDataProfileInfo(); | 2525 o.profileInfo = buildMcfDataProfileInfo(); |
| 2510 o.query = buildMcfDataQuery(); | 2526 o.query = buildMcfDataQuery(); |
| 2511 o.rows = buildUnnamed1038(); | 2527 o.rows = buildUnnamed1041(); |
| 2512 o.sampleSize = "foo"; | 2528 o.sampleSize = "foo"; |
| 2513 o.sampleSpace = "foo"; | 2529 o.sampleSpace = "foo"; |
| 2514 o.selfLink = "foo"; | 2530 o.selfLink = "foo"; |
| 2515 o.totalResults = 42; | 2531 o.totalResults = 42; |
| 2516 o.totalsForAllResults = buildUnnamed1039(); | 2532 o.totalsForAllResults = buildUnnamed1042(); |
| 2517 } | 2533 } |
| 2518 buildCounterMcfData--; | 2534 buildCounterMcfData--; |
| 2519 return o; | 2535 return o; |
| 2520 } | 2536 } |
| 2521 | 2537 |
| 2522 checkMcfData(api.McfData o) { | 2538 checkMcfData(api.McfData o) { |
| 2523 buildCounterMcfData++; | 2539 buildCounterMcfData++; |
| 2524 if (buildCounterMcfData < 3) { | 2540 if (buildCounterMcfData < 3) { |
| 2525 checkUnnamed1033(o.columnHeaders); | 2541 checkUnnamed1036(o.columnHeaders); |
| 2526 unittest.expect(o.containsSampledData, unittest.isTrue); | 2542 unittest.expect(o.containsSampledData, unittest.isTrue); |
| 2527 unittest.expect(o.id, unittest.equals('foo')); | 2543 unittest.expect(o.id, unittest.equals('foo')); |
| 2528 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 2544 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 2529 unittest.expect(o.kind, unittest.equals('foo')); | 2545 unittest.expect(o.kind, unittest.equals('foo')); |
| 2530 unittest.expect(o.nextLink, unittest.equals('foo')); | 2546 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 2531 unittest.expect(o.previousLink, unittest.equals('foo')); | 2547 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 2532 checkMcfDataProfileInfo(o.profileInfo); | 2548 checkMcfDataProfileInfo(o.profileInfo); |
| 2533 checkMcfDataQuery(o.query); | 2549 checkMcfDataQuery(o.query); |
| 2534 checkUnnamed1038(o.rows); | 2550 checkUnnamed1041(o.rows); |
| 2535 unittest.expect(o.sampleSize, unittest.equals('foo')); | 2551 unittest.expect(o.sampleSize, unittest.equals('foo')); |
| 2536 unittest.expect(o.sampleSpace, unittest.equals('foo')); | 2552 unittest.expect(o.sampleSpace, unittest.equals('foo')); |
| 2537 unittest.expect(o.selfLink, unittest.equals('foo')); | 2553 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 2538 unittest.expect(o.totalResults, unittest.equals(42)); | 2554 unittest.expect(o.totalResults, unittest.equals(42)); |
| 2539 checkUnnamed1039(o.totalsForAllResults); | 2555 checkUnnamed1042(o.totalsForAllResults); |
| 2540 } | 2556 } |
| 2541 buildCounterMcfData--; | 2557 buildCounterMcfData--; |
| 2542 } | 2558 } |
| 2543 | 2559 |
| 2544 core.int buildCounterProfileChildLink = 0; | 2560 core.int buildCounterProfileChildLink = 0; |
| 2545 buildProfileChildLink() { | 2561 buildProfileChildLink() { |
| 2546 var o = new api.ProfileChildLink(); | 2562 var o = new api.ProfileChildLink(); |
| 2547 buildCounterProfileChildLink++; | 2563 buildCounterProfileChildLink++; |
| 2548 if (buildCounterProfileChildLink < 3) { | 2564 if (buildCounterProfileChildLink < 3) { |
| 2549 o.href = "foo"; | 2565 o.href = "foo"; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 2576 | 2592 |
| 2577 checkProfileParentLink(api.ProfileParentLink o) { | 2593 checkProfileParentLink(api.ProfileParentLink o) { |
| 2578 buildCounterProfileParentLink++; | 2594 buildCounterProfileParentLink++; |
| 2579 if (buildCounterProfileParentLink < 3) { | 2595 if (buildCounterProfileParentLink < 3) { |
| 2580 unittest.expect(o.href, unittest.equals('foo')); | 2596 unittest.expect(o.href, unittest.equals('foo')); |
| 2581 unittest.expect(o.type, unittest.equals('foo')); | 2597 unittest.expect(o.type, unittest.equals('foo')); |
| 2582 } | 2598 } |
| 2583 buildCounterProfileParentLink--; | 2599 buildCounterProfileParentLink--; |
| 2584 } | 2600 } |
| 2585 | 2601 |
| 2586 buildUnnamed1040() { | 2602 buildUnnamed1043() { |
| 2587 var o = new core.List<core.String>(); | 2603 var o = new core.List<core.String>(); |
| 2588 o.add("foo"); | 2604 o.add("foo"); |
| 2589 o.add("foo"); | 2605 o.add("foo"); |
| 2590 return o; | 2606 return o; |
| 2591 } | 2607 } |
| 2592 | 2608 |
| 2593 checkUnnamed1040(core.List<core.String> o) { | 2609 checkUnnamed1043(core.List<core.String> o) { |
| 2594 unittest.expect(o, unittest.hasLength(2)); | 2610 unittest.expect(o, unittest.hasLength(2)); |
| 2595 unittest.expect(o[0], unittest.equals('foo')); | 2611 unittest.expect(o[0], unittest.equals('foo')); |
| 2596 unittest.expect(o[1], unittest.equals('foo')); | 2612 unittest.expect(o[1], unittest.equals('foo')); |
| 2597 } | 2613 } |
| 2598 | 2614 |
| 2599 core.int buildCounterProfilePermissions = 0; | 2615 core.int buildCounterProfilePermissions = 0; |
| 2600 buildProfilePermissions() { | 2616 buildProfilePermissions() { |
| 2601 var o = new api.ProfilePermissions(); | 2617 var o = new api.ProfilePermissions(); |
| 2602 buildCounterProfilePermissions++; | 2618 buildCounterProfilePermissions++; |
| 2603 if (buildCounterProfilePermissions < 3) { | 2619 if (buildCounterProfilePermissions < 3) { |
| 2604 o.effective = buildUnnamed1040(); | 2620 o.effective = buildUnnamed1043(); |
| 2605 } | 2621 } |
| 2606 buildCounterProfilePermissions--; | 2622 buildCounterProfilePermissions--; |
| 2607 return o; | 2623 return o; |
| 2608 } | 2624 } |
| 2609 | 2625 |
| 2610 checkProfilePermissions(api.ProfilePermissions o) { | 2626 checkProfilePermissions(api.ProfilePermissions o) { |
| 2611 buildCounterProfilePermissions++; | 2627 buildCounterProfilePermissions++; |
| 2612 if (buildCounterProfilePermissions < 3) { | 2628 if (buildCounterProfilePermissions < 3) { |
| 2613 checkUnnamed1040(o.effective); | 2629 checkUnnamed1043(o.effective); |
| 2614 } | 2630 } |
| 2615 buildCounterProfilePermissions--; | 2631 buildCounterProfilePermissions--; |
| 2616 } | 2632 } |
| 2617 | 2633 |
| 2618 core.int buildCounterProfile = 0; | 2634 core.int buildCounterProfile = 0; |
| 2619 buildProfile() { | 2635 buildProfile() { |
| 2620 var o = new api.Profile(); | 2636 var o = new api.Profile(); |
| 2621 buildCounterProfile++; | 2637 buildCounterProfile++; |
| 2622 if (buildCounterProfile < 3) { | 2638 if (buildCounterProfile < 3) { |
| 2623 o.accountId = "foo"; | 2639 o.accountId = "foo"; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 2650 buildCounterProfile--; | 2666 buildCounterProfile--; |
| 2651 return o; | 2667 return o; |
| 2652 } | 2668 } |
| 2653 | 2669 |
| 2654 checkProfile(api.Profile o) { | 2670 checkProfile(api.Profile o) { |
| 2655 buildCounterProfile++; | 2671 buildCounterProfile++; |
| 2656 if (buildCounterProfile < 3) { | 2672 if (buildCounterProfile < 3) { |
| 2657 unittest.expect(o.accountId, unittest.equals('foo')); | 2673 unittest.expect(o.accountId, unittest.equals('foo')); |
| 2658 unittest.expect(o.botFilteringEnabled, unittest.isTrue); | 2674 unittest.expect(o.botFilteringEnabled, unittest.isTrue); |
| 2659 checkProfileChildLink(o.childLink); | 2675 checkProfileChildLink(o.childLink); |
| 2660 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 2676 unittest.expect( |
| 2677 o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2661 unittest.expect(o.currency, unittest.equals('foo')); | 2678 unittest.expect(o.currency, unittest.equals('foo')); |
| 2662 unittest.expect(o.defaultPage, unittest.equals('foo')); | 2679 unittest.expect(o.defaultPage, unittest.equals('foo')); |
| 2663 unittest.expect(o.eCommerceTracking, unittest.isTrue); | 2680 unittest.expect(o.eCommerceTracking, unittest.isTrue); |
| 2664 unittest.expect(o.enhancedECommerceTracking, unittest.isTrue); | 2681 unittest.expect(o.enhancedECommerceTracking, unittest.isTrue); |
| 2665 unittest.expect(o.excludeQueryParameters, unittest.equals('foo')); | 2682 unittest.expect(o.excludeQueryParameters, unittest.equals('foo')); |
| 2666 unittest.expect(o.id, unittest.equals('foo')); | 2683 unittest.expect(o.id, unittest.equals('foo')); |
| 2667 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); | 2684 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); |
| 2668 unittest.expect(o.kind, unittest.equals('foo')); | 2685 unittest.expect(o.kind, unittest.equals('foo')); |
| 2669 unittest.expect(o.name, unittest.equals('foo')); | 2686 unittest.expect(o.name, unittest.equals('foo')); |
| 2670 checkProfileParentLink(o.parentLink); | 2687 checkProfileParentLink(o.parentLink); |
| 2671 checkProfilePermissions(o.permissions); | 2688 checkProfilePermissions(o.permissions); |
| 2672 unittest.expect(o.selfLink, unittest.equals('foo')); | 2689 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 2673 unittest.expect(o.siteSearchCategoryParameters, unittest.equals('foo')); | 2690 unittest.expect(o.siteSearchCategoryParameters, unittest.equals('foo')); |
| 2674 unittest.expect(o.siteSearchQueryParameters, unittest.equals('foo')); | 2691 unittest.expect(o.siteSearchQueryParameters, unittest.equals('foo')); |
| 2675 unittest.expect(o.starred, unittest.isTrue); | 2692 unittest.expect(o.starred, unittest.isTrue); |
| 2676 unittest.expect(o.stripSiteSearchCategoryParameters, unittest.isTrue); | 2693 unittest.expect(o.stripSiteSearchCategoryParameters, unittest.isTrue); |
| 2677 unittest.expect(o.stripSiteSearchQueryParameters, unittest.isTrue); | 2694 unittest.expect(o.stripSiteSearchQueryParameters, unittest.isTrue); |
| 2678 unittest.expect(o.timezone, unittest.equals('foo')); | 2695 unittest.expect(o.timezone, unittest.equals('foo')); |
| 2679 unittest.expect(o.type, unittest.equals('foo')); | 2696 unittest.expect(o.type, unittest.equals('foo')); |
| 2680 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 2697 unittest.expect( |
| 2698 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2681 unittest.expect(o.webPropertyId, unittest.equals('foo')); | 2699 unittest.expect(o.webPropertyId, unittest.equals('foo')); |
| 2682 unittest.expect(o.websiteUrl, unittest.equals('foo')); | 2700 unittest.expect(o.websiteUrl, unittest.equals('foo')); |
| 2683 } | 2701 } |
| 2684 buildCounterProfile--; | 2702 buildCounterProfile--; |
| 2685 } | 2703 } |
| 2686 | 2704 |
| 2687 core.int buildCounterProfileFilterLink = 0; | 2705 core.int buildCounterProfileFilterLink = 0; |
| 2688 buildProfileFilterLink() { | 2706 buildProfileFilterLink() { |
| 2689 var o = new api.ProfileFilterLink(); | 2707 var o = new api.ProfileFilterLink(); |
| 2690 buildCounterProfileFilterLink++; | 2708 buildCounterProfileFilterLink++; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2706 checkFilterRef(o.filterRef); | 2724 checkFilterRef(o.filterRef); |
| 2707 unittest.expect(o.id, unittest.equals('foo')); | 2725 unittest.expect(o.id, unittest.equals('foo')); |
| 2708 unittest.expect(o.kind, unittest.equals('foo')); | 2726 unittest.expect(o.kind, unittest.equals('foo')); |
| 2709 checkProfileRef(o.profileRef); | 2727 checkProfileRef(o.profileRef); |
| 2710 unittest.expect(o.rank, unittest.equals(42)); | 2728 unittest.expect(o.rank, unittest.equals(42)); |
| 2711 unittest.expect(o.selfLink, unittest.equals('foo')); | 2729 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 2712 } | 2730 } |
| 2713 buildCounterProfileFilterLink--; | 2731 buildCounterProfileFilterLink--; |
| 2714 } | 2732 } |
| 2715 | 2733 |
| 2716 buildUnnamed1041() { | 2734 buildUnnamed1044() { |
| 2717 var o = new core.List<api.ProfileFilterLink>(); | 2735 var o = new core.List<api.ProfileFilterLink>(); |
| 2718 o.add(buildProfileFilterLink()); | 2736 o.add(buildProfileFilterLink()); |
| 2719 o.add(buildProfileFilterLink()); | 2737 o.add(buildProfileFilterLink()); |
| 2720 return o; | 2738 return o; |
| 2721 } | 2739 } |
| 2722 | 2740 |
| 2723 checkUnnamed1041(core.List<api.ProfileFilterLink> o) { | 2741 checkUnnamed1044(core.List<api.ProfileFilterLink> o) { |
| 2724 unittest.expect(o, unittest.hasLength(2)); | 2742 unittest.expect(o, unittest.hasLength(2)); |
| 2725 checkProfileFilterLink(o[0]); | 2743 checkProfileFilterLink(o[0]); |
| 2726 checkProfileFilterLink(o[1]); | 2744 checkProfileFilterLink(o[1]); |
| 2727 } | 2745 } |
| 2728 | 2746 |
| 2729 core.int buildCounterProfileFilterLinks = 0; | 2747 core.int buildCounterProfileFilterLinks = 0; |
| 2730 buildProfileFilterLinks() { | 2748 buildProfileFilterLinks() { |
| 2731 var o = new api.ProfileFilterLinks(); | 2749 var o = new api.ProfileFilterLinks(); |
| 2732 buildCounterProfileFilterLinks++; | 2750 buildCounterProfileFilterLinks++; |
| 2733 if (buildCounterProfileFilterLinks < 3) { | 2751 if (buildCounterProfileFilterLinks < 3) { |
| 2734 o.items = buildUnnamed1041(); | 2752 o.items = buildUnnamed1044(); |
| 2735 o.itemsPerPage = 42; | 2753 o.itemsPerPage = 42; |
| 2736 o.kind = "foo"; | 2754 o.kind = "foo"; |
| 2737 o.nextLink = "foo"; | 2755 o.nextLink = "foo"; |
| 2738 o.previousLink = "foo"; | 2756 o.previousLink = "foo"; |
| 2739 o.startIndex = 42; | 2757 o.startIndex = 42; |
| 2740 o.totalResults = 42; | 2758 o.totalResults = 42; |
| 2741 o.username = "foo"; | 2759 o.username = "foo"; |
| 2742 } | 2760 } |
| 2743 buildCounterProfileFilterLinks--; | 2761 buildCounterProfileFilterLinks--; |
| 2744 return o; | 2762 return o; |
| 2745 } | 2763 } |
| 2746 | 2764 |
| 2747 checkProfileFilterLinks(api.ProfileFilterLinks o) { | 2765 checkProfileFilterLinks(api.ProfileFilterLinks o) { |
| 2748 buildCounterProfileFilterLinks++; | 2766 buildCounterProfileFilterLinks++; |
| 2749 if (buildCounterProfileFilterLinks < 3) { | 2767 if (buildCounterProfileFilterLinks < 3) { |
| 2750 checkUnnamed1041(o.items); | 2768 checkUnnamed1044(o.items); |
| 2751 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 2769 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 2752 unittest.expect(o.kind, unittest.equals('foo')); | 2770 unittest.expect(o.kind, unittest.equals('foo')); |
| 2753 unittest.expect(o.nextLink, unittest.equals('foo')); | 2771 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 2754 unittest.expect(o.previousLink, unittest.equals('foo')); | 2772 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 2755 unittest.expect(o.startIndex, unittest.equals(42)); | 2773 unittest.expect(o.startIndex, unittest.equals(42)); |
| 2756 unittest.expect(o.totalResults, unittest.equals(42)); | 2774 unittest.expect(o.totalResults, unittest.equals(42)); |
| 2757 unittest.expect(o.username, unittest.equals('foo')); | 2775 unittest.expect(o.username, unittest.equals('foo')); |
| 2758 } | 2776 } |
| 2759 buildCounterProfileFilterLinks--; | 2777 buildCounterProfileFilterLinks--; |
| 2760 } | 2778 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2810 if (buildCounterProfileSummary < 3) { | 2828 if (buildCounterProfileSummary < 3) { |
| 2811 unittest.expect(o.id, unittest.equals('foo')); | 2829 unittest.expect(o.id, unittest.equals('foo')); |
| 2812 unittest.expect(o.kind, unittest.equals('foo')); | 2830 unittest.expect(o.kind, unittest.equals('foo')); |
| 2813 unittest.expect(o.name, unittest.equals('foo')); | 2831 unittest.expect(o.name, unittest.equals('foo')); |
| 2814 unittest.expect(o.starred, unittest.isTrue); | 2832 unittest.expect(o.starred, unittest.isTrue); |
| 2815 unittest.expect(o.type, unittest.equals('foo')); | 2833 unittest.expect(o.type, unittest.equals('foo')); |
| 2816 } | 2834 } |
| 2817 buildCounterProfileSummary--; | 2835 buildCounterProfileSummary--; |
| 2818 } | 2836 } |
| 2819 | 2837 |
| 2820 buildUnnamed1042() { | 2838 buildUnnamed1045() { |
| 2821 var o = new core.List<api.Profile>(); | 2839 var o = new core.List<api.Profile>(); |
| 2822 o.add(buildProfile()); | 2840 o.add(buildProfile()); |
| 2823 o.add(buildProfile()); | 2841 o.add(buildProfile()); |
| 2824 return o; | 2842 return o; |
| 2825 } | 2843 } |
| 2826 | 2844 |
| 2827 checkUnnamed1042(core.List<api.Profile> o) { | 2845 checkUnnamed1045(core.List<api.Profile> o) { |
| 2828 unittest.expect(o, unittest.hasLength(2)); | 2846 unittest.expect(o, unittest.hasLength(2)); |
| 2829 checkProfile(o[0]); | 2847 checkProfile(o[0]); |
| 2830 checkProfile(o[1]); | 2848 checkProfile(o[1]); |
| 2831 } | 2849 } |
| 2832 | 2850 |
| 2833 core.int buildCounterProfiles = 0; | 2851 core.int buildCounterProfiles = 0; |
| 2834 buildProfiles() { | 2852 buildProfiles() { |
| 2835 var o = new api.Profiles(); | 2853 var o = new api.Profiles(); |
| 2836 buildCounterProfiles++; | 2854 buildCounterProfiles++; |
| 2837 if (buildCounterProfiles < 3) { | 2855 if (buildCounterProfiles < 3) { |
| 2838 o.items = buildUnnamed1042(); | 2856 o.items = buildUnnamed1045(); |
| 2839 o.itemsPerPage = 42; | 2857 o.itemsPerPage = 42; |
| 2840 o.kind = "foo"; | 2858 o.kind = "foo"; |
| 2841 o.nextLink = "foo"; | 2859 o.nextLink = "foo"; |
| 2842 o.previousLink = "foo"; | 2860 o.previousLink = "foo"; |
| 2843 o.startIndex = 42; | 2861 o.startIndex = 42; |
| 2844 o.totalResults = 42; | 2862 o.totalResults = 42; |
| 2845 o.username = "foo"; | 2863 o.username = "foo"; |
| 2846 } | 2864 } |
| 2847 buildCounterProfiles--; | 2865 buildCounterProfiles--; |
| 2848 return o; | 2866 return o; |
| 2849 } | 2867 } |
| 2850 | 2868 |
| 2851 checkProfiles(api.Profiles o) { | 2869 checkProfiles(api.Profiles o) { |
| 2852 buildCounterProfiles++; | 2870 buildCounterProfiles++; |
| 2853 if (buildCounterProfiles < 3) { | 2871 if (buildCounterProfiles < 3) { |
| 2854 checkUnnamed1042(o.items); | 2872 checkUnnamed1045(o.items); |
| 2855 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 2873 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 2856 unittest.expect(o.kind, unittest.equals('foo')); | 2874 unittest.expect(o.kind, unittest.equals('foo')); |
| 2857 unittest.expect(o.nextLink, unittest.equals('foo')); | 2875 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 2858 unittest.expect(o.previousLink, unittest.equals('foo')); | 2876 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 2859 unittest.expect(o.startIndex, unittest.equals(42)); | 2877 unittest.expect(o.startIndex, unittest.equals(42)); |
| 2860 unittest.expect(o.totalResults, unittest.equals(42)); | 2878 unittest.expect(o.totalResults, unittest.equals(42)); |
| 2861 unittest.expect(o.username, unittest.equals('foo')); | 2879 unittest.expect(o.username, unittest.equals('foo')); |
| 2862 } | 2880 } |
| 2863 buildCounterProfiles--; | 2881 buildCounterProfiles--; |
| 2864 } | 2882 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2879 checkRealtimeDataColumnHeaders(api.RealtimeDataColumnHeaders o) { | 2897 checkRealtimeDataColumnHeaders(api.RealtimeDataColumnHeaders o) { |
| 2880 buildCounterRealtimeDataColumnHeaders++; | 2898 buildCounterRealtimeDataColumnHeaders++; |
| 2881 if (buildCounterRealtimeDataColumnHeaders < 3) { | 2899 if (buildCounterRealtimeDataColumnHeaders < 3) { |
| 2882 unittest.expect(o.columnType, unittest.equals('foo')); | 2900 unittest.expect(o.columnType, unittest.equals('foo')); |
| 2883 unittest.expect(o.dataType, unittest.equals('foo')); | 2901 unittest.expect(o.dataType, unittest.equals('foo')); |
| 2884 unittest.expect(o.name, unittest.equals('foo')); | 2902 unittest.expect(o.name, unittest.equals('foo')); |
| 2885 } | 2903 } |
| 2886 buildCounterRealtimeDataColumnHeaders--; | 2904 buildCounterRealtimeDataColumnHeaders--; |
| 2887 } | 2905 } |
| 2888 | 2906 |
| 2889 buildUnnamed1043() { | 2907 buildUnnamed1046() { |
| 2890 var o = new core.List<api.RealtimeDataColumnHeaders>(); | 2908 var o = new core.List<api.RealtimeDataColumnHeaders>(); |
| 2891 o.add(buildRealtimeDataColumnHeaders()); | 2909 o.add(buildRealtimeDataColumnHeaders()); |
| 2892 o.add(buildRealtimeDataColumnHeaders()); | 2910 o.add(buildRealtimeDataColumnHeaders()); |
| 2893 return o; | 2911 return o; |
| 2894 } | 2912 } |
| 2895 | 2913 |
| 2896 checkUnnamed1043(core.List<api.RealtimeDataColumnHeaders> o) { | 2914 checkUnnamed1046(core.List<api.RealtimeDataColumnHeaders> o) { |
| 2897 unittest.expect(o, unittest.hasLength(2)); | 2915 unittest.expect(o, unittest.hasLength(2)); |
| 2898 checkRealtimeDataColumnHeaders(o[0]); | 2916 checkRealtimeDataColumnHeaders(o[0]); |
| 2899 checkRealtimeDataColumnHeaders(o[1]); | 2917 checkRealtimeDataColumnHeaders(o[1]); |
| 2900 } | 2918 } |
| 2901 | 2919 |
| 2902 core.int buildCounterRealtimeDataProfileInfo = 0; | 2920 core.int buildCounterRealtimeDataProfileInfo = 0; |
| 2903 buildRealtimeDataProfileInfo() { | 2921 buildRealtimeDataProfileInfo() { |
| 2904 var o = new api.RealtimeDataProfileInfo(); | 2922 var o = new api.RealtimeDataProfileInfo(); |
| 2905 buildCounterRealtimeDataProfileInfo++; | 2923 buildCounterRealtimeDataProfileInfo++; |
| 2906 if (buildCounterRealtimeDataProfileInfo < 3) { | 2924 if (buildCounterRealtimeDataProfileInfo < 3) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2921 unittest.expect(o.accountId, unittest.equals('foo')); | 2939 unittest.expect(o.accountId, unittest.equals('foo')); |
| 2922 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); | 2940 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); |
| 2923 unittest.expect(o.profileId, unittest.equals('foo')); | 2941 unittest.expect(o.profileId, unittest.equals('foo')); |
| 2924 unittest.expect(o.profileName, unittest.equals('foo')); | 2942 unittest.expect(o.profileName, unittest.equals('foo')); |
| 2925 unittest.expect(o.tableId, unittest.equals('foo')); | 2943 unittest.expect(o.tableId, unittest.equals('foo')); |
| 2926 unittest.expect(o.webPropertyId, unittest.equals('foo')); | 2944 unittest.expect(o.webPropertyId, unittest.equals('foo')); |
| 2927 } | 2945 } |
| 2928 buildCounterRealtimeDataProfileInfo--; | 2946 buildCounterRealtimeDataProfileInfo--; |
| 2929 } | 2947 } |
| 2930 | 2948 |
| 2931 buildUnnamed1044() { | 2949 buildUnnamed1047() { |
| 2932 var o = new core.List<core.String>(); | 2950 var o = new core.List<core.String>(); |
| 2933 o.add("foo"); | 2951 o.add("foo"); |
| 2934 o.add("foo"); | 2952 o.add("foo"); |
| 2935 return o; | 2953 return o; |
| 2936 } | 2954 } |
| 2937 | 2955 |
| 2938 checkUnnamed1044(core.List<core.String> o) { | 2956 checkUnnamed1047(core.List<core.String> o) { |
| 2939 unittest.expect(o, unittest.hasLength(2)); | 2957 unittest.expect(o, unittest.hasLength(2)); |
| 2940 unittest.expect(o[0], unittest.equals('foo')); | 2958 unittest.expect(o[0], unittest.equals('foo')); |
| 2941 unittest.expect(o[1], unittest.equals('foo')); | 2959 unittest.expect(o[1], unittest.equals('foo')); |
| 2942 } | 2960 } |
| 2943 | 2961 |
| 2944 buildUnnamed1045() { | 2962 buildUnnamed1048() { |
| 2945 var o = new core.List<core.String>(); | 2963 var o = new core.List<core.String>(); |
| 2946 o.add("foo"); | 2964 o.add("foo"); |
| 2947 o.add("foo"); | 2965 o.add("foo"); |
| 2948 return o; | 2966 return o; |
| 2949 } | 2967 } |
| 2950 | 2968 |
| 2951 checkUnnamed1045(core.List<core.String> o) { | 2969 checkUnnamed1048(core.List<core.String> o) { |
| 2952 unittest.expect(o, unittest.hasLength(2)); | 2970 unittest.expect(o, unittest.hasLength(2)); |
| 2953 unittest.expect(o[0], unittest.equals('foo')); | 2971 unittest.expect(o[0], unittest.equals('foo')); |
| 2954 unittest.expect(o[1], unittest.equals('foo')); | 2972 unittest.expect(o[1], unittest.equals('foo')); |
| 2955 } | 2973 } |
| 2956 | 2974 |
| 2957 core.int buildCounterRealtimeDataQuery = 0; | 2975 core.int buildCounterRealtimeDataQuery = 0; |
| 2958 buildRealtimeDataQuery() { | 2976 buildRealtimeDataQuery() { |
| 2959 var o = new api.RealtimeDataQuery(); | 2977 var o = new api.RealtimeDataQuery(); |
| 2960 buildCounterRealtimeDataQuery++; | 2978 buildCounterRealtimeDataQuery++; |
| 2961 if (buildCounterRealtimeDataQuery < 3) { | 2979 if (buildCounterRealtimeDataQuery < 3) { |
| 2962 o.dimensions = "foo"; | 2980 o.dimensions = "foo"; |
| 2963 o.filters = "foo"; | 2981 o.filters = "foo"; |
| 2964 o.ids = "foo"; | 2982 o.ids = "foo"; |
| 2965 o.max_results = 42; | 2983 o.max_results = 42; |
| 2966 o.metrics = buildUnnamed1044(); | 2984 o.metrics = buildUnnamed1047(); |
| 2967 o.sort = buildUnnamed1045(); | 2985 o.sort = buildUnnamed1048(); |
| 2968 } | 2986 } |
| 2969 buildCounterRealtimeDataQuery--; | 2987 buildCounterRealtimeDataQuery--; |
| 2970 return o; | 2988 return o; |
| 2971 } | 2989 } |
| 2972 | 2990 |
| 2973 checkRealtimeDataQuery(api.RealtimeDataQuery o) { | 2991 checkRealtimeDataQuery(api.RealtimeDataQuery o) { |
| 2974 buildCounterRealtimeDataQuery++; | 2992 buildCounterRealtimeDataQuery++; |
| 2975 if (buildCounterRealtimeDataQuery < 3) { | 2993 if (buildCounterRealtimeDataQuery < 3) { |
| 2976 unittest.expect(o.dimensions, unittest.equals('foo')); | 2994 unittest.expect(o.dimensions, unittest.equals('foo')); |
| 2977 unittest.expect(o.filters, unittest.equals('foo')); | 2995 unittest.expect(o.filters, unittest.equals('foo')); |
| 2978 unittest.expect(o.ids, unittest.equals('foo')); | 2996 unittest.expect(o.ids, unittest.equals('foo')); |
| 2979 unittest.expect(o.max_results, unittest.equals(42)); | 2997 unittest.expect(o.max_results, unittest.equals(42)); |
| 2980 checkUnnamed1044(o.metrics); | 2998 checkUnnamed1047(o.metrics); |
| 2981 checkUnnamed1045(o.sort); | 2999 checkUnnamed1048(o.sort); |
| 2982 } | 3000 } |
| 2983 buildCounterRealtimeDataQuery--; | 3001 buildCounterRealtimeDataQuery--; |
| 2984 } | 3002 } |
| 2985 | 3003 |
| 2986 buildUnnamed1046() { | 3004 buildUnnamed1049() { |
| 2987 var o = new core.List<core.String>(); | 3005 var o = new core.List<core.String>(); |
| 2988 o.add("foo"); | 3006 o.add("foo"); |
| 2989 o.add("foo"); | 3007 o.add("foo"); |
| 2990 return o; | 3008 return o; |
| 2991 } | 3009 } |
| 2992 | 3010 |
| 2993 checkUnnamed1046(core.List<core.String> o) { | 3011 checkUnnamed1049(core.List<core.String> o) { |
| 2994 unittest.expect(o, unittest.hasLength(2)); | 3012 unittest.expect(o, unittest.hasLength(2)); |
| 2995 unittest.expect(o[0], unittest.equals('foo')); | 3013 unittest.expect(o[0], unittest.equals('foo')); |
| 2996 unittest.expect(o[1], unittest.equals('foo')); | 3014 unittest.expect(o[1], unittest.equals('foo')); |
| 2997 } | 3015 } |
| 2998 | 3016 |
| 2999 buildUnnamed1047() { | 3017 buildUnnamed1050() { |
| 3000 var o = new core.List<core.List<core.String>>(); | 3018 var o = new core.List<core.List<core.String>>(); |
| 3001 o.add(buildUnnamed1046()); | 3019 o.add(buildUnnamed1049()); |
| 3002 o.add(buildUnnamed1046()); | 3020 o.add(buildUnnamed1049()); |
| 3003 return o; | 3021 return o; |
| 3004 } | 3022 } |
| 3005 | 3023 |
| 3006 checkUnnamed1047(core.List<core.List<core.String>> o) { | 3024 checkUnnamed1050(core.List<core.List<core.String>> o) { |
| 3007 unittest.expect(o, unittest.hasLength(2)); | 3025 unittest.expect(o, unittest.hasLength(2)); |
| 3008 checkUnnamed1046(o[0]); | 3026 checkUnnamed1049(o[0]); |
| 3009 checkUnnamed1046(o[1]); | 3027 checkUnnamed1049(o[1]); |
| 3010 } | 3028 } |
| 3011 | 3029 |
| 3012 buildUnnamed1048() { | 3030 buildUnnamed1051() { |
| 3013 var o = new core.Map<core.String, core.String>(); | 3031 var o = new core.Map<core.String, core.String>(); |
| 3014 o["x"] = "foo"; | 3032 o["x"] = "foo"; |
| 3015 o["y"] = "foo"; | 3033 o["y"] = "foo"; |
| 3016 return o; | 3034 return o; |
| 3017 } | 3035 } |
| 3018 | 3036 |
| 3019 checkUnnamed1048(core.Map<core.String, core.String> o) { | 3037 checkUnnamed1051(core.Map<core.String, core.String> o) { |
| 3020 unittest.expect(o, unittest.hasLength(2)); | 3038 unittest.expect(o, unittest.hasLength(2)); |
| 3021 unittest.expect(o["x"], unittest.equals('foo')); | 3039 unittest.expect(o["x"], unittest.equals('foo')); |
| 3022 unittest.expect(o["y"], unittest.equals('foo')); | 3040 unittest.expect(o["y"], unittest.equals('foo')); |
| 3023 } | 3041 } |
| 3024 | 3042 |
| 3025 core.int buildCounterRealtimeData = 0; | 3043 core.int buildCounterRealtimeData = 0; |
| 3026 buildRealtimeData() { | 3044 buildRealtimeData() { |
| 3027 var o = new api.RealtimeData(); | 3045 var o = new api.RealtimeData(); |
| 3028 buildCounterRealtimeData++; | 3046 buildCounterRealtimeData++; |
| 3029 if (buildCounterRealtimeData < 3) { | 3047 if (buildCounterRealtimeData < 3) { |
| 3030 o.columnHeaders = buildUnnamed1043(); | 3048 o.columnHeaders = buildUnnamed1046(); |
| 3031 o.id = "foo"; | 3049 o.id = "foo"; |
| 3032 o.kind = "foo"; | 3050 o.kind = "foo"; |
| 3033 o.profileInfo = buildRealtimeDataProfileInfo(); | 3051 o.profileInfo = buildRealtimeDataProfileInfo(); |
| 3034 o.query = buildRealtimeDataQuery(); | 3052 o.query = buildRealtimeDataQuery(); |
| 3035 o.rows = buildUnnamed1047(); | 3053 o.rows = buildUnnamed1050(); |
| 3036 o.selfLink = "foo"; | 3054 o.selfLink = "foo"; |
| 3037 o.totalResults = 42; | 3055 o.totalResults = 42; |
| 3038 o.totalsForAllResults = buildUnnamed1048(); | 3056 o.totalsForAllResults = buildUnnamed1051(); |
| 3039 } | 3057 } |
| 3040 buildCounterRealtimeData--; | 3058 buildCounterRealtimeData--; |
| 3041 return o; | 3059 return o; |
| 3042 } | 3060 } |
| 3043 | 3061 |
| 3044 checkRealtimeData(api.RealtimeData o) { | 3062 checkRealtimeData(api.RealtimeData o) { |
| 3045 buildCounterRealtimeData++; | 3063 buildCounterRealtimeData++; |
| 3046 if (buildCounterRealtimeData < 3) { | 3064 if (buildCounterRealtimeData < 3) { |
| 3047 checkUnnamed1043(o.columnHeaders); | 3065 checkUnnamed1046(o.columnHeaders); |
| 3048 unittest.expect(o.id, unittest.equals('foo')); | 3066 unittest.expect(o.id, unittest.equals('foo')); |
| 3049 unittest.expect(o.kind, unittest.equals('foo')); | 3067 unittest.expect(o.kind, unittest.equals('foo')); |
| 3050 checkRealtimeDataProfileInfo(o.profileInfo); | 3068 checkRealtimeDataProfileInfo(o.profileInfo); |
| 3051 checkRealtimeDataQuery(o.query); | 3069 checkRealtimeDataQuery(o.query); |
| 3052 checkUnnamed1047(o.rows); | 3070 checkUnnamed1050(o.rows); |
| 3053 unittest.expect(o.selfLink, unittest.equals('foo')); | 3071 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 3054 unittest.expect(o.totalResults, unittest.equals(42)); | 3072 unittest.expect(o.totalResults, unittest.equals(42)); |
| 3055 checkUnnamed1048(o.totalsForAllResults); | 3073 checkUnnamed1051(o.totalsForAllResults); |
| 3056 } | 3074 } |
| 3057 buildCounterRealtimeData--; | 3075 buildCounterRealtimeData--; |
| 3058 } | 3076 } |
| 3059 | 3077 |
| 3060 core.int buildCounterRemarketingAudienceAudienceDefinition = 0; | 3078 core.int buildCounterRemarketingAudienceAudienceDefinition = 0; |
| 3061 buildRemarketingAudienceAudienceDefinition() { | 3079 buildRemarketingAudienceAudienceDefinition() { |
| 3062 var o = new api.RemarketingAudienceAudienceDefinition(); | 3080 var o = new api.RemarketingAudienceAudienceDefinition(); |
| 3063 buildCounterRemarketingAudienceAudienceDefinition++; | 3081 buildCounterRemarketingAudienceAudienceDefinition++; |
| 3064 if (buildCounterRemarketingAudienceAudienceDefinition < 3) { | 3082 if (buildCounterRemarketingAudienceAudienceDefinition < 3) { |
| 3065 o.includeConditions = buildIncludeConditions(); | 3083 o.includeConditions = buildIncludeConditions(); |
| 3066 } | 3084 } |
| 3067 buildCounterRemarketingAudienceAudienceDefinition--; | 3085 buildCounterRemarketingAudienceAudienceDefinition--; |
| 3068 return o; | 3086 return o; |
| 3069 } | 3087 } |
| 3070 | 3088 |
| 3071 checkRemarketingAudienceAudienceDefinition(api.RemarketingAudienceAudienceDefini
tion o) { | 3089 checkRemarketingAudienceAudienceDefinition( |
| 3090 api.RemarketingAudienceAudienceDefinition o) { |
| 3072 buildCounterRemarketingAudienceAudienceDefinition++; | 3091 buildCounterRemarketingAudienceAudienceDefinition++; |
| 3073 if (buildCounterRemarketingAudienceAudienceDefinition < 3) { | 3092 if (buildCounterRemarketingAudienceAudienceDefinition < 3) { |
| 3074 checkIncludeConditions(o.includeConditions); | 3093 checkIncludeConditions(o.includeConditions); |
| 3075 } | 3094 } |
| 3076 buildCounterRemarketingAudienceAudienceDefinition--; | 3095 buildCounterRemarketingAudienceAudienceDefinition--; |
| 3077 } | 3096 } |
| 3078 | 3097 |
| 3079 buildUnnamed1049() { | 3098 buildUnnamed1052() { |
| 3080 var o = new core.List<api.LinkedForeignAccount>(); | 3099 var o = new core.List<api.LinkedForeignAccount>(); |
| 3081 o.add(buildLinkedForeignAccount()); | 3100 o.add(buildLinkedForeignAccount()); |
| 3082 o.add(buildLinkedForeignAccount()); | 3101 o.add(buildLinkedForeignAccount()); |
| 3083 return o; | 3102 return o; |
| 3084 } | 3103 } |
| 3085 | 3104 |
| 3086 checkUnnamed1049(core.List<api.LinkedForeignAccount> o) { | 3105 checkUnnamed1052(core.List<api.LinkedForeignAccount> o) { |
| 3087 unittest.expect(o, unittest.hasLength(2)); | 3106 unittest.expect(o, unittest.hasLength(2)); |
| 3088 checkLinkedForeignAccount(o[0]); | 3107 checkLinkedForeignAccount(o[0]); |
| 3089 checkLinkedForeignAccount(o[1]); | 3108 checkLinkedForeignAccount(o[1]); |
| 3090 } | 3109 } |
| 3091 | 3110 |
| 3092 buildUnnamed1050() { | 3111 buildUnnamed1053() { |
| 3093 var o = new core.List<core.String>(); | 3112 var o = new core.List<core.String>(); |
| 3094 o.add("foo"); | 3113 o.add("foo"); |
| 3095 o.add("foo"); | 3114 o.add("foo"); |
| 3096 return o; | 3115 return o; |
| 3097 } | 3116 } |
| 3098 | 3117 |
| 3099 checkUnnamed1050(core.List<core.String> o) { | 3118 checkUnnamed1053(core.List<core.String> o) { |
| 3100 unittest.expect(o, unittest.hasLength(2)); | 3119 unittest.expect(o, unittest.hasLength(2)); |
| 3101 unittest.expect(o[0], unittest.equals('foo')); | 3120 unittest.expect(o[0], unittest.equals('foo')); |
| 3102 unittest.expect(o[1], unittest.equals('foo')); | 3121 unittest.expect(o[1], unittest.equals('foo')); |
| 3103 } | 3122 } |
| 3104 | 3123 |
| 3105 core.int buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeCondi
tions = 0; | 3124 core.int |
| 3125 buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions
= |
| 3126 0; |
| 3106 buildRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions() { | 3127 buildRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions() { |
| 3107 var o = new api.RemarketingAudienceStateBasedAudienceDefinitionExcludeConditio
ns(); | 3128 var o = new api |
| 3129 .RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions(); |
| 3108 buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions++
; | 3130 buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions++
; |
| 3109 if (buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditio
ns < 3) { | 3131 if (buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditio
ns < |
| 3132 3) { |
| 3110 o.exclusionDuration = "foo"; | 3133 o.exclusionDuration = "foo"; |
| 3111 o.segment = "foo"; | 3134 o.segment = "foo"; |
| 3112 } | 3135 } |
| 3113 buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions--
; | 3136 buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions--
; |
| 3114 return o; | 3137 return o; |
| 3115 } | 3138 } |
| 3116 | 3139 |
| 3117 checkRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions(api.Remark
etingAudienceStateBasedAudienceDefinitionExcludeConditions o) { | 3140 checkRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions( |
| 3141 api.RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions o) { |
| 3118 buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions++
; | 3142 buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions++
; |
| 3119 if (buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditio
ns < 3) { | 3143 if (buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditio
ns < |
| 3144 3) { |
| 3120 unittest.expect(o.exclusionDuration, unittest.equals('foo')); | 3145 unittest.expect(o.exclusionDuration, unittest.equals('foo')); |
| 3121 unittest.expect(o.segment, unittest.equals('foo')); | 3146 unittest.expect(o.segment, unittest.equals('foo')); |
| 3122 } | 3147 } |
| 3123 buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions--
; | 3148 buildCounterRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions--
; |
| 3124 } | 3149 } |
| 3125 | 3150 |
| 3126 core.int buildCounterRemarketingAudienceStateBasedAudienceDefinition = 0; | 3151 core.int buildCounterRemarketingAudienceStateBasedAudienceDefinition = 0; |
| 3127 buildRemarketingAudienceStateBasedAudienceDefinition() { | 3152 buildRemarketingAudienceStateBasedAudienceDefinition() { |
| 3128 var o = new api.RemarketingAudienceStateBasedAudienceDefinition(); | 3153 var o = new api.RemarketingAudienceStateBasedAudienceDefinition(); |
| 3129 buildCounterRemarketingAudienceStateBasedAudienceDefinition++; | 3154 buildCounterRemarketingAudienceStateBasedAudienceDefinition++; |
| 3130 if (buildCounterRemarketingAudienceStateBasedAudienceDefinition < 3) { | 3155 if (buildCounterRemarketingAudienceStateBasedAudienceDefinition < 3) { |
| 3131 o.excludeConditions = buildRemarketingAudienceStateBasedAudienceDefinitionEx
cludeConditions(); | 3156 o.excludeConditions = |
| 3157 buildRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions(); |
| 3132 o.includeConditions = buildIncludeConditions(); | 3158 o.includeConditions = buildIncludeConditions(); |
| 3133 } | 3159 } |
| 3134 buildCounterRemarketingAudienceStateBasedAudienceDefinition--; | 3160 buildCounterRemarketingAudienceStateBasedAudienceDefinition--; |
| 3135 return o; | 3161 return o; |
| 3136 } | 3162 } |
| 3137 | 3163 |
| 3138 checkRemarketingAudienceStateBasedAudienceDefinition(api.RemarketingAudienceStat
eBasedAudienceDefinition o) { | 3164 checkRemarketingAudienceStateBasedAudienceDefinition( |
| 3165 api.RemarketingAudienceStateBasedAudienceDefinition o) { |
| 3139 buildCounterRemarketingAudienceStateBasedAudienceDefinition++; | 3166 buildCounterRemarketingAudienceStateBasedAudienceDefinition++; |
| 3140 if (buildCounterRemarketingAudienceStateBasedAudienceDefinition < 3) { | 3167 if (buildCounterRemarketingAudienceStateBasedAudienceDefinition < 3) { |
| 3141 checkRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions(o.excl
udeConditions); | 3168 checkRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions( |
| 3169 o.excludeConditions); |
| 3142 checkIncludeConditions(o.includeConditions); | 3170 checkIncludeConditions(o.includeConditions); |
| 3143 } | 3171 } |
| 3144 buildCounterRemarketingAudienceStateBasedAudienceDefinition--; | 3172 buildCounterRemarketingAudienceStateBasedAudienceDefinition--; |
| 3145 } | 3173 } |
| 3146 | 3174 |
| 3147 core.int buildCounterRemarketingAudience = 0; | 3175 core.int buildCounterRemarketingAudience = 0; |
| 3148 buildRemarketingAudience() { | 3176 buildRemarketingAudience() { |
| 3149 var o = new api.RemarketingAudience(); | 3177 var o = new api.RemarketingAudience(); |
| 3150 buildCounterRemarketingAudience++; | 3178 buildCounterRemarketingAudience++; |
| 3151 if (buildCounterRemarketingAudience < 3) { | 3179 if (buildCounterRemarketingAudience < 3) { |
| 3152 o.accountId = "foo"; | 3180 o.accountId = "foo"; |
| 3153 o.audienceDefinition = buildRemarketingAudienceAudienceDefinition(); | 3181 o.audienceDefinition = buildRemarketingAudienceAudienceDefinition(); |
| 3154 o.audienceType = "foo"; | 3182 o.audienceType = "foo"; |
| 3155 o.created = core.DateTime.parse("2002-02-27T14:01:02"); | 3183 o.created = core.DateTime.parse("2002-02-27T14:01:02"); |
| 3156 o.description = "foo"; | 3184 o.description = "foo"; |
| 3157 o.id = "foo"; | 3185 o.id = "foo"; |
| 3158 o.internalWebPropertyId = "foo"; | 3186 o.internalWebPropertyId = "foo"; |
| 3159 o.kind = "foo"; | 3187 o.kind = "foo"; |
| 3160 o.linkedAdAccounts = buildUnnamed1049(); | 3188 o.linkedAdAccounts = buildUnnamed1052(); |
| 3161 o.linkedViews = buildUnnamed1050(); | 3189 o.linkedViews = buildUnnamed1053(); |
| 3162 o.name = "foo"; | 3190 o.name = "foo"; |
| 3163 o.stateBasedAudienceDefinition = buildRemarketingAudienceStateBasedAudienceD
efinition(); | 3191 o.stateBasedAudienceDefinition = |
| 3192 buildRemarketingAudienceStateBasedAudienceDefinition(); |
| 3164 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 3193 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 3165 o.webPropertyId = "foo"; | 3194 o.webPropertyId = "foo"; |
| 3166 } | 3195 } |
| 3167 buildCounterRemarketingAudience--; | 3196 buildCounterRemarketingAudience--; |
| 3168 return o; | 3197 return o; |
| 3169 } | 3198 } |
| 3170 | 3199 |
| 3171 checkRemarketingAudience(api.RemarketingAudience o) { | 3200 checkRemarketingAudience(api.RemarketingAudience o) { |
| 3172 buildCounterRemarketingAudience++; | 3201 buildCounterRemarketingAudience++; |
| 3173 if (buildCounterRemarketingAudience < 3) { | 3202 if (buildCounterRemarketingAudience < 3) { |
| 3174 unittest.expect(o.accountId, unittest.equals('foo')); | 3203 unittest.expect(o.accountId, unittest.equals('foo')); |
| 3175 checkRemarketingAudienceAudienceDefinition(o.audienceDefinition); | 3204 checkRemarketingAudienceAudienceDefinition(o.audienceDefinition); |
| 3176 unittest.expect(o.audienceType, unittest.equals('foo')); | 3205 unittest.expect(o.audienceType, unittest.equals('foo')); |
| 3177 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 3206 unittest.expect( |
| 3207 o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3178 unittest.expect(o.description, unittest.equals('foo')); | 3208 unittest.expect(o.description, unittest.equals('foo')); |
| 3179 unittest.expect(o.id, unittest.equals('foo')); | 3209 unittest.expect(o.id, unittest.equals('foo')); |
| 3180 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); | 3210 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); |
| 3181 unittest.expect(o.kind, unittest.equals('foo')); | 3211 unittest.expect(o.kind, unittest.equals('foo')); |
| 3182 checkUnnamed1049(o.linkedAdAccounts); | 3212 checkUnnamed1052(o.linkedAdAccounts); |
| 3183 checkUnnamed1050(o.linkedViews); | 3213 checkUnnamed1053(o.linkedViews); |
| 3184 unittest.expect(o.name, unittest.equals('foo')); | 3214 unittest.expect(o.name, unittest.equals('foo')); |
| 3185 checkRemarketingAudienceStateBasedAudienceDefinition(o.stateBasedAudienceDef
inition); | 3215 checkRemarketingAudienceStateBasedAudienceDefinition( |
| 3186 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 3216 o.stateBasedAudienceDefinition); |
| 3217 unittest.expect( |
| 3218 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3187 unittest.expect(o.webPropertyId, unittest.equals('foo')); | 3219 unittest.expect(o.webPropertyId, unittest.equals('foo')); |
| 3188 } | 3220 } |
| 3189 buildCounterRemarketingAudience--; | 3221 buildCounterRemarketingAudience--; |
| 3190 } | 3222 } |
| 3191 | 3223 |
| 3192 buildUnnamed1051() { | 3224 buildUnnamed1054() { |
| 3193 var o = new core.List<api.RemarketingAudience>(); | 3225 var o = new core.List<api.RemarketingAudience>(); |
| 3194 o.add(buildRemarketingAudience()); | 3226 o.add(buildRemarketingAudience()); |
| 3195 o.add(buildRemarketingAudience()); | 3227 o.add(buildRemarketingAudience()); |
| 3196 return o; | 3228 return o; |
| 3197 } | 3229 } |
| 3198 | 3230 |
| 3199 checkUnnamed1051(core.List<api.RemarketingAudience> o) { | 3231 checkUnnamed1054(core.List<api.RemarketingAudience> o) { |
| 3200 unittest.expect(o, unittest.hasLength(2)); | 3232 unittest.expect(o, unittest.hasLength(2)); |
| 3201 checkRemarketingAudience(o[0]); | 3233 checkRemarketingAudience(o[0]); |
| 3202 checkRemarketingAudience(o[1]); | 3234 checkRemarketingAudience(o[1]); |
| 3203 } | 3235 } |
| 3204 | 3236 |
| 3205 core.int buildCounterRemarketingAudiences = 0; | 3237 core.int buildCounterRemarketingAudiences = 0; |
| 3206 buildRemarketingAudiences() { | 3238 buildRemarketingAudiences() { |
| 3207 var o = new api.RemarketingAudiences(); | 3239 var o = new api.RemarketingAudiences(); |
| 3208 buildCounterRemarketingAudiences++; | 3240 buildCounterRemarketingAudiences++; |
| 3209 if (buildCounterRemarketingAudiences < 3) { | 3241 if (buildCounterRemarketingAudiences < 3) { |
| 3210 o.items = buildUnnamed1051(); | 3242 o.items = buildUnnamed1054(); |
| 3211 o.itemsPerPage = 42; | 3243 o.itemsPerPage = 42; |
| 3212 o.kind = "foo"; | 3244 o.kind = "foo"; |
| 3213 o.nextLink = "foo"; | 3245 o.nextLink = "foo"; |
| 3214 o.previousLink = "foo"; | 3246 o.previousLink = "foo"; |
| 3215 o.startIndex = 42; | 3247 o.startIndex = 42; |
| 3216 o.totalResults = 42; | 3248 o.totalResults = 42; |
| 3217 o.username = "foo"; | 3249 o.username = "foo"; |
| 3218 } | 3250 } |
| 3219 buildCounterRemarketingAudiences--; | 3251 buildCounterRemarketingAudiences--; |
| 3220 return o; | 3252 return o; |
| 3221 } | 3253 } |
| 3222 | 3254 |
| 3223 checkRemarketingAudiences(api.RemarketingAudiences o) { | 3255 checkRemarketingAudiences(api.RemarketingAudiences o) { |
| 3224 buildCounterRemarketingAudiences++; | 3256 buildCounterRemarketingAudiences++; |
| 3225 if (buildCounterRemarketingAudiences < 3) { | 3257 if (buildCounterRemarketingAudiences < 3) { |
| 3226 checkUnnamed1051(o.items); | 3258 checkUnnamed1054(o.items); |
| 3227 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 3259 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 3228 unittest.expect(o.kind, unittest.equals('foo')); | 3260 unittest.expect(o.kind, unittest.equals('foo')); |
| 3229 unittest.expect(o.nextLink, unittest.equals('foo')); | 3261 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 3230 unittest.expect(o.previousLink, unittest.equals('foo')); | 3262 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 3231 unittest.expect(o.startIndex, unittest.equals(42)); | 3263 unittest.expect(o.startIndex, unittest.equals(42)); |
| 3232 unittest.expect(o.totalResults, unittest.equals(42)); | 3264 unittest.expect(o.totalResults, unittest.equals(42)); |
| 3233 unittest.expect(o.username, unittest.equals('foo')); | 3265 unittest.expect(o.username, unittest.equals('foo')); |
| 3234 } | 3266 } |
| 3235 buildCounterRemarketingAudiences--; | 3267 buildCounterRemarketingAudiences--; |
| 3236 } | 3268 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 3250 o.type = "foo"; | 3282 o.type = "foo"; |
| 3251 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 3283 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 3252 } | 3284 } |
| 3253 buildCounterSegment--; | 3285 buildCounterSegment--; |
| 3254 return o; | 3286 return o; |
| 3255 } | 3287 } |
| 3256 | 3288 |
| 3257 checkSegment(api.Segment o) { | 3289 checkSegment(api.Segment o) { |
| 3258 buildCounterSegment++; | 3290 buildCounterSegment++; |
| 3259 if (buildCounterSegment < 3) { | 3291 if (buildCounterSegment < 3) { |
| 3260 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 3292 unittest.expect( |
| 3293 o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3261 unittest.expect(o.definition, unittest.equals('foo')); | 3294 unittest.expect(o.definition, unittest.equals('foo')); |
| 3262 unittest.expect(o.id, unittest.equals('foo')); | 3295 unittest.expect(o.id, unittest.equals('foo')); |
| 3263 unittest.expect(o.kind, unittest.equals('foo')); | 3296 unittest.expect(o.kind, unittest.equals('foo')); |
| 3264 unittest.expect(o.name, unittest.equals('foo')); | 3297 unittest.expect(o.name, unittest.equals('foo')); |
| 3265 unittest.expect(o.segmentId, unittest.equals('foo')); | 3298 unittest.expect(o.segmentId, unittest.equals('foo')); |
| 3266 unittest.expect(o.selfLink, unittest.equals('foo')); | 3299 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 3267 unittest.expect(o.type, unittest.equals('foo')); | 3300 unittest.expect(o.type, unittest.equals('foo')); |
| 3268 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 3301 unittest.expect( |
| 3302 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3269 } | 3303 } |
| 3270 buildCounterSegment--; | 3304 buildCounterSegment--; |
| 3271 } | 3305 } |
| 3272 | 3306 |
| 3273 buildUnnamed1052() { | 3307 buildUnnamed1055() { |
| 3274 var o = new core.List<api.Segment>(); | 3308 var o = new core.List<api.Segment>(); |
| 3275 o.add(buildSegment()); | 3309 o.add(buildSegment()); |
| 3276 o.add(buildSegment()); | 3310 o.add(buildSegment()); |
| 3277 return o; | 3311 return o; |
| 3278 } | 3312 } |
| 3279 | 3313 |
| 3280 checkUnnamed1052(core.List<api.Segment> o) { | 3314 checkUnnamed1055(core.List<api.Segment> o) { |
| 3281 unittest.expect(o, unittest.hasLength(2)); | 3315 unittest.expect(o, unittest.hasLength(2)); |
| 3282 checkSegment(o[0]); | 3316 checkSegment(o[0]); |
| 3283 checkSegment(o[1]); | 3317 checkSegment(o[1]); |
| 3284 } | 3318 } |
| 3285 | 3319 |
| 3286 core.int buildCounterSegments = 0; | 3320 core.int buildCounterSegments = 0; |
| 3287 buildSegments() { | 3321 buildSegments() { |
| 3288 var o = new api.Segments(); | 3322 var o = new api.Segments(); |
| 3289 buildCounterSegments++; | 3323 buildCounterSegments++; |
| 3290 if (buildCounterSegments < 3) { | 3324 if (buildCounterSegments < 3) { |
| 3291 o.items = buildUnnamed1052(); | 3325 o.items = buildUnnamed1055(); |
| 3292 o.itemsPerPage = 42; | 3326 o.itemsPerPage = 42; |
| 3293 o.kind = "foo"; | 3327 o.kind = "foo"; |
| 3294 o.nextLink = "foo"; | 3328 o.nextLink = "foo"; |
| 3295 o.previousLink = "foo"; | 3329 o.previousLink = "foo"; |
| 3296 o.startIndex = 42; | 3330 o.startIndex = 42; |
| 3297 o.totalResults = 42; | 3331 o.totalResults = 42; |
| 3298 o.username = "foo"; | 3332 o.username = "foo"; |
| 3299 } | 3333 } |
| 3300 buildCounterSegments--; | 3334 buildCounterSegments--; |
| 3301 return o; | 3335 return o; |
| 3302 } | 3336 } |
| 3303 | 3337 |
| 3304 checkSegments(api.Segments o) { | 3338 checkSegments(api.Segments o) { |
| 3305 buildCounterSegments++; | 3339 buildCounterSegments++; |
| 3306 if (buildCounterSegments < 3) { | 3340 if (buildCounterSegments < 3) { |
| 3307 checkUnnamed1052(o.items); | 3341 checkUnnamed1055(o.items); |
| 3308 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 3342 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 3309 unittest.expect(o.kind, unittest.equals('foo')); | 3343 unittest.expect(o.kind, unittest.equals('foo')); |
| 3310 unittest.expect(o.nextLink, unittest.equals('foo')); | 3344 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 3311 unittest.expect(o.previousLink, unittest.equals('foo')); | 3345 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 3312 unittest.expect(o.startIndex, unittest.equals(42)); | 3346 unittest.expect(o.startIndex, unittest.equals(42)); |
| 3313 unittest.expect(o.totalResults, unittest.equals(42)); | 3347 unittest.expect(o.totalResults, unittest.equals(42)); |
| 3314 unittest.expect(o.username, unittest.equals('foo')); | 3348 unittest.expect(o.username, unittest.equals('foo')); |
| 3315 } | 3349 } |
| 3316 buildCounterSegments--; | 3350 buildCounterSegments--; |
| 3317 } | 3351 } |
| 3318 | 3352 |
| 3319 core.int buildCounterUnsampledReportCloudStorageDownloadDetails = 0; | 3353 core.int buildCounterUnsampledReportCloudStorageDownloadDetails = 0; |
| 3320 buildUnsampledReportCloudStorageDownloadDetails() { | 3354 buildUnsampledReportCloudStorageDownloadDetails() { |
| 3321 var o = new api.UnsampledReportCloudStorageDownloadDetails(); | 3355 var o = new api.UnsampledReportCloudStorageDownloadDetails(); |
| 3322 buildCounterUnsampledReportCloudStorageDownloadDetails++; | 3356 buildCounterUnsampledReportCloudStorageDownloadDetails++; |
| 3323 if (buildCounterUnsampledReportCloudStorageDownloadDetails < 3) { | 3357 if (buildCounterUnsampledReportCloudStorageDownloadDetails < 3) { |
| 3324 o.bucketId = "foo"; | 3358 o.bucketId = "foo"; |
| 3325 o.objectId = "foo"; | 3359 o.objectId = "foo"; |
| 3326 } | 3360 } |
| 3327 buildCounterUnsampledReportCloudStorageDownloadDetails--; | 3361 buildCounterUnsampledReportCloudStorageDownloadDetails--; |
| 3328 return o; | 3362 return o; |
| 3329 } | 3363 } |
| 3330 | 3364 |
| 3331 checkUnsampledReportCloudStorageDownloadDetails(api.UnsampledReportCloudStorageD
ownloadDetails o) { | 3365 checkUnsampledReportCloudStorageDownloadDetails( |
| 3366 api.UnsampledReportCloudStorageDownloadDetails o) { |
| 3332 buildCounterUnsampledReportCloudStorageDownloadDetails++; | 3367 buildCounterUnsampledReportCloudStorageDownloadDetails++; |
| 3333 if (buildCounterUnsampledReportCloudStorageDownloadDetails < 3) { | 3368 if (buildCounterUnsampledReportCloudStorageDownloadDetails < 3) { |
| 3334 unittest.expect(o.bucketId, unittest.equals('foo')); | 3369 unittest.expect(o.bucketId, unittest.equals('foo')); |
| 3335 unittest.expect(o.objectId, unittest.equals('foo')); | 3370 unittest.expect(o.objectId, unittest.equals('foo')); |
| 3336 } | 3371 } |
| 3337 buildCounterUnsampledReportCloudStorageDownloadDetails--; | 3372 buildCounterUnsampledReportCloudStorageDownloadDetails--; |
| 3338 } | 3373 } |
| 3339 | 3374 |
| 3340 core.int buildCounterUnsampledReportDriveDownloadDetails = 0; | 3375 core.int buildCounterUnsampledReportDriveDownloadDetails = 0; |
| 3341 buildUnsampledReportDriveDownloadDetails() { | 3376 buildUnsampledReportDriveDownloadDetails() { |
| 3342 var o = new api.UnsampledReportDriveDownloadDetails(); | 3377 var o = new api.UnsampledReportDriveDownloadDetails(); |
| 3343 buildCounterUnsampledReportDriveDownloadDetails++; | 3378 buildCounterUnsampledReportDriveDownloadDetails++; |
| 3344 if (buildCounterUnsampledReportDriveDownloadDetails < 3) { | 3379 if (buildCounterUnsampledReportDriveDownloadDetails < 3) { |
| 3345 o.documentId = "foo"; | 3380 o.documentId = "foo"; |
| 3346 } | 3381 } |
| 3347 buildCounterUnsampledReportDriveDownloadDetails--; | 3382 buildCounterUnsampledReportDriveDownloadDetails--; |
| 3348 return o; | 3383 return o; |
| 3349 } | 3384 } |
| 3350 | 3385 |
| 3351 checkUnsampledReportDriveDownloadDetails(api.UnsampledReportDriveDownloadDetails
o) { | 3386 checkUnsampledReportDriveDownloadDetails( |
| 3387 api.UnsampledReportDriveDownloadDetails o) { |
| 3352 buildCounterUnsampledReportDriveDownloadDetails++; | 3388 buildCounterUnsampledReportDriveDownloadDetails++; |
| 3353 if (buildCounterUnsampledReportDriveDownloadDetails < 3) { | 3389 if (buildCounterUnsampledReportDriveDownloadDetails < 3) { |
| 3354 unittest.expect(o.documentId, unittest.equals('foo')); | 3390 unittest.expect(o.documentId, unittest.equals('foo')); |
| 3355 } | 3391 } |
| 3356 buildCounterUnsampledReportDriveDownloadDetails--; | 3392 buildCounterUnsampledReportDriveDownloadDetails--; |
| 3357 } | 3393 } |
| 3358 | 3394 |
| 3359 core.int buildCounterUnsampledReport = 0; | 3395 core.int buildCounterUnsampledReport = 0; |
| 3360 buildUnsampledReport() { | 3396 buildUnsampledReport() { |
| 3361 var o = new api.UnsampledReport(); | 3397 var o = new api.UnsampledReport(); |
| 3362 buildCounterUnsampledReport++; | 3398 buildCounterUnsampledReport++; |
| 3363 if (buildCounterUnsampledReport < 3) { | 3399 if (buildCounterUnsampledReport < 3) { |
| 3364 o.accountId = "foo"; | 3400 o.accountId = "foo"; |
| 3365 o.cloudStorageDownloadDetails = buildUnsampledReportCloudStorageDownloadDeta
ils(); | 3401 o.cloudStorageDownloadDetails = |
| 3402 buildUnsampledReportCloudStorageDownloadDetails(); |
| 3366 o.created = core.DateTime.parse("2002-02-27T14:01:02"); | 3403 o.created = core.DateTime.parse("2002-02-27T14:01:02"); |
| 3367 o.dimensions = "foo"; | 3404 o.dimensions = "foo"; |
| 3368 o.downloadType = "foo"; | 3405 o.downloadType = "foo"; |
| 3369 o.driveDownloadDetails = buildUnsampledReportDriveDownloadDetails(); | 3406 o.driveDownloadDetails = buildUnsampledReportDriveDownloadDetails(); |
| 3370 o.end_date = "foo"; | 3407 o.end_date = "foo"; |
| 3371 o.filters = "foo"; | 3408 o.filters = "foo"; |
| 3372 o.id = "foo"; | 3409 o.id = "foo"; |
| 3373 o.kind = "foo"; | 3410 o.kind = "foo"; |
| 3374 o.metrics = "foo"; | 3411 o.metrics = "foo"; |
| 3375 o.profileId = "foo"; | 3412 o.profileId = "foo"; |
| 3376 o.segment = "foo"; | 3413 o.segment = "foo"; |
| 3377 o.selfLink = "foo"; | 3414 o.selfLink = "foo"; |
| 3378 o.start_date = "foo"; | 3415 o.start_date = "foo"; |
| 3379 o.status = "foo"; | 3416 o.status = "foo"; |
| 3380 o.title = "foo"; | 3417 o.title = "foo"; |
| 3381 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 3418 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 3382 o.webPropertyId = "foo"; | 3419 o.webPropertyId = "foo"; |
| 3383 } | 3420 } |
| 3384 buildCounterUnsampledReport--; | 3421 buildCounterUnsampledReport--; |
| 3385 return o; | 3422 return o; |
| 3386 } | 3423 } |
| 3387 | 3424 |
| 3388 checkUnsampledReport(api.UnsampledReport o) { | 3425 checkUnsampledReport(api.UnsampledReport o) { |
| 3389 buildCounterUnsampledReport++; | 3426 buildCounterUnsampledReport++; |
| 3390 if (buildCounterUnsampledReport < 3) { | 3427 if (buildCounterUnsampledReport < 3) { |
| 3391 unittest.expect(o.accountId, unittest.equals('foo')); | 3428 unittest.expect(o.accountId, unittest.equals('foo')); |
| 3392 checkUnsampledReportCloudStorageDownloadDetails(o.cloudStorageDownloadDetail
s); | 3429 checkUnsampledReportCloudStorageDownloadDetails( |
| 3393 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 3430 o.cloudStorageDownloadDetails); |
| 3431 unittest.expect( |
| 3432 o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3394 unittest.expect(o.dimensions, unittest.equals('foo')); | 3433 unittest.expect(o.dimensions, unittest.equals('foo')); |
| 3395 unittest.expect(o.downloadType, unittest.equals('foo')); | 3434 unittest.expect(o.downloadType, unittest.equals('foo')); |
| 3396 checkUnsampledReportDriveDownloadDetails(o.driveDownloadDetails); | 3435 checkUnsampledReportDriveDownloadDetails(o.driveDownloadDetails); |
| 3397 unittest.expect(o.end_date, unittest.equals('foo')); | 3436 unittest.expect(o.end_date, unittest.equals('foo')); |
| 3398 unittest.expect(o.filters, unittest.equals('foo')); | 3437 unittest.expect(o.filters, unittest.equals('foo')); |
| 3399 unittest.expect(o.id, unittest.equals('foo')); | 3438 unittest.expect(o.id, unittest.equals('foo')); |
| 3400 unittest.expect(o.kind, unittest.equals('foo')); | 3439 unittest.expect(o.kind, unittest.equals('foo')); |
| 3401 unittest.expect(o.metrics, unittest.equals('foo')); | 3440 unittest.expect(o.metrics, unittest.equals('foo')); |
| 3402 unittest.expect(o.profileId, unittest.equals('foo')); | 3441 unittest.expect(o.profileId, unittest.equals('foo')); |
| 3403 unittest.expect(o.segment, unittest.equals('foo')); | 3442 unittest.expect(o.segment, unittest.equals('foo')); |
| 3404 unittest.expect(o.selfLink, unittest.equals('foo')); | 3443 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 3405 unittest.expect(o.start_date, unittest.equals('foo')); | 3444 unittest.expect(o.start_date, unittest.equals('foo')); |
| 3406 unittest.expect(o.status, unittest.equals('foo')); | 3445 unittest.expect(o.status, unittest.equals('foo')); |
| 3407 unittest.expect(o.title, unittest.equals('foo')); | 3446 unittest.expect(o.title, unittest.equals('foo')); |
| 3408 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 3447 unittest.expect( |
| 3448 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3409 unittest.expect(o.webPropertyId, unittest.equals('foo')); | 3449 unittest.expect(o.webPropertyId, unittest.equals('foo')); |
| 3410 } | 3450 } |
| 3411 buildCounterUnsampledReport--; | 3451 buildCounterUnsampledReport--; |
| 3412 } | 3452 } |
| 3413 | 3453 |
| 3414 buildUnnamed1053() { | 3454 buildUnnamed1056() { |
| 3415 var o = new core.List<api.UnsampledReport>(); | 3455 var o = new core.List<api.UnsampledReport>(); |
| 3416 o.add(buildUnsampledReport()); | 3456 o.add(buildUnsampledReport()); |
| 3417 o.add(buildUnsampledReport()); | 3457 o.add(buildUnsampledReport()); |
| 3418 return o; | 3458 return o; |
| 3419 } | 3459 } |
| 3420 | 3460 |
| 3421 checkUnnamed1053(core.List<api.UnsampledReport> o) { | 3461 checkUnnamed1056(core.List<api.UnsampledReport> o) { |
| 3422 unittest.expect(o, unittest.hasLength(2)); | 3462 unittest.expect(o, unittest.hasLength(2)); |
| 3423 checkUnsampledReport(o[0]); | 3463 checkUnsampledReport(o[0]); |
| 3424 checkUnsampledReport(o[1]); | 3464 checkUnsampledReport(o[1]); |
| 3425 } | 3465 } |
| 3426 | 3466 |
| 3427 core.int buildCounterUnsampledReports = 0; | 3467 core.int buildCounterUnsampledReports = 0; |
| 3428 buildUnsampledReports() { | 3468 buildUnsampledReports() { |
| 3429 var o = new api.UnsampledReports(); | 3469 var o = new api.UnsampledReports(); |
| 3430 buildCounterUnsampledReports++; | 3470 buildCounterUnsampledReports++; |
| 3431 if (buildCounterUnsampledReports < 3) { | 3471 if (buildCounterUnsampledReports < 3) { |
| 3432 o.items = buildUnnamed1053(); | 3472 o.items = buildUnnamed1056(); |
| 3433 o.itemsPerPage = 42; | 3473 o.itemsPerPage = 42; |
| 3434 o.kind = "foo"; | 3474 o.kind = "foo"; |
| 3435 o.nextLink = "foo"; | 3475 o.nextLink = "foo"; |
| 3436 o.previousLink = "foo"; | 3476 o.previousLink = "foo"; |
| 3437 o.startIndex = 42; | 3477 o.startIndex = 42; |
| 3438 o.totalResults = 42; | 3478 o.totalResults = 42; |
| 3439 o.username = "foo"; | 3479 o.username = "foo"; |
| 3440 } | 3480 } |
| 3441 buildCounterUnsampledReports--; | 3481 buildCounterUnsampledReports--; |
| 3442 return o; | 3482 return o; |
| 3443 } | 3483 } |
| 3444 | 3484 |
| 3445 checkUnsampledReports(api.UnsampledReports o) { | 3485 checkUnsampledReports(api.UnsampledReports o) { |
| 3446 buildCounterUnsampledReports++; | 3486 buildCounterUnsampledReports++; |
| 3447 if (buildCounterUnsampledReports < 3) { | 3487 if (buildCounterUnsampledReports < 3) { |
| 3448 checkUnnamed1053(o.items); | 3488 checkUnnamed1056(o.items); |
| 3449 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 3489 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 3450 unittest.expect(o.kind, unittest.equals('foo')); | 3490 unittest.expect(o.kind, unittest.equals('foo')); |
| 3451 unittest.expect(o.nextLink, unittest.equals('foo')); | 3491 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 3452 unittest.expect(o.previousLink, unittest.equals('foo')); | 3492 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 3453 unittest.expect(o.startIndex, unittest.equals(42)); | 3493 unittest.expect(o.startIndex, unittest.equals(42)); |
| 3454 unittest.expect(o.totalResults, unittest.equals(42)); | 3494 unittest.expect(o.totalResults, unittest.equals(42)); |
| 3455 unittest.expect(o.username, unittest.equals('foo')); | 3495 unittest.expect(o.username, unittest.equals('foo')); |
| 3456 } | 3496 } |
| 3457 buildCounterUnsampledReports--; | 3497 buildCounterUnsampledReports--; |
| 3458 } | 3498 } |
| 3459 | 3499 |
| 3460 buildUnnamed1054() { | 3500 buildUnnamed1057() { |
| 3461 var o = new core.List<core.String>(); | 3501 var o = new core.List<core.String>(); |
| 3462 o.add("foo"); | 3502 o.add("foo"); |
| 3463 o.add("foo"); | 3503 o.add("foo"); |
| 3464 return o; | 3504 return o; |
| 3465 } | 3505 } |
| 3466 | 3506 |
| 3467 checkUnnamed1054(core.List<core.String> o) { | 3507 checkUnnamed1057(core.List<core.String> o) { |
| 3468 unittest.expect(o, unittest.hasLength(2)); | 3508 unittest.expect(o, unittest.hasLength(2)); |
| 3469 unittest.expect(o[0], unittest.equals('foo')); | 3509 unittest.expect(o[0], unittest.equals('foo')); |
| 3470 unittest.expect(o[1], unittest.equals('foo')); | 3510 unittest.expect(o[1], unittest.equals('foo')); |
| 3471 } | 3511 } |
| 3472 | 3512 |
| 3473 core.int buildCounterUpload = 0; | 3513 core.int buildCounterUpload = 0; |
| 3474 buildUpload() { | 3514 buildUpload() { |
| 3475 var o = new api.Upload(); | 3515 var o = new api.Upload(); |
| 3476 buildCounterUpload++; | 3516 buildCounterUpload++; |
| 3477 if (buildCounterUpload < 3) { | 3517 if (buildCounterUpload < 3) { |
| 3478 o.accountId = "foo"; | 3518 o.accountId = "foo"; |
| 3479 o.customDataSourceId = "foo"; | 3519 o.customDataSourceId = "foo"; |
| 3480 o.errors = buildUnnamed1054(); | 3520 o.errors = buildUnnamed1057(); |
| 3481 o.id = "foo"; | 3521 o.id = "foo"; |
| 3482 o.kind = "foo"; | 3522 o.kind = "foo"; |
| 3483 o.status = "foo"; | 3523 o.status = "foo"; |
| 3484 o.uploadTime = core.DateTime.parse("2002-02-27T14:01:02"); | 3524 o.uploadTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| 3485 } | 3525 } |
| 3486 buildCounterUpload--; | 3526 buildCounterUpload--; |
| 3487 return o; | 3527 return o; |
| 3488 } | 3528 } |
| 3489 | 3529 |
| 3490 checkUpload(api.Upload o) { | 3530 checkUpload(api.Upload o) { |
| 3491 buildCounterUpload++; | 3531 buildCounterUpload++; |
| 3492 if (buildCounterUpload < 3) { | 3532 if (buildCounterUpload < 3) { |
| 3493 unittest.expect(o.accountId, unittest.equals('foo')); | 3533 unittest.expect(o.accountId, unittest.equals('foo')); |
| 3494 unittest.expect(o.customDataSourceId, unittest.equals('foo')); | 3534 unittest.expect(o.customDataSourceId, unittest.equals('foo')); |
| 3495 checkUnnamed1054(o.errors); | 3535 checkUnnamed1057(o.errors); |
| 3496 unittest.expect(o.id, unittest.equals('foo')); | 3536 unittest.expect(o.id, unittest.equals('foo')); |
| 3497 unittest.expect(o.kind, unittest.equals('foo')); | 3537 unittest.expect(o.kind, unittest.equals('foo')); |
| 3498 unittest.expect(o.status, unittest.equals('foo')); | 3538 unittest.expect(o.status, unittest.equals('foo')); |
| 3499 unittest.expect(o.uploadTime, unittest.equals(core.DateTime.parse("2002-02-2
7T14:01:02"))); | 3539 unittest.expect(o.uploadTime, |
| 3540 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3500 } | 3541 } |
| 3501 buildCounterUpload--; | 3542 buildCounterUpload--; |
| 3502 } | 3543 } |
| 3503 | 3544 |
| 3504 buildUnnamed1055() { | 3545 buildUnnamed1058() { |
| 3505 var o = new core.List<api.Upload>(); | 3546 var o = new core.List<api.Upload>(); |
| 3506 o.add(buildUpload()); | 3547 o.add(buildUpload()); |
| 3507 o.add(buildUpload()); | 3548 o.add(buildUpload()); |
| 3508 return o; | 3549 return o; |
| 3509 } | 3550 } |
| 3510 | 3551 |
| 3511 checkUnnamed1055(core.List<api.Upload> o) { | 3552 checkUnnamed1058(core.List<api.Upload> o) { |
| 3512 unittest.expect(o, unittest.hasLength(2)); | 3553 unittest.expect(o, unittest.hasLength(2)); |
| 3513 checkUpload(o[0]); | 3554 checkUpload(o[0]); |
| 3514 checkUpload(o[1]); | 3555 checkUpload(o[1]); |
| 3515 } | 3556 } |
| 3516 | 3557 |
| 3517 core.int buildCounterUploads = 0; | 3558 core.int buildCounterUploads = 0; |
| 3518 buildUploads() { | 3559 buildUploads() { |
| 3519 var o = new api.Uploads(); | 3560 var o = new api.Uploads(); |
| 3520 buildCounterUploads++; | 3561 buildCounterUploads++; |
| 3521 if (buildCounterUploads < 3) { | 3562 if (buildCounterUploads < 3) { |
| 3522 o.items = buildUnnamed1055(); | 3563 o.items = buildUnnamed1058(); |
| 3523 o.itemsPerPage = 42; | 3564 o.itemsPerPage = 42; |
| 3524 o.kind = "foo"; | 3565 o.kind = "foo"; |
| 3525 o.nextLink = "foo"; | 3566 o.nextLink = "foo"; |
| 3526 o.previousLink = "foo"; | 3567 o.previousLink = "foo"; |
| 3527 o.startIndex = 42; | 3568 o.startIndex = 42; |
| 3528 o.totalResults = 42; | 3569 o.totalResults = 42; |
| 3529 } | 3570 } |
| 3530 buildCounterUploads--; | 3571 buildCounterUploads--; |
| 3531 return o; | 3572 return o; |
| 3532 } | 3573 } |
| 3533 | 3574 |
| 3534 checkUploads(api.Uploads o) { | 3575 checkUploads(api.Uploads o) { |
| 3535 buildCounterUploads++; | 3576 buildCounterUploads++; |
| 3536 if (buildCounterUploads < 3) { | 3577 if (buildCounterUploads < 3) { |
| 3537 checkUnnamed1055(o.items); | 3578 checkUnnamed1058(o.items); |
| 3538 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 3579 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 3539 unittest.expect(o.kind, unittest.equals('foo')); | 3580 unittest.expect(o.kind, unittest.equals('foo')); |
| 3540 unittest.expect(o.nextLink, unittest.equals('foo')); | 3581 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 3541 unittest.expect(o.previousLink, unittest.equals('foo')); | 3582 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 3542 unittest.expect(o.startIndex, unittest.equals(42)); | 3583 unittest.expect(o.startIndex, unittest.equals(42)); |
| 3543 unittest.expect(o.totalResults, unittest.equals(42)); | 3584 unittest.expect(o.totalResults, unittest.equals(42)); |
| 3544 } | 3585 } |
| 3545 buildCounterUploads--; | 3586 buildCounterUploads--; |
| 3546 } | 3587 } |
| 3547 | 3588 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3590 unittest.expect(o.accountId, unittest.equals('foo')); | 3631 unittest.expect(o.accountId, unittest.equals('foo')); |
| 3591 unittest.expect(o.href, unittest.equals('foo')); | 3632 unittest.expect(o.href, unittest.equals('foo')); |
| 3592 unittest.expect(o.id, unittest.equals('foo')); | 3633 unittest.expect(o.id, unittest.equals('foo')); |
| 3593 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); | 3634 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); |
| 3594 unittest.expect(o.kind, unittest.equals('foo')); | 3635 unittest.expect(o.kind, unittest.equals('foo')); |
| 3595 unittest.expect(o.name, unittest.equals('foo')); | 3636 unittest.expect(o.name, unittest.equals('foo')); |
| 3596 } | 3637 } |
| 3597 buildCounterWebPropertyRef--; | 3638 buildCounterWebPropertyRef--; |
| 3598 } | 3639 } |
| 3599 | 3640 |
| 3600 buildUnnamed1056() { | 3641 buildUnnamed1059() { |
| 3601 var o = new core.List<api.ProfileSummary>(); | 3642 var o = new core.List<api.ProfileSummary>(); |
| 3602 o.add(buildProfileSummary()); | 3643 o.add(buildProfileSummary()); |
| 3603 o.add(buildProfileSummary()); | 3644 o.add(buildProfileSummary()); |
| 3604 return o; | 3645 return o; |
| 3605 } | 3646 } |
| 3606 | 3647 |
| 3607 checkUnnamed1056(core.List<api.ProfileSummary> o) { | 3648 checkUnnamed1059(core.List<api.ProfileSummary> o) { |
| 3608 unittest.expect(o, unittest.hasLength(2)); | 3649 unittest.expect(o, unittest.hasLength(2)); |
| 3609 checkProfileSummary(o[0]); | 3650 checkProfileSummary(o[0]); |
| 3610 checkProfileSummary(o[1]); | 3651 checkProfileSummary(o[1]); |
| 3611 } | 3652 } |
| 3612 | 3653 |
| 3613 core.int buildCounterWebPropertySummary = 0; | 3654 core.int buildCounterWebPropertySummary = 0; |
| 3614 buildWebPropertySummary() { | 3655 buildWebPropertySummary() { |
| 3615 var o = new api.WebPropertySummary(); | 3656 var o = new api.WebPropertySummary(); |
| 3616 buildCounterWebPropertySummary++; | 3657 buildCounterWebPropertySummary++; |
| 3617 if (buildCounterWebPropertySummary < 3) { | 3658 if (buildCounterWebPropertySummary < 3) { |
| 3618 o.id = "foo"; | 3659 o.id = "foo"; |
| 3619 o.internalWebPropertyId = "foo"; | 3660 o.internalWebPropertyId = "foo"; |
| 3620 o.kind = "foo"; | 3661 o.kind = "foo"; |
| 3621 o.level = "foo"; | 3662 o.level = "foo"; |
| 3622 o.name = "foo"; | 3663 o.name = "foo"; |
| 3623 o.profiles = buildUnnamed1056(); | 3664 o.profiles = buildUnnamed1059(); |
| 3624 o.starred = true; | 3665 o.starred = true; |
| 3625 o.websiteUrl = "foo"; | 3666 o.websiteUrl = "foo"; |
| 3626 } | 3667 } |
| 3627 buildCounterWebPropertySummary--; | 3668 buildCounterWebPropertySummary--; |
| 3628 return o; | 3669 return o; |
| 3629 } | 3670 } |
| 3630 | 3671 |
| 3631 checkWebPropertySummary(api.WebPropertySummary o) { | 3672 checkWebPropertySummary(api.WebPropertySummary o) { |
| 3632 buildCounterWebPropertySummary++; | 3673 buildCounterWebPropertySummary++; |
| 3633 if (buildCounterWebPropertySummary < 3) { | 3674 if (buildCounterWebPropertySummary < 3) { |
| 3634 unittest.expect(o.id, unittest.equals('foo')); | 3675 unittest.expect(o.id, unittest.equals('foo')); |
| 3635 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); | 3676 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); |
| 3636 unittest.expect(o.kind, unittest.equals('foo')); | 3677 unittest.expect(o.kind, unittest.equals('foo')); |
| 3637 unittest.expect(o.level, unittest.equals('foo')); | 3678 unittest.expect(o.level, unittest.equals('foo')); |
| 3638 unittest.expect(o.name, unittest.equals('foo')); | 3679 unittest.expect(o.name, unittest.equals('foo')); |
| 3639 checkUnnamed1056(o.profiles); | 3680 checkUnnamed1059(o.profiles); |
| 3640 unittest.expect(o.starred, unittest.isTrue); | 3681 unittest.expect(o.starred, unittest.isTrue); |
| 3641 unittest.expect(o.websiteUrl, unittest.equals('foo')); | 3682 unittest.expect(o.websiteUrl, unittest.equals('foo')); |
| 3642 } | 3683 } |
| 3643 buildCounterWebPropertySummary--; | 3684 buildCounterWebPropertySummary--; |
| 3644 } | 3685 } |
| 3645 | 3686 |
| 3646 buildUnnamed1057() { | 3687 buildUnnamed1060() { |
| 3647 var o = new core.List<api.Webproperty>(); | 3688 var o = new core.List<api.Webproperty>(); |
| 3648 o.add(buildWebproperty()); | 3689 o.add(buildWebproperty()); |
| 3649 o.add(buildWebproperty()); | 3690 o.add(buildWebproperty()); |
| 3650 return o; | 3691 return o; |
| 3651 } | 3692 } |
| 3652 | 3693 |
| 3653 checkUnnamed1057(core.List<api.Webproperty> o) { | 3694 checkUnnamed1060(core.List<api.Webproperty> o) { |
| 3654 unittest.expect(o, unittest.hasLength(2)); | 3695 unittest.expect(o, unittest.hasLength(2)); |
| 3655 checkWebproperty(o[0]); | 3696 checkWebproperty(o[0]); |
| 3656 checkWebproperty(o[1]); | 3697 checkWebproperty(o[1]); |
| 3657 } | 3698 } |
| 3658 | 3699 |
| 3659 core.int buildCounterWebproperties = 0; | 3700 core.int buildCounterWebproperties = 0; |
| 3660 buildWebproperties() { | 3701 buildWebproperties() { |
| 3661 var o = new api.Webproperties(); | 3702 var o = new api.Webproperties(); |
| 3662 buildCounterWebproperties++; | 3703 buildCounterWebproperties++; |
| 3663 if (buildCounterWebproperties < 3) { | 3704 if (buildCounterWebproperties < 3) { |
| 3664 o.items = buildUnnamed1057(); | 3705 o.items = buildUnnamed1060(); |
| 3665 o.itemsPerPage = 42; | 3706 o.itemsPerPage = 42; |
| 3666 o.kind = "foo"; | 3707 o.kind = "foo"; |
| 3667 o.nextLink = "foo"; | 3708 o.nextLink = "foo"; |
| 3668 o.previousLink = "foo"; | 3709 o.previousLink = "foo"; |
| 3669 o.startIndex = 42; | 3710 o.startIndex = 42; |
| 3670 o.totalResults = 42; | 3711 o.totalResults = 42; |
| 3671 o.username = "foo"; | 3712 o.username = "foo"; |
| 3672 } | 3713 } |
| 3673 buildCounterWebproperties--; | 3714 buildCounterWebproperties--; |
| 3674 return o; | 3715 return o; |
| 3675 } | 3716 } |
| 3676 | 3717 |
| 3677 checkWebproperties(api.Webproperties o) { | 3718 checkWebproperties(api.Webproperties o) { |
| 3678 buildCounterWebproperties++; | 3719 buildCounterWebproperties++; |
| 3679 if (buildCounterWebproperties < 3) { | 3720 if (buildCounterWebproperties < 3) { |
| 3680 checkUnnamed1057(o.items); | 3721 checkUnnamed1060(o.items); |
| 3681 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 3722 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
| 3682 unittest.expect(o.kind, unittest.equals('foo')); | 3723 unittest.expect(o.kind, unittest.equals('foo')); |
| 3683 unittest.expect(o.nextLink, unittest.equals('foo')); | 3724 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 3684 unittest.expect(o.previousLink, unittest.equals('foo')); | 3725 unittest.expect(o.previousLink, unittest.equals('foo')); |
| 3685 unittest.expect(o.startIndex, unittest.equals(42)); | 3726 unittest.expect(o.startIndex, unittest.equals(42)); |
| 3686 unittest.expect(o.totalResults, unittest.equals(42)); | 3727 unittest.expect(o.totalResults, unittest.equals(42)); |
| 3687 unittest.expect(o.username, unittest.equals('foo')); | 3728 unittest.expect(o.username, unittest.equals('foo')); |
| 3688 } | 3729 } |
| 3689 buildCounterWebproperties--; | 3730 buildCounterWebproperties--; |
| 3690 } | 3731 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3724 | 3765 |
| 3725 checkWebpropertyParentLink(api.WebpropertyParentLink o) { | 3766 checkWebpropertyParentLink(api.WebpropertyParentLink o) { |
| 3726 buildCounterWebpropertyParentLink++; | 3767 buildCounterWebpropertyParentLink++; |
| 3727 if (buildCounterWebpropertyParentLink < 3) { | 3768 if (buildCounterWebpropertyParentLink < 3) { |
| 3728 unittest.expect(o.href, unittest.equals('foo')); | 3769 unittest.expect(o.href, unittest.equals('foo')); |
| 3729 unittest.expect(o.type, unittest.equals('foo')); | 3770 unittest.expect(o.type, unittest.equals('foo')); |
| 3730 } | 3771 } |
| 3731 buildCounterWebpropertyParentLink--; | 3772 buildCounterWebpropertyParentLink--; |
| 3732 } | 3773 } |
| 3733 | 3774 |
| 3734 buildUnnamed1058() { | 3775 buildUnnamed1061() { |
| 3735 var o = new core.List<core.String>(); | 3776 var o = new core.List<core.String>(); |
| 3736 o.add("foo"); | 3777 o.add("foo"); |
| 3737 o.add("foo"); | 3778 o.add("foo"); |
| 3738 return o; | 3779 return o; |
| 3739 } | 3780 } |
| 3740 | 3781 |
| 3741 checkUnnamed1058(core.List<core.String> o) { | 3782 checkUnnamed1061(core.List<core.String> o) { |
| 3742 unittest.expect(o, unittest.hasLength(2)); | 3783 unittest.expect(o, unittest.hasLength(2)); |
| 3743 unittest.expect(o[0], unittest.equals('foo')); | 3784 unittest.expect(o[0], unittest.equals('foo')); |
| 3744 unittest.expect(o[1], unittest.equals('foo')); | 3785 unittest.expect(o[1], unittest.equals('foo')); |
| 3745 } | 3786 } |
| 3746 | 3787 |
| 3747 core.int buildCounterWebpropertyPermissions = 0; | 3788 core.int buildCounterWebpropertyPermissions = 0; |
| 3748 buildWebpropertyPermissions() { | 3789 buildWebpropertyPermissions() { |
| 3749 var o = new api.WebpropertyPermissions(); | 3790 var o = new api.WebpropertyPermissions(); |
| 3750 buildCounterWebpropertyPermissions++; | 3791 buildCounterWebpropertyPermissions++; |
| 3751 if (buildCounterWebpropertyPermissions < 3) { | 3792 if (buildCounterWebpropertyPermissions < 3) { |
| 3752 o.effective = buildUnnamed1058(); | 3793 o.effective = buildUnnamed1061(); |
| 3753 } | 3794 } |
| 3754 buildCounterWebpropertyPermissions--; | 3795 buildCounterWebpropertyPermissions--; |
| 3755 return o; | 3796 return o; |
| 3756 } | 3797 } |
| 3757 | 3798 |
| 3758 checkWebpropertyPermissions(api.WebpropertyPermissions o) { | 3799 checkWebpropertyPermissions(api.WebpropertyPermissions o) { |
| 3759 buildCounterWebpropertyPermissions++; | 3800 buildCounterWebpropertyPermissions++; |
| 3760 if (buildCounterWebpropertyPermissions < 3) { | 3801 if (buildCounterWebpropertyPermissions < 3) { |
| 3761 checkUnnamed1058(o.effective); | 3802 checkUnnamed1061(o.effective); |
| 3762 } | 3803 } |
| 3763 buildCounterWebpropertyPermissions--; | 3804 buildCounterWebpropertyPermissions--; |
| 3764 } | 3805 } |
| 3765 | 3806 |
| 3766 core.int buildCounterWebproperty = 0; | 3807 core.int buildCounterWebproperty = 0; |
| 3767 buildWebproperty() { | 3808 buildWebproperty() { |
| 3768 var o = new api.Webproperty(); | 3809 var o = new api.Webproperty(); |
| 3769 buildCounterWebproperty++; | 3810 buildCounterWebproperty++; |
| 3770 if (buildCounterWebproperty < 3) { | 3811 if (buildCounterWebproperty < 3) { |
| 3771 o.accountId = "foo"; | 3812 o.accountId = "foo"; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 3788 } | 3829 } |
| 3789 buildCounterWebproperty--; | 3830 buildCounterWebproperty--; |
| 3790 return o; | 3831 return o; |
| 3791 } | 3832 } |
| 3792 | 3833 |
| 3793 checkWebproperty(api.Webproperty o) { | 3834 checkWebproperty(api.Webproperty o) { |
| 3794 buildCounterWebproperty++; | 3835 buildCounterWebproperty++; |
| 3795 if (buildCounterWebproperty < 3) { | 3836 if (buildCounterWebproperty < 3) { |
| 3796 unittest.expect(o.accountId, unittest.equals('foo')); | 3837 unittest.expect(o.accountId, unittest.equals('foo')); |
| 3797 checkWebpropertyChildLink(o.childLink); | 3838 checkWebpropertyChildLink(o.childLink); |
| 3798 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 3839 unittest.expect( |
| 3840 o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3799 unittest.expect(o.defaultProfileId, unittest.equals('foo')); | 3841 unittest.expect(o.defaultProfileId, unittest.equals('foo')); |
| 3800 unittest.expect(o.id, unittest.equals('foo')); | 3842 unittest.expect(o.id, unittest.equals('foo')); |
| 3801 unittest.expect(o.industryVertical, unittest.equals('foo')); | 3843 unittest.expect(o.industryVertical, unittest.equals('foo')); |
| 3802 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); | 3844 unittest.expect(o.internalWebPropertyId, unittest.equals('foo')); |
| 3803 unittest.expect(o.kind, unittest.equals('foo')); | 3845 unittest.expect(o.kind, unittest.equals('foo')); |
| 3804 unittest.expect(o.level, unittest.equals('foo')); | 3846 unittest.expect(o.level, unittest.equals('foo')); |
| 3805 unittest.expect(o.name, unittest.equals('foo')); | 3847 unittest.expect(o.name, unittest.equals('foo')); |
| 3806 checkWebpropertyParentLink(o.parentLink); | 3848 checkWebpropertyParentLink(o.parentLink); |
| 3807 checkWebpropertyPermissions(o.permissions); | 3849 checkWebpropertyPermissions(o.permissions); |
| 3808 unittest.expect(o.profileCount, unittest.equals(42)); | 3850 unittest.expect(o.profileCount, unittest.equals(42)); |
| 3809 unittest.expect(o.selfLink, unittest.equals('foo')); | 3851 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 3810 unittest.expect(o.starred, unittest.isTrue); | 3852 unittest.expect(o.starred, unittest.isTrue); |
| 3811 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 3853 unittest.expect( |
| 3854 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3812 unittest.expect(o.websiteUrl, unittest.equals('foo')); | 3855 unittest.expect(o.websiteUrl, unittest.equals('foo')); |
| 3813 } | 3856 } |
| 3814 buildCounterWebproperty--; | 3857 buildCounterWebproperty--; |
| 3815 } | 3858 } |
| 3816 | 3859 |
| 3817 | |
| 3818 main() { | 3860 main() { |
| 3819 unittest.group("obj-schema-AccountChildLink", () { | 3861 unittest.group("obj-schema-AccountChildLink", () { |
| 3820 unittest.test("to-json--from-json", () { | 3862 unittest.test("to-json--from-json", () { |
| 3821 var o = buildAccountChildLink(); | 3863 var o = buildAccountChildLink(); |
| 3822 var od = new api.AccountChildLink.fromJson(o.toJson()); | 3864 var od = new api.AccountChildLink.fromJson(o.toJson()); |
| 3823 checkAccountChildLink(od); | 3865 checkAccountChildLink(od); |
| 3824 }); | 3866 }); |
| 3825 }); | 3867 }); |
| 3826 | 3868 |
| 3827 | |
| 3828 unittest.group("obj-schema-AccountPermissions", () { | 3869 unittest.group("obj-schema-AccountPermissions", () { |
| 3829 unittest.test("to-json--from-json", () { | 3870 unittest.test("to-json--from-json", () { |
| 3830 var o = buildAccountPermissions(); | 3871 var o = buildAccountPermissions(); |
| 3831 var od = new api.AccountPermissions.fromJson(o.toJson()); | 3872 var od = new api.AccountPermissions.fromJson(o.toJson()); |
| 3832 checkAccountPermissions(od); | 3873 checkAccountPermissions(od); |
| 3833 }); | 3874 }); |
| 3834 }); | 3875 }); |
| 3835 | 3876 |
| 3836 | |
| 3837 unittest.group("obj-schema-Account", () { | 3877 unittest.group("obj-schema-Account", () { |
| 3838 unittest.test("to-json--from-json", () { | 3878 unittest.test("to-json--from-json", () { |
| 3839 var o = buildAccount(); | 3879 var o = buildAccount(); |
| 3840 var od = new api.Account.fromJson(o.toJson()); | 3880 var od = new api.Account.fromJson(o.toJson()); |
| 3841 checkAccount(od); | 3881 checkAccount(od); |
| 3842 }); | 3882 }); |
| 3843 }); | 3883 }); |
| 3844 | 3884 |
| 3845 | |
| 3846 unittest.group("obj-schema-AccountRef", () { | 3885 unittest.group("obj-schema-AccountRef", () { |
| 3847 unittest.test("to-json--from-json", () { | 3886 unittest.test("to-json--from-json", () { |
| 3848 var o = buildAccountRef(); | 3887 var o = buildAccountRef(); |
| 3849 var od = new api.AccountRef.fromJson(o.toJson()); | 3888 var od = new api.AccountRef.fromJson(o.toJson()); |
| 3850 checkAccountRef(od); | 3889 checkAccountRef(od); |
| 3851 }); | 3890 }); |
| 3852 }); | 3891 }); |
| 3853 | 3892 |
| 3854 | |
| 3855 unittest.group("obj-schema-AccountSummaries", () { | 3893 unittest.group("obj-schema-AccountSummaries", () { |
| 3856 unittest.test("to-json--from-json", () { | 3894 unittest.test("to-json--from-json", () { |
| 3857 var o = buildAccountSummaries(); | 3895 var o = buildAccountSummaries(); |
| 3858 var od = new api.AccountSummaries.fromJson(o.toJson()); | 3896 var od = new api.AccountSummaries.fromJson(o.toJson()); |
| 3859 checkAccountSummaries(od); | 3897 checkAccountSummaries(od); |
| 3860 }); | 3898 }); |
| 3861 }); | 3899 }); |
| 3862 | 3900 |
| 3863 | |
| 3864 unittest.group("obj-schema-AccountSummary", () { | 3901 unittest.group("obj-schema-AccountSummary", () { |
| 3865 unittest.test("to-json--from-json", () { | 3902 unittest.test("to-json--from-json", () { |
| 3866 var o = buildAccountSummary(); | 3903 var o = buildAccountSummary(); |
| 3867 var od = new api.AccountSummary.fromJson(o.toJson()); | 3904 var od = new api.AccountSummary.fromJson(o.toJson()); |
| 3868 checkAccountSummary(od); | 3905 checkAccountSummary(od); |
| 3869 }); | 3906 }); |
| 3870 }); | 3907 }); |
| 3871 | 3908 |
| 3872 | |
| 3873 unittest.group("obj-schema-AccountTicket", () { | 3909 unittest.group("obj-schema-AccountTicket", () { |
| 3874 unittest.test("to-json--from-json", () { | 3910 unittest.test("to-json--from-json", () { |
| 3875 var o = buildAccountTicket(); | 3911 var o = buildAccountTicket(); |
| 3876 var od = new api.AccountTicket.fromJson(o.toJson()); | 3912 var od = new api.AccountTicket.fromJson(o.toJson()); |
| 3877 checkAccountTicket(od); | 3913 checkAccountTicket(od); |
| 3878 }); | 3914 }); |
| 3879 }); | 3915 }); |
| 3880 | 3916 |
| 3881 | |
| 3882 unittest.group("obj-schema-Accounts", () { | 3917 unittest.group("obj-schema-Accounts", () { |
| 3883 unittest.test("to-json--from-json", () { | 3918 unittest.test("to-json--from-json", () { |
| 3884 var o = buildAccounts(); | 3919 var o = buildAccounts(); |
| 3885 var od = new api.Accounts.fromJson(o.toJson()); | 3920 var od = new api.Accounts.fromJson(o.toJson()); |
| 3886 checkAccounts(od); | 3921 checkAccounts(od); |
| 3887 }); | 3922 }); |
| 3888 }); | 3923 }); |
| 3889 | 3924 |
| 3890 | |
| 3891 unittest.group("obj-schema-AdWordsAccount", () { | 3925 unittest.group("obj-schema-AdWordsAccount", () { |
| 3892 unittest.test("to-json--from-json", () { | 3926 unittest.test("to-json--from-json", () { |
| 3893 var o = buildAdWordsAccount(); | 3927 var o = buildAdWordsAccount(); |
| 3894 var od = new api.AdWordsAccount.fromJson(o.toJson()); | 3928 var od = new api.AdWordsAccount.fromJson(o.toJson()); |
| 3895 checkAdWordsAccount(od); | 3929 checkAdWordsAccount(od); |
| 3896 }); | 3930 }); |
| 3897 }); | 3931 }); |
| 3898 | 3932 |
| 3899 | |
| 3900 unittest.group("obj-schema-AnalyticsDataimportDeleteUploadDataRequest", () { | 3933 unittest.group("obj-schema-AnalyticsDataimportDeleteUploadDataRequest", () { |
| 3901 unittest.test("to-json--from-json", () { | 3934 unittest.test("to-json--from-json", () { |
| 3902 var o = buildAnalyticsDataimportDeleteUploadDataRequest(); | 3935 var o = buildAnalyticsDataimportDeleteUploadDataRequest(); |
| 3903 var od = new api.AnalyticsDataimportDeleteUploadDataRequest.fromJson(o.toJ
son()); | 3936 var od = new api.AnalyticsDataimportDeleteUploadDataRequest.fromJson( |
| 3937 o.toJson()); |
| 3904 checkAnalyticsDataimportDeleteUploadDataRequest(od); | 3938 checkAnalyticsDataimportDeleteUploadDataRequest(od); |
| 3905 }); | 3939 }); |
| 3906 }); | 3940 }); |
| 3907 | 3941 |
| 3908 | |
| 3909 unittest.group("obj-schema-Column", () { | 3942 unittest.group("obj-schema-Column", () { |
| 3910 unittest.test("to-json--from-json", () { | 3943 unittest.test("to-json--from-json", () { |
| 3911 var o = buildColumn(); | 3944 var o = buildColumn(); |
| 3912 var od = new api.Column.fromJson(o.toJson()); | 3945 var od = new api.Column.fromJson(o.toJson()); |
| 3913 checkColumn(od); | 3946 checkColumn(od); |
| 3914 }); | 3947 }); |
| 3915 }); | 3948 }); |
| 3916 | 3949 |
| 3917 | |
| 3918 unittest.group("obj-schema-Columns", () { | 3950 unittest.group("obj-schema-Columns", () { |
| 3919 unittest.test("to-json--from-json", () { | 3951 unittest.test("to-json--from-json", () { |
| 3920 var o = buildColumns(); | 3952 var o = buildColumns(); |
| 3921 var od = new api.Columns.fromJson(o.toJson()); | 3953 var od = new api.Columns.fromJson(o.toJson()); |
| 3922 checkColumns(od); | 3954 checkColumns(od); |
| 3923 }); | 3955 }); |
| 3924 }); | 3956 }); |
| 3925 | 3957 |
| 3926 | |
| 3927 unittest.group("obj-schema-CustomDataSourceChildLink", () { | 3958 unittest.group("obj-schema-CustomDataSourceChildLink", () { |
| 3928 unittest.test("to-json--from-json", () { | 3959 unittest.test("to-json--from-json", () { |
| 3929 var o = buildCustomDataSourceChildLink(); | 3960 var o = buildCustomDataSourceChildLink(); |
| 3930 var od = new api.CustomDataSourceChildLink.fromJson(o.toJson()); | 3961 var od = new api.CustomDataSourceChildLink.fromJson(o.toJson()); |
| 3931 checkCustomDataSourceChildLink(od); | 3962 checkCustomDataSourceChildLink(od); |
| 3932 }); | 3963 }); |
| 3933 }); | 3964 }); |
| 3934 | 3965 |
| 3935 | |
| 3936 unittest.group("obj-schema-CustomDataSourceParentLink", () { | 3966 unittest.group("obj-schema-CustomDataSourceParentLink", () { |
| 3937 unittest.test("to-json--from-json", () { | 3967 unittest.test("to-json--from-json", () { |
| 3938 var o = buildCustomDataSourceParentLink(); | 3968 var o = buildCustomDataSourceParentLink(); |
| 3939 var od = new api.CustomDataSourceParentLink.fromJson(o.toJson()); | 3969 var od = new api.CustomDataSourceParentLink.fromJson(o.toJson()); |
| 3940 checkCustomDataSourceParentLink(od); | 3970 checkCustomDataSourceParentLink(od); |
| 3941 }); | 3971 }); |
| 3942 }); | 3972 }); |
| 3943 | 3973 |
| 3944 | |
| 3945 unittest.group("obj-schema-CustomDataSource", () { | 3974 unittest.group("obj-schema-CustomDataSource", () { |
| 3946 unittest.test("to-json--from-json", () { | 3975 unittest.test("to-json--from-json", () { |
| 3947 var o = buildCustomDataSource(); | 3976 var o = buildCustomDataSource(); |
| 3948 var od = new api.CustomDataSource.fromJson(o.toJson()); | 3977 var od = new api.CustomDataSource.fromJson(o.toJson()); |
| 3949 checkCustomDataSource(od); | 3978 checkCustomDataSource(od); |
| 3950 }); | 3979 }); |
| 3951 }); | 3980 }); |
| 3952 | 3981 |
| 3953 | |
| 3954 unittest.group("obj-schema-CustomDataSources", () { | 3982 unittest.group("obj-schema-CustomDataSources", () { |
| 3955 unittest.test("to-json--from-json", () { | 3983 unittest.test("to-json--from-json", () { |
| 3956 var o = buildCustomDataSources(); | 3984 var o = buildCustomDataSources(); |
| 3957 var od = new api.CustomDataSources.fromJson(o.toJson()); | 3985 var od = new api.CustomDataSources.fromJson(o.toJson()); |
| 3958 checkCustomDataSources(od); | 3986 checkCustomDataSources(od); |
| 3959 }); | 3987 }); |
| 3960 }); | 3988 }); |
| 3961 | 3989 |
| 3962 | |
| 3963 unittest.group("obj-schema-CustomDimensionParentLink", () { | 3990 unittest.group("obj-schema-CustomDimensionParentLink", () { |
| 3964 unittest.test("to-json--from-json", () { | 3991 unittest.test("to-json--from-json", () { |
| 3965 var o = buildCustomDimensionParentLink(); | 3992 var o = buildCustomDimensionParentLink(); |
| 3966 var od = new api.CustomDimensionParentLink.fromJson(o.toJson()); | 3993 var od = new api.CustomDimensionParentLink.fromJson(o.toJson()); |
| 3967 checkCustomDimensionParentLink(od); | 3994 checkCustomDimensionParentLink(od); |
| 3968 }); | 3995 }); |
| 3969 }); | 3996 }); |
| 3970 | 3997 |
| 3971 | |
| 3972 unittest.group("obj-schema-CustomDimension", () { | 3998 unittest.group("obj-schema-CustomDimension", () { |
| 3973 unittest.test("to-json--from-json", () { | 3999 unittest.test("to-json--from-json", () { |
| 3974 var o = buildCustomDimension(); | 4000 var o = buildCustomDimension(); |
| 3975 var od = new api.CustomDimension.fromJson(o.toJson()); | 4001 var od = new api.CustomDimension.fromJson(o.toJson()); |
| 3976 checkCustomDimension(od); | 4002 checkCustomDimension(od); |
| 3977 }); | 4003 }); |
| 3978 }); | 4004 }); |
| 3979 | 4005 |
| 3980 | |
| 3981 unittest.group("obj-schema-CustomDimensions", () { | 4006 unittest.group("obj-schema-CustomDimensions", () { |
| 3982 unittest.test("to-json--from-json", () { | 4007 unittest.test("to-json--from-json", () { |
| 3983 var o = buildCustomDimensions(); | 4008 var o = buildCustomDimensions(); |
| 3984 var od = new api.CustomDimensions.fromJson(o.toJson()); | 4009 var od = new api.CustomDimensions.fromJson(o.toJson()); |
| 3985 checkCustomDimensions(od); | 4010 checkCustomDimensions(od); |
| 3986 }); | 4011 }); |
| 3987 }); | 4012 }); |
| 3988 | 4013 |
| 3989 | |
| 3990 unittest.group("obj-schema-CustomMetricParentLink", () { | 4014 unittest.group("obj-schema-CustomMetricParentLink", () { |
| 3991 unittest.test("to-json--from-json", () { | 4015 unittest.test("to-json--from-json", () { |
| 3992 var o = buildCustomMetricParentLink(); | 4016 var o = buildCustomMetricParentLink(); |
| 3993 var od = new api.CustomMetricParentLink.fromJson(o.toJson()); | 4017 var od = new api.CustomMetricParentLink.fromJson(o.toJson()); |
| 3994 checkCustomMetricParentLink(od); | 4018 checkCustomMetricParentLink(od); |
| 3995 }); | 4019 }); |
| 3996 }); | 4020 }); |
| 3997 | 4021 |
| 3998 | |
| 3999 unittest.group("obj-schema-CustomMetric", () { | 4022 unittest.group("obj-schema-CustomMetric", () { |
| 4000 unittest.test("to-json--from-json", () { | 4023 unittest.test("to-json--from-json", () { |
| 4001 var o = buildCustomMetric(); | 4024 var o = buildCustomMetric(); |
| 4002 var od = new api.CustomMetric.fromJson(o.toJson()); | 4025 var od = new api.CustomMetric.fromJson(o.toJson()); |
| 4003 checkCustomMetric(od); | 4026 checkCustomMetric(od); |
| 4004 }); | 4027 }); |
| 4005 }); | 4028 }); |
| 4006 | 4029 |
| 4007 | |
| 4008 unittest.group("obj-schema-CustomMetrics", () { | 4030 unittest.group("obj-schema-CustomMetrics", () { |
| 4009 unittest.test("to-json--from-json", () { | 4031 unittest.test("to-json--from-json", () { |
| 4010 var o = buildCustomMetrics(); | 4032 var o = buildCustomMetrics(); |
| 4011 var od = new api.CustomMetrics.fromJson(o.toJson()); | 4033 var od = new api.CustomMetrics.fromJson(o.toJson()); |
| 4012 checkCustomMetrics(od); | 4034 checkCustomMetrics(od); |
| 4013 }); | 4035 }); |
| 4014 }); | 4036 }); |
| 4015 | 4037 |
| 4016 | |
| 4017 unittest.group("obj-schema-EntityAdWordsLinkEntity", () { | 4038 unittest.group("obj-schema-EntityAdWordsLinkEntity", () { |
| 4018 unittest.test("to-json--from-json", () { | 4039 unittest.test("to-json--from-json", () { |
| 4019 var o = buildEntityAdWordsLinkEntity(); | 4040 var o = buildEntityAdWordsLinkEntity(); |
| 4020 var od = new api.EntityAdWordsLinkEntity.fromJson(o.toJson()); | 4041 var od = new api.EntityAdWordsLinkEntity.fromJson(o.toJson()); |
| 4021 checkEntityAdWordsLinkEntity(od); | 4042 checkEntityAdWordsLinkEntity(od); |
| 4022 }); | 4043 }); |
| 4023 }); | 4044 }); |
| 4024 | 4045 |
| 4025 | |
| 4026 unittest.group("obj-schema-EntityAdWordsLink", () { | 4046 unittest.group("obj-schema-EntityAdWordsLink", () { |
| 4027 unittest.test("to-json--from-json", () { | 4047 unittest.test("to-json--from-json", () { |
| 4028 var o = buildEntityAdWordsLink(); | 4048 var o = buildEntityAdWordsLink(); |
| 4029 var od = new api.EntityAdWordsLink.fromJson(o.toJson()); | 4049 var od = new api.EntityAdWordsLink.fromJson(o.toJson()); |
| 4030 checkEntityAdWordsLink(od); | 4050 checkEntityAdWordsLink(od); |
| 4031 }); | 4051 }); |
| 4032 }); | 4052 }); |
| 4033 | 4053 |
| 4034 | |
| 4035 unittest.group("obj-schema-EntityAdWordsLinks", () { | 4054 unittest.group("obj-schema-EntityAdWordsLinks", () { |
| 4036 unittest.test("to-json--from-json", () { | 4055 unittest.test("to-json--from-json", () { |
| 4037 var o = buildEntityAdWordsLinks(); | 4056 var o = buildEntityAdWordsLinks(); |
| 4038 var od = new api.EntityAdWordsLinks.fromJson(o.toJson()); | 4057 var od = new api.EntityAdWordsLinks.fromJson(o.toJson()); |
| 4039 checkEntityAdWordsLinks(od); | 4058 checkEntityAdWordsLinks(od); |
| 4040 }); | 4059 }); |
| 4041 }); | 4060 }); |
| 4042 | 4061 |
| 4043 | |
| 4044 unittest.group("obj-schema-EntityUserLinkEntity", () { | 4062 unittest.group("obj-schema-EntityUserLinkEntity", () { |
| 4045 unittest.test("to-json--from-json", () { | 4063 unittest.test("to-json--from-json", () { |
| 4046 var o = buildEntityUserLinkEntity(); | 4064 var o = buildEntityUserLinkEntity(); |
| 4047 var od = new api.EntityUserLinkEntity.fromJson(o.toJson()); | 4065 var od = new api.EntityUserLinkEntity.fromJson(o.toJson()); |
| 4048 checkEntityUserLinkEntity(od); | 4066 checkEntityUserLinkEntity(od); |
| 4049 }); | 4067 }); |
| 4050 }); | 4068 }); |
| 4051 | 4069 |
| 4052 | |
| 4053 unittest.group("obj-schema-EntityUserLinkPermissions", () { | 4070 unittest.group("obj-schema-EntityUserLinkPermissions", () { |
| 4054 unittest.test("to-json--from-json", () { | 4071 unittest.test("to-json--from-json", () { |
| 4055 var o = buildEntityUserLinkPermissions(); | 4072 var o = buildEntityUserLinkPermissions(); |
| 4056 var od = new api.EntityUserLinkPermissions.fromJson(o.toJson()); | 4073 var od = new api.EntityUserLinkPermissions.fromJson(o.toJson()); |
| 4057 checkEntityUserLinkPermissions(od); | 4074 checkEntityUserLinkPermissions(od); |
| 4058 }); | 4075 }); |
| 4059 }); | 4076 }); |
| 4060 | 4077 |
| 4061 | |
| 4062 unittest.group("obj-schema-EntityUserLink", () { | 4078 unittest.group("obj-schema-EntityUserLink", () { |
| 4063 unittest.test("to-json--from-json", () { | 4079 unittest.test("to-json--from-json", () { |
| 4064 var o = buildEntityUserLink(); | 4080 var o = buildEntityUserLink(); |
| 4065 var od = new api.EntityUserLink.fromJson(o.toJson()); | 4081 var od = new api.EntityUserLink.fromJson(o.toJson()); |
| 4066 checkEntityUserLink(od); | 4082 checkEntityUserLink(od); |
| 4067 }); | 4083 }); |
| 4068 }); | 4084 }); |
| 4069 | 4085 |
| 4070 | |
| 4071 unittest.group("obj-schema-EntityUserLinks", () { | 4086 unittest.group("obj-schema-EntityUserLinks", () { |
| 4072 unittest.test("to-json--from-json", () { | 4087 unittest.test("to-json--from-json", () { |
| 4073 var o = buildEntityUserLinks(); | 4088 var o = buildEntityUserLinks(); |
| 4074 var od = new api.EntityUserLinks.fromJson(o.toJson()); | 4089 var od = new api.EntityUserLinks.fromJson(o.toJson()); |
| 4075 checkEntityUserLinks(od); | 4090 checkEntityUserLinks(od); |
| 4076 }); | 4091 }); |
| 4077 }); | 4092 }); |
| 4078 | 4093 |
| 4079 | |
| 4080 unittest.group("obj-schema-ExperimentParentLink", () { | 4094 unittest.group("obj-schema-ExperimentParentLink", () { |
| 4081 unittest.test("to-json--from-json", () { | 4095 unittest.test("to-json--from-json", () { |
| 4082 var o = buildExperimentParentLink(); | 4096 var o = buildExperimentParentLink(); |
| 4083 var od = new api.ExperimentParentLink.fromJson(o.toJson()); | 4097 var od = new api.ExperimentParentLink.fromJson(o.toJson()); |
| 4084 checkExperimentParentLink(od); | 4098 checkExperimentParentLink(od); |
| 4085 }); | 4099 }); |
| 4086 }); | 4100 }); |
| 4087 | 4101 |
| 4088 | |
| 4089 unittest.group("obj-schema-ExperimentVariations", () { | 4102 unittest.group("obj-schema-ExperimentVariations", () { |
| 4090 unittest.test("to-json--from-json", () { | 4103 unittest.test("to-json--from-json", () { |
| 4091 var o = buildExperimentVariations(); | 4104 var o = buildExperimentVariations(); |
| 4092 var od = new api.ExperimentVariations.fromJson(o.toJson()); | 4105 var od = new api.ExperimentVariations.fromJson(o.toJson()); |
| 4093 checkExperimentVariations(od); | 4106 checkExperimentVariations(od); |
| 4094 }); | 4107 }); |
| 4095 }); | 4108 }); |
| 4096 | 4109 |
| 4097 | |
| 4098 unittest.group("obj-schema-Experiment", () { | 4110 unittest.group("obj-schema-Experiment", () { |
| 4099 unittest.test("to-json--from-json", () { | 4111 unittest.test("to-json--from-json", () { |
| 4100 var o = buildExperiment(); | 4112 var o = buildExperiment(); |
| 4101 var od = new api.Experiment.fromJson(o.toJson()); | 4113 var od = new api.Experiment.fromJson(o.toJson()); |
| 4102 checkExperiment(od); | 4114 checkExperiment(od); |
| 4103 }); | 4115 }); |
| 4104 }); | 4116 }); |
| 4105 | 4117 |
| 4106 | |
| 4107 unittest.group("obj-schema-Experiments", () { | 4118 unittest.group("obj-schema-Experiments", () { |
| 4108 unittest.test("to-json--from-json", () { | 4119 unittest.test("to-json--from-json", () { |
| 4109 var o = buildExperiments(); | 4120 var o = buildExperiments(); |
| 4110 var od = new api.Experiments.fromJson(o.toJson()); | 4121 var od = new api.Experiments.fromJson(o.toJson()); |
| 4111 checkExperiments(od); | 4122 checkExperiments(od); |
| 4112 }); | 4123 }); |
| 4113 }); | 4124 }); |
| 4114 | 4125 |
| 4115 | |
| 4116 unittest.group("obj-schema-FilterAdvancedDetails", () { | 4126 unittest.group("obj-schema-FilterAdvancedDetails", () { |
| 4117 unittest.test("to-json--from-json", () { | 4127 unittest.test("to-json--from-json", () { |
| 4118 var o = buildFilterAdvancedDetails(); | 4128 var o = buildFilterAdvancedDetails(); |
| 4119 var od = new api.FilterAdvancedDetails.fromJson(o.toJson()); | 4129 var od = new api.FilterAdvancedDetails.fromJson(o.toJson()); |
| 4120 checkFilterAdvancedDetails(od); | 4130 checkFilterAdvancedDetails(od); |
| 4121 }); | 4131 }); |
| 4122 }); | 4132 }); |
| 4123 | 4133 |
| 4124 | |
| 4125 unittest.group("obj-schema-FilterLowercaseDetails", () { | 4134 unittest.group("obj-schema-FilterLowercaseDetails", () { |
| 4126 unittest.test("to-json--from-json", () { | 4135 unittest.test("to-json--from-json", () { |
| 4127 var o = buildFilterLowercaseDetails(); | 4136 var o = buildFilterLowercaseDetails(); |
| 4128 var od = new api.FilterLowercaseDetails.fromJson(o.toJson()); | 4137 var od = new api.FilterLowercaseDetails.fromJson(o.toJson()); |
| 4129 checkFilterLowercaseDetails(od); | 4138 checkFilterLowercaseDetails(od); |
| 4130 }); | 4139 }); |
| 4131 }); | 4140 }); |
| 4132 | 4141 |
| 4133 | |
| 4134 unittest.group("obj-schema-FilterParentLink", () { | 4142 unittest.group("obj-schema-FilterParentLink", () { |
| 4135 unittest.test("to-json--from-json", () { | 4143 unittest.test("to-json--from-json", () { |
| 4136 var o = buildFilterParentLink(); | 4144 var o = buildFilterParentLink(); |
| 4137 var od = new api.FilterParentLink.fromJson(o.toJson()); | 4145 var od = new api.FilterParentLink.fromJson(o.toJson()); |
| 4138 checkFilterParentLink(od); | 4146 checkFilterParentLink(od); |
| 4139 }); | 4147 }); |
| 4140 }); | 4148 }); |
| 4141 | 4149 |
| 4142 | |
| 4143 unittest.group("obj-schema-FilterSearchAndReplaceDetails", () { | 4150 unittest.group("obj-schema-FilterSearchAndReplaceDetails", () { |
| 4144 unittest.test("to-json--from-json", () { | 4151 unittest.test("to-json--from-json", () { |
| 4145 var o = buildFilterSearchAndReplaceDetails(); | 4152 var o = buildFilterSearchAndReplaceDetails(); |
| 4146 var od = new api.FilterSearchAndReplaceDetails.fromJson(o.toJson()); | 4153 var od = new api.FilterSearchAndReplaceDetails.fromJson(o.toJson()); |
| 4147 checkFilterSearchAndReplaceDetails(od); | 4154 checkFilterSearchAndReplaceDetails(od); |
| 4148 }); | 4155 }); |
| 4149 }); | 4156 }); |
| 4150 | 4157 |
| 4151 | |
| 4152 unittest.group("obj-schema-FilterUppercaseDetails", () { | 4158 unittest.group("obj-schema-FilterUppercaseDetails", () { |
| 4153 unittest.test("to-json--from-json", () { | 4159 unittest.test("to-json--from-json", () { |
| 4154 var o = buildFilterUppercaseDetails(); | 4160 var o = buildFilterUppercaseDetails(); |
| 4155 var od = new api.FilterUppercaseDetails.fromJson(o.toJson()); | 4161 var od = new api.FilterUppercaseDetails.fromJson(o.toJson()); |
| 4156 checkFilterUppercaseDetails(od); | 4162 checkFilterUppercaseDetails(od); |
| 4157 }); | 4163 }); |
| 4158 }); | 4164 }); |
| 4159 | 4165 |
| 4160 | |
| 4161 unittest.group("obj-schema-Filter", () { | 4166 unittest.group("obj-schema-Filter", () { |
| 4162 unittest.test("to-json--from-json", () { | 4167 unittest.test("to-json--from-json", () { |
| 4163 var o = buildFilter(); | 4168 var o = buildFilter(); |
| 4164 var od = new api.Filter.fromJson(o.toJson()); | 4169 var od = new api.Filter.fromJson(o.toJson()); |
| 4165 checkFilter(od); | 4170 checkFilter(od); |
| 4166 }); | 4171 }); |
| 4167 }); | 4172 }); |
| 4168 | 4173 |
| 4169 | |
| 4170 unittest.group("obj-schema-FilterExpression", () { | 4174 unittest.group("obj-schema-FilterExpression", () { |
| 4171 unittest.test("to-json--from-json", () { | 4175 unittest.test("to-json--from-json", () { |
| 4172 var o = buildFilterExpression(); | 4176 var o = buildFilterExpression(); |
| 4173 var od = new api.FilterExpression.fromJson(o.toJson()); | 4177 var od = new api.FilterExpression.fromJson(o.toJson()); |
| 4174 checkFilterExpression(od); | 4178 checkFilterExpression(od); |
| 4175 }); | 4179 }); |
| 4176 }); | 4180 }); |
| 4177 | 4181 |
| 4178 | |
| 4179 unittest.group("obj-schema-FilterRef", () { | 4182 unittest.group("obj-schema-FilterRef", () { |
| 4180 unittest.test("to-json--from-json", () { | 4183 unittest.test("to-json--from-json", () { |
| 4181 var o = buildFilterRef(); | 4184 var o = buildFilterRef(); |
| 4182 var od = new api.FilterRef.fromJson(o.toJson()); | 4185 var od = new api.FilterRef.fromJson(o.toJson()); |
| 4183 checkFilterRef(od); | 4186 checkFilterRef(od); |
| 4184 }); | 4187 }); |
| 4185 }); | 4188 }); |
| 4186 | 4189 |
| 4187 | |
| 4188 unittest.group("obj-schema-Filters", () { | 4190 unittest.group("obj-schema-Filters", () { |
| 4189 unittest.test("to-json--from-json", () { | 4191 unittest.test("to-json--from-json", () { |
| 4190 var o = buildFilters(); | 4192 var o = buildFilters(); |
| 4191 var od = new api.Filters.fromJson(o.toJson()); | 4193 var od = new api.Filters.fromJson(o.toJson()); |
| 4192 checkFilters(od); | 4194 checkFilters(od); |
| 4193 }); | 4195 }); |
| 4194 }); | 4196 }); |
| 4195 | 4197 |
| 4196 | |
| 4197 unittest.group("obj-schema-GaDataColumnHeaders", () { | 4198 unittest.group("obj-schema-GaDataColumnHeaders", () { |
| 4198 unittest.test("to-json--from-json", () { | 4199 unittest.test("to-json--from-json", () { |
| 4199 var o = buildGaDataColumnHeaders(); | 4200 var o = buildGaDataColumnHeaders(); |
| 4200 var od = new api.GaDataColumnHeaders.fromJson(o.toJson()); | 4201 var od = new api.GaDataColumnHeaders.fromJson(o.toJson()); |
| 4201 checkGaDataColumnHeaders(od); | 4202 checkGaDataColumnHeaders(od); |
| 4202 }); | 4203 }); |
| 4203 }); | 4204 }); |
| 4204 | 4205 |
| 4205 | |
| 4206 unittest.group("obj-schema-GaDataDataTableCols", () { | 4206 unittest.group("obj-schema-GaDataDataTableCols", () { |
| 4207 unittest.test("to-json--from-json", () { | 4207 unittest.test("to-json--from-json", () { |
| 4208 var o = buildGaDataDataTableCols(); | 4208 var o = buildGaDataDataTableCols(); |
| 4209 var od = new api.GaDataDataTableCols.fromJson(o.toJson()); | 4209 var od = new api.GaDataDataTableCols.fromJson(o.toJson()); |
| 4210 checkGaDataDataTableCols(od); | 4210 checkGaDataDataTableCols(od); |
| 4211 }); | 4211 }); |
| 4212 }); | 4212 }); |
| 4213 | 4213 |
| 4214 | |
| 4215 unittest.group("obj-schema-GaDataDataTableRowsC", () { | 4214 unittest.group("obj-schema-GaDataDataTableRowsC", () { |
| 4216 unittest.test("to-json--from-json", () { | 4215 unittest.test("to-json--from-json", () { |
| 4217 var o = buildGaDataDataTableRowsC(); | 4216 var o = buildGaDataDataTableRowsC(); |
| 4218 var od = new api.GaDataDataTableRowsC.fromJson(o.toJson()); | 4217 var od = new api.GaDataDataTableRowsC.fromJson(o.toJson()); |
| 4219 checkGaDataDataTableRowsC(od); | 4218 checkGaDataDataTableRowsC(od); |
| 4220 }); | 4219 }); |
| 4221 }); | 4220 }); |
| 4222 | 4221 |
| 4223 | |
| 4224 unittest.group("obj-schema-GaDataDataTableRows", () { | 4222 unittest.group("obj-schema-GaDataDataTableRows", () { |
| 4225 unittest.test("to-json--from-json", () { | 4223 unittest.test("to-json--from-json", () { |
| 4226 var o = buildGaDataDataTableRows(); | 4224 var o = buildGaDataDataTableRows(); |
| 4227 var od = new api.GaDataDataTableRows.fromJson(o.toJson()); | 4225 var od = new api.GaDataDataTableRows.fromJson(o.toJson()); |
| 4228 checkGaDataDataTableRows(od); | 4226 checkGaDataDataTableRows(od); |
| 4229 }); | 4227 }); |
| 4230 }); | 4228 }); |
| 4231 | 4229 |
| 4232 | |
| 4233 unittest.group("obj-schema-GaDataDataTable", () { | 4230 unittest.group("obj-schema-GaDataDataTable", () { |
| 4234 unittest.test("to-json--from-json", () { | 4231 unittest.test("to-json--from-json", () { |
| 4235 var o = buildGaDataDataTable(); | 4232 var o = buildGaDataDataTable(); |
| 4236 var od = new api.GaDataDataTable.fromJson(o.toJson()); | 4233 var od = new api.GaDataDataTable.fromJson(o.toJson()); |
| 4237 checkGaDataDataTable(od); | 4234 checkGaDataDataTable(od); |
| 4238 }); | 4235 }); |
| 4239 }); | 4236 }); |
| 4240 | 4237 |
| 4241 | |
| 4242 unittest.group("obj-schema-GaDataProfileInfo", () { | 4238 unittest.group("obj-schema-GaDataProfileInfo", () { |
| 4243 unittest.test("to-json--from-json", () { | 4239 unittest.test("to-json--from-json", () { |
| 4244 var o = buildGaDataProfileInfo(); | 4240 var o = buildGaDataProfileInfo(); |
| 4245 var od = new api.GaDataProfileInfo.fromJson(o.toJson()); | 4241 var od = new api.GaDataProfileInfo.fromJson(o.toJson()); |
| 4246 checkGaDataProfileInfo(od); | 4242 checkGaDataProfileInfo(od); |
| 4247 }); | 4243 }); |
| 4248 }); | 4244 }); |
| 4249 | 4245 |
| 4250 | |
| 4251 unittest.group("obj-schema-GaDataQuery", () { | 4246 unittest.group("obj-schema-GaDataQuery", () { |
| 4252 unittest.test("to-json--from-json", () { | 4247 unittest.test("to-json--from-json", () { |
| 4253 var o = buildGaDataQuery(); | 4248 var o = buildGaDataQuery(); |
| 4254 var od = new api.GaDataQuery.fromJson(o.toJson()); | 4249 var od = new api.GaDataQuery.fromJson(o.toJson()); |
| 4255 checkGaDataQuery(od); | 4250 checkGaDataQuery(od); |
| 4256 }); | 4251 }); |
| 4257 }); | 4252 }); |
| 4258 | 4253 |
| 4259 | |
| 4260 unittest.group("obj-schema-GaData", () { | 4254 unittest.group("obj-schema-GaData", () { |
| 4261 unittest.test("to-json--from-json", () { | 4255 unittest.test("to-json--from-json", () { |
| 4262 var o = buildGaData(); | 4256 var o = buildGaData(); |
| 4263 var od = new api.GaData.fromJson(o.toJson()); | 4257 var od = new api.GaData.fromJson(o.toJson()); |
| 4264 checkGaData(od); | 4258 checkGaData(od); |
| 4265 }); | 4259 }); |
| 4266 }); | 4260 }); |
| 4267 | 4261 |
| 4268 | |
| 4269 unittest.group("obj-schema-GoalEventDetailsEventConditions", () { | 4262 unittest.group("obj-schema-GoalEventDetailsEventConditions", () { |
| 4270 unittest.test("to-json--from-json", () { | 4263 unittest.test("to-json--from-json", () { |
| 4271 var o = buildGoalEventDetailsEventConditions(); | 4264 var o = buildGoalEventDetailsEventConditions(); |
| 4272 var od = new api.GoalEventDetailsEventConditions.fromJson(o.toJson()); | 4265 var od = new api.GoalEventDetailsEventConditions.fromJson(o.toJson()); |
| 4273 checkGoalEventDetailsEventConditions(od); | 4266 checkGoalEventDetailsEventConditions(od); |
| 4274 }); | 4267 }); |
| 4275 }); | 4268 }); |
| 4276 | 4269 |
| 4277 | |
| 4278 unittest.group("obj-schema-GoalEventDetails", () { | 4270 unittest.group("obj-schema-GoalEventDetails", () { |
| 4279 unittest.test("to-json--from-json", () { | 4271 unittest.test("to-json--from-json", () { |
| 4280 var o = buildGoalEventDetails(); | 4272 var o = buildGoalEventDetails(); |
| 4281 var od = new api.GoalEventDetails.fromJson(o.toJson()); | 4273 var od = new api.GoalEventDetails.fromJson(o.toJson()); |
| 4282 checkGoalEventDetails(od); | 4274 checkGoalEventDetails(od); |
| 4283 }); | 4275 }); |
| 4284 }); | 4276 }); |
| 4285 | 4277 |
| 4286 | |
| 4287 unittest.group("obj-schema-GoalParentLink", () { | 4278 unittest.group("obj-schema-GoalParentLink", () { |
| 4288 unittest.test("to-json--from-json", () { | 4279 unittest.test("to-json--from-json", () { |
| 4289 var o = buildGoalParentLink(); | 4280 var o = buildGoalParentLink(); |
| 4290 var od = new api.GoalParentLink.fromJson(o.toJson()); | 4281 var od = new api.GoalParentLink.fromJson(o.toJson()); |
| 4291 checkGoalParentLink(od); | 4282 checkGoalParentLink(od); |
| 4292 }); | 4283 }); |
| 4293 }); | 4284 }); |
| 4294 | 4285 |
| 4295 | |
| 4296 unittest.group("obj-schema-GoalUrlDestinationDetailsSteps", () { | 4286 unittest.group("obj-schema-GoalUrlDestinationDetailsSteps", () { |
| 4297 unittest.test("to-json--from-json", () { | 4287 unittest.test("to-json--from-json", () { |
| 4298 var o = buildGoalUrlDestinationDetailsSteps(); | 4288 var o = buildGoalUrlDestinationDetailsSteps(); |
| 4299 var od = new api.GoalUrlDestinationDetailsSteps.fromJson(o.toJson()); | 4289 var od = new api.GoalUrlDestinationDetailsSteps.fromJson(o.toJson()); |
| 4300 checkGoalUrlDestinationDetailsSteps(od); | 4290 checkGoalUrlDestinationDetailsSteps(od); |
| 4301 }); | 4291 }); |
| 4302 }); | 4292 }); |
| 4303 | 4293 |
| 4304 | |
| 4305 unittest.group("obj-schema-GoalUrlDestinationDetails", () { | 4294 unittest.group("obj-schema-GoalUrlDestinationDetails", () { |
| 4306 unittest.test("to-json--from-json", () { | 4295 unittest.test("to-json--from-json", () { |
| 4307 var o = buildGoalUrlDestinationDetails(); | 4296 var o = buildGoalUrlDestinationDetails(); |
| 4308 var od = new api.GoalUrlDestinationDetails.fromJson(o.toJson()); | 4297 var od = new api.GoalUrlDestinationDetails.fromJson(o.toJson()); |
| 4309 checkGoalUrlDestinationDetails(od); | 4298 checkGoalUrlDestinationDetails(od); |
| 4310 }); | 4299 }); |
| 4311 }); | 4300 }); |
| 4312 | 4301 |
| 4313 | |
| 4314 unittest.group("obj-schema-GoalVisitNumPagesDetails", () { | 4302 unittest.group("obj-schema-GoalVisitNumPagesDetails", () { |
| 4315 unittest.test("to-json--from-json", () { | 4303 unittest.test("to-json--from-json", () { |
| 4316 var o = buildGoalVisitNumPagesDetails(); | 4304 var o = buildGoalVisitNumPagesDetails(); |
| 4317 var od = new api.GoalVisitNumPagesDetails.fromJson(o.toJson()); | 4305 var od = new api.GoalVisitNumPagesDetails.fromJson(o.toJson()); |
| 4318 checkGoalVisitNumPagesDetails(od); | 4306 checkGoalVisitNumPagesDetails(od); |
| 4319 }); | 4307 }); |
| 4320 }); | 4308 }); |
| 4321 | 4309 |
| 4322 | |
| 4323 unittest.group("obj-schema-GoalVisitTimeOnSiteDetails", () { | 4310 unittest.group("obj-schema-GoalVisitTimeOnSiteDetails", () { |
| 4324 unittest.test("to-json--from-json", () { | 4311 unittest.test("to-json--from-json", () { |
| 4325 var o = buildGoalVisitTimeOnSiteDetails(); | 4312 var o = buildGoalVisitTimeOnSiteDetails(); |
| 4326 var od = new api.GoalVisitTimeOnSiteDetails.fromJson(o.toJson()); | 4313 var od = new api.GoalVisitTimeOnSiteDetails.fromJson(o.toJson()); |
| 4327 checkGoalVisitTimeOnSiteDetails(od); | 4314 checkGoalVisitTimeOnSiteDetails(od); |
| 4328 }); | 4315 }); |
| 4329 }); | 4316 }); |
| 4330 | 4317 |
| 4331 | |
| 4332 unittest.group("obj-schema-Goal", () { | 4318 unittest.group("obj-schema-Goal", () { |
| 4333 unittest.test("to-json--from-json", () { | 4319 unittest.test("to-json--from-json", () { |
| 4334 var o = buildGoal(); | 4320 var o = buildGoal(); |
| 4335 var od = new api.Goal.fromJson(o.toJson()); | 4321 var od = new api.Goal.fromJson(o.toJson()); |
| 4336 checkGoal(od); | 4322 checkGoal(od); |
| 4337 }); | 4323 }); |
| 4338 }); | 4324 }); |
| 4339 | 4325 |
| 4340 | |
| 4341 unittest.group("obj-schema-Goals", () { | 4326 unittest.group("obj-schema-Goals", () { |
| 4342 unittest.test("to-json--from-json", () { | 4327 unittest.test("to-json--from-json", () { |
| 4343 var o = buildGoals(); | 4328 var o = buildGoals(); |
| 4344 var od = new api.Goals.fromJson(o.toJson()); | 4329 var od = new api.Goals.fromJson(o.toJson()); |
| 4345 checkGoals(od); | 4330 checkGoals(od); |
| 4346 }); | 4331 }); |
| 4347 }); | 4332 }); |
| 4348 | 4333 |
| 4349 | |
| 4350 unittest.group("obj-schema-IncludeConditions", () { | 4334 unittest.group("obj-schema-IncludeConditions", () { |
| 4351 unittest.test("to-json--from-json", () { | 4335 unittest.test("to-json--from-json", () { |
| 4352 var o = buildIncludeConditions(); | 4336 var o = buildIncludeConditions(); |
| 4353 var od = new api.IncludeConditions.fromJson(o.toJson()); | 4337 var od = new api.IncludeConditions.fromJson(o.toJson()); |
| 4354 checkIncludeConditions(od); | 4338 checkIncludeConditions(od); |
| 4355 }); | 4339 }); |
| 4356 }); | 4340 }); |
| 4357 | 4341 |
| 4358 | |
| 4359 unittest.group("obj-schema-LinkedForeignAccount", () { | 4342 unittest.group("obj-schema-LinkedForeignAccount", () { |
| 4360 unittest.test("to-json--from-json", () { | 4343 unittest.test("to-json--from-json", () { |
| 4361 var o = buildLinkedForeignAccount(); | 4344 var o = buildLinkedForeignAccount(); |
| 4362 var od = new api.LinkedForeignAccount.fromJson(o.toJson()); | 4345 var od = new api.LinkedForeignAccount.fromJson(o.toJson()); |
| 4363 checkLinkedForeignAccount(od); | 4346 checkLinkedForeignAccount(od); |
| 4364 }); | 4347 }); |
| 4365 }); | 4348 }); |
| 4366 | 4349 |
| 4367 | |
| 4368 unittest.group("obj-schema-McfDataColumnHeaders", () { | 4350 unittest.group("obj-schema-McfDataColumnHeaders", () { |
| 4369 unittest.test("to-json--from-json", () { | 4351 unittest.test("to-json--from-json", () { |
| 4370 var o = buildMcfDataColumnHeaders(); | 4352 var o = buildMcfDataColumnHeaders(); |
| 4371 var od = new api.McfDataColumnHeaders.fromJson(o.toJson()); | 4353 var od = new api.McfDataColumnHeaders.fromJson(o.toJson()); |
| 4372 checkMcfDataColumnHeaders(od); | 4354 checkMcfDataColumnHeaders(od); |
| 4373 }); | 4355 }); |
| 4374 }); | 4356 }); |
| 4375 | 4357 |
| 4376 | |
| 4377 unittest.group("obj-schema-McfDataProfileInfo", () { | 4358 unittest.group("obj-schema-McfDataProfileInfo", () { |
| 4378 unittest.test("to-json--from-json", () { | 4359 unittest.test("to-json--from-json", () { |
| 4379 var o = buildMcfDataProfileInfo(); | 4360 var o = buildMcfDataProfileInfo(); |
| 4380 var od = new api.McfDataProfileInfo.fromJson(o.toJson()); | 4361 var od = new api.McfDataProfileInfo.fromJson(o.toJson()); |
| 4381 checkMcfDataProfileInfo(od); | 4362 checkMcfDataProfileInfo(od); |
| 4382 }); | 4363 }); |
| 4383 }); | 4364 }); |
| 4384 | 4365 |
| 4385 | |
| 4386 unittest.group("obj-schema-McfDataQuery", () { | 4366 unittest.group("obj-schema-McfDataQuery", () { |
| 4387 unittest.test("to-json--from-json", () { | 4367 unittest.test("to-json--from-json", () { |
| 4388 var o = buildMcfDataQuery(); | 4368 var o = buildMcfDataQuery(); |
| 4389 var od = new api.McfDataQuery.fromJson(o.toJson()); | 4369 var od = new api.McfDataQuery.fromJson(o.toJson()); |
| 4390 checkMcfDataQuery(od); | 4370 checkMcfDataQuery(od); |
| 4391 }); | 4371 }); |
| 4392 }); | 4372 }); |
| 4393 | 4373 |
| 4394 | |
| 4395 unittest.group("obj-schema-McfDataRowsConversionPathValue", () { | 4374 unittest.group("obj-schema-McfDataRowsConversionPathValue", () { |
| 4396 unittest.test("to-json--from-json", () { | 4375 unittest.test("to-json--from-json", () { |
| 4397 var o = buildMcfDataRowsConversionPathValue(); | 4376 var o = buildMcfDataRowsConversionPathValue(); |
| 4398 var od = new api.McfDataRowsConversionPathValue.fromJson(o.toJson()); | 4377 var od = new api.McfDataRowsConversionPathValue.fromJson(o.toJson()); |
| 4399 checkMcfDataRowsConversionPathValue(od); | 4378 checkMcfDataRowsConversionPathValue(od); |
| 4400 }); | 4379 }); |
| 4401 }); | 4380 }); |
| 4402 | 4381 |
| 4403 | |
| 4404 unittest.group("obj-schema-McfDataRows", () { | 4382 unittest.group("obj-schema-McfDataRows", () { |
| 4405 unittest.test("to-json--from-json", () { | 4383 unittest.test("to-json--from-json", () { |
| 4406 var o = buildMcfDataRows(); | 4384 var o = buildMcfDataRows(); |
| 4407 var od = new api.McfDataRows.fromJson(o.toJson()); | 4385 var od = new api.McfDataRows.fromJson(o.toJson()); |
| 4408 checkMcfDataRows(od); | 4386 checkMcfDataRows(od); |
| 4409 }); | 4387 }); |
| 4410 }); | 4388 }); |
| 4411 | 4389 |
| 4412 | |
| 4413 unittest.group("obj-schema-McfData", () { | 4390 unittest.group("obj-schema-McfData", () { |
| 4414 unittest.test("to-json--from-json", () { | 4391 unittest.test("to-json--from-json", () { |
| 4415 var o = buildMcfData(); | 4392 var o = buildMcfData(); |
| 4416 var od = new api.McfData.fromJson(o.toJson()); | 4393 var od = new api.McfData.fromJson(o.toJson()); |
| 4417 checkMcfData(od); | 4394 checkMcfData(od); |
| 4418 }); | 4395 }); |
| 4419 }); | 4396 }); |
| 4420 | 4397 |
| 4421 | |
| 4422 unittest.group("obj-schema-ProfileChildLink", () { | 4398 unittest.group("obj-schema-ProfileChildLink", () { |
| 4423 unittest.test("to-json--from-json", () { | 4399 unittest.test("to-json--from-json", () { |
| 4424 var o = buildProfileChildLink(); | 4400 var o = buildProfileChildLink(); |
| 4425 var od = new api.ProfileChildLink.fromJson(o.toJson()); | 4401 var od = new api.ProfileChildLink.fromJson(o.toJson()); |
| 4426 checkProfileChildLink(od); | 4402 checkProfileChildLink(od); |
| 4427 }); | 4403 }); |
| 4428 }); | 4404 }); |
| 4429 | 4405 |
| 4430 | |
| 4431 unittest.group("obj-schema-ProfileParentLink", () { | 4406 unittest.group("obj-schema-ProfileParentLink", () { |
| 4432 unittest.test("to-json--from-json", () { | 4407 unittest.test("to-json--from-json", () { |
| 4433 var o = buildProfileParentLink(); | 4408 var o = buildProfileParentLink(); |
| 4434 var od = new api.ProfileParentLink.fromJson(o.toJson()); | 4409 var od = new api.ProfileParentLink.fromJson(o.toJson()); |
| 4435 checkProfileParentLink(od); | 4410 checkProfileParentLink(od); |
| 4436 }); | 4411 }); |
| 4437 }); | 4412 }); |
| 4438 | 4413 |
| 4439 | |
| 4440 unittest.group("obj-schema-ProfilePermissions", () { | 4414 unittest.group("obj-schema-ProfilePermissions", () { |
| 4441 unittest.test("to-json--from-json", () { | 4415 unittest.test("to-json--from-json", () { |
| 4442 var o = buildProfilePermissions(); | 4416 var o = buildProfilePermissions(); |
| 4443 var od = new api.ProfilePermissions.fromJson(o.toJson()); | 4417 var od = new api.ProfilePermissions.fromJson(o.toJson()); |
| 4444 checkProfilePermissions(od); | 4418 checkProfilePermissions(od); |
| 4445 }); | 4419 }); |
| 4446 }); | 4420 }); |
| 4447 | 4421 |
| 4448 | |
| 4449 unittest.group("obj-schema-Profile", () { | 4422 unittest.group("obj-schema-Profile", () { |
| 4450 unittest.test("to-json--from-json", () { | 4423 unittest.test("to-json--from-json", () { |
| 4451 var o = buildProfile(); | 4424 var o = buildProfile(); |
| 4452 var od = new api.Profile.fromJson(o.toJson()); | 4425 var od = new api.Profile.fromJson(o.toJson()); |
| 4453 checkProfile(od); | 4426 checkProfile(od); |
| 4454 }); | 4427 }); |
| 4455 }); | 4428 }); |
| 4456 | 4429 |
| 4457 | |
| 4458 unittest.group("obj-schema-ProfileFilterLink", () { | 4430 unittest.group("obj-schema-ProfileFilterLink", () { |
| 4459 unittest.test("to-json--from-json", () { | 4431 unittest.test("to-json--from-json", () { |
| 4460 var o = buildProfileFilterLink(); | 4432 var o = buildProfileFilterLink(); |
| 4461 var od = new api.ProfileFilterLink.fromJson(o.toJson()); | 4433 var od = new api.ProfileFilterLink.fromJson(o.toJson()); |
| 4462 checkProfileFilterLink(od); | 4434 checkProfileFilterLink(od); |
| 4463 }); | 4435 }); |
| 4464 }); | 4436 }); |
| 4465 | 4437 |
| 4466 | |
| 4467 unittest.group("obj-schema-ProfileFilterLinks", () { | 4438 unittest.group("obj-schema-ProfileFilterLinks", () { |
| 4468 unittest.test("to-json--from-json", () { | 4439 unittest.test("to-json--from-json", () { |
| 4469 var o = buildProfileFilterLinks(); | 4440 var o = buildProfileFilterLinks(); |
| 4470 var od = new api.ProfileFilterLinks.fromJson(o.toJson()); | 4441 var od = new api.ProfileFilterLinks.fromJson(o.toJson()); |
| 4471 checkProfileFilterLinks(od); | 4442 checkProfileFilterLinks(od); |
| 4472 }); | 4443 }); |
| 4473 }); | 4444 }); |
| 4474 | 4445 |
| 4475 | |
| 4476 unittest.group("obj-schema-ProfileRef", () { | 4446 unittest.group("obj-schema-ProfileRef", () { |
| 4477 unittest.test("to-json--from-json", () { | 4447 unittest.test("to-json--from-json", () { |
| 4478 var o = buildProfileRef(); | 4448 var o = buildProfileRef(); |
| 4479 var od = new api.ProfileRef.fromJson(o.toJson()); | 4449 var od = new api.ProfileRef.fromJson(o.toJson()); |
| 4480 checkProfileRef(od); | 4450 checkProfileRef(od); |
| 4481 }); | 4451 }); |
| 4482 }); | 4452 }); |
| 4483 | 4453 |
| 4484 | |
| 4485 unittest.group("obj-schema-ProfileSummary", () { | 4454 unittest.group("obj-schema-ProfileSummary", () { |
| 4486 unittest.test("to-json--from-json", () { | 4455 unittest.test("to-json--from-json", () { |
| 4487 var o = buildProfileSummary(); | 4456 var o = buildProfileSummary(); |
| 4488 var od = new api.ProfileSummary.fromJson(o.toJson()); | 4457 var od = new api.ProfileSummary.fromJson(o.toJson()); |
| 4489 checkProfileSummary(od); | 4458 checkProfileSummary(od); |
| 4490 }); | 4459 }); |
| 4491 }); | 4460 }); |
| 4492 | 4461 |
| 4493 | |
| 4494 unittest.group("obj-schema-Profiles", () { | 4462 unittest.group("obj-schema-Profiles", () { |
| 4495 unittest.test("to-json--from-json", () { | 4463 unittest.test("to-json--from-json", () { |
| 4496 var o = buildProfiles(); | 4464 var o = buildProfiles(); |
| 4497 var od = new api.Profiles.fromJson(o.toJson()); | 4465 var od = new api.Profiles.fromJson(o.toJson()); |
| 4498 checkProfiles(od); | 4466 checkProfiles(od); |
| 4499 }); | 4467 }); |
| 4500 }); | 4468 }); |
| 4501 | 4469 |
| 4502 | |
| 4503 unittest.group("obj-schema-RealtimeDataColumnHeaders", () { | 4470 unittest.group("obj-schema-RealtimeDataColumnHeaders", () { |
| 4504 unittest.test("to-json--from-json", () { | 4471 unittest.test("to-json--from-json", () { |
| 4505 var o = buildRealtimeDataColumnHeaders(); | 4472 var o = buildRealtimeDataColumnHeaders(); |
| 4506 var od = new api.RealtimeDataColumnHeaders.fromJson(o.toJson()); | 4473 var od = new api.RealtimeDataColumnHeaders.fromJson(o.toJson()); |
| 4507 checkRealtimeDataColumnHeaders(od); | 4474 checkRealtimeDataColumnHeaders(od); |
| 4508 }); | 4475 }); |
| 4509 }); | 4476 }); |
| 4510 | 4477 |
| 4511 | |
| 4512 unittest.group("obj-schema-RealtimeDataProfileInfo", () { | 4478 unittest.group("obj-schema-RealtimeDataProfileInfo", () { |
| 4513 unittest.test("to-json--from-json", () { | 4479 unittest.test("to-json--from-json", () { |
| 4514 var o = buildRealtimeDataProfileInfo(); | 4480 var o = buildRealtimeDataProfileInfo(); |
| 4515 var od = new api.RealtimeDataProfileInfo.fromJson(o.toJson()); | 4481 var od = new api.RealtimeDataProfileInfo.fromJson(o.toJson()); |
| 4516 checkRealtimeDataProfileInfo(od); | 4482 checkRealtimeDataProfileInfo(od); |
| 4517 }); | 4483 }); |
| 4518 }); | 4484 }); |
| 4519 | 4485 |
| 4520 | |
| 4521 unittest.group("obj-schema-RealtimeDataQuery", () { | 4486 unittest.group("obj-schema-RealtimeDataQuery", () { |
| 4522 unittest.test("to-json--from-json", () { | 4487 unittest.test("to-json--from-json", () { |
| 4523 var o = buildRealtimeDataQuery(); | 4488 var o = buildRealtimeDataQuery(); |
| 4524 var od = new api.RealtimeDataQuery.fromJson(o.toJson()); | 4489 var od = new api.RealtimeDataQuery.fromJson(o.toJson()); |
| 4525 checkRealtimeDataQuery(od); | 4490 checkRealtimeDataQuery(od); |
| 4526 }); | 4491 }); |
| 4527 }); | 4492 }); |
| 4528 | 4493 |
| 4529 | |
| 4530 unittest.group("obj-schema-RealtimeData", () { | 4494 unittest.group("obj-schema-RealtimeData", () { |
| 4531 unittest.test("to-json--from-json", () { | 4495 unittest.test("to-json--from-json", () { |
| 4532 var o = buildRealtimeData(); | 4496 var o = buildRealtimeData(); |
| 4533 var od = new api.RealtimeData.fromJson(o.toJson()); | 4497 var od = new api.RealtimeData.fromJson(o.toJson()); |
| 4534 checkRealtimeData(od); | 4498 checkRealtimeData(od); |
| 4535 }); | 4499 }); |
| 4536 }); | 4500 }); |
| 4537 | 4501 |
| 4538 | |
| 4539 unittest.group("obj-schema-RemarketingAudienceAudienceDefinition", () { | 4502 unittest.group("obj-schema-RemarketingAudienceAudienceDefinition", () { |
| 4540 unittest.test("to-json--from-json", () { | 4503 unittest.test("to-json--from-json", () { |
| 4541 var o = buildRemarketingAudienceAudienceDefinition(); | 4504 var o = buildRemarketingAudienceAudienceDefinition(); |
| 4542 var od = new api.RemarketingAudienceAudienceDefinition.fromJson(o.toJson()
); | 4505 var od = |
| 4506 new api.RemarketingAudienceAudienceDefinition.fromJson(o.toJson()); |
| 4543 checkRemarketingAudienceAudienceDefinition(od); | 4507 checkRemarketingAudienceAudienceDefinition(od); |
| 4544 }); | 4508 }); |
| 4545 }); | 4509 }); |
| 4546 | 4510 |
| 4547 | 4511 unittest.group( |
| 4548 unittest.group("obj-schema-RemarketingAudienceStateBasedAudienceDefinitionExcl
udeConditions", () { | 4512 "obj-schema-RemarketingAudienceStateBasedAudienceDefinitionExcludeConditio
ns", |
| 4513 () { |
| 4549 unittest.test("to-json--from-json", () { | 4514 unittest.test("to-json--from-json", () { |
| 4550 var o = buildRemarketingAudienceStateBasedAudienceDefinitionExcludeConditi
ons(); | 4515 var o = |
| 4551 var od = new api.RemarketingAudienceStateBasedAudienceDefinitionExcludeCon
ditions.fromJson(o.toJson()); | 4516 buildRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions(
); |
| 4517 var od = new api |
| 4518 .RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions.
fromJson( |
| 4519 o.toJson()); |
| 4552 checkRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions(od); | 4520 checkRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions(od); |
| 4553 }); | 4521 }); |
| 4554 }); | 4522 }); |
| 4555 | 4523 |
| 4556 | 4524 unittest.group("obj-schema-RemarketingAudienceStateBasedAudienceDefinition", |
| 4557 unittest.group("obj-schema-RemarketingAudienceStateBasedAudienceDefinition", (
) { | 4525 () { |
| 4558 unittest.test("to-json--from-json", () { | 4526 unittest.test("to-json--from-json", () { |
| 4559 var o = buildRemarketingAudienceStateBasedAudienceDefinition(); | 4527 var o = buildRemarketingAudienceStateBasedAudienceDefinition(); |
| 4560 var od = new api.RemarketingAudienceStateBasedAudienceDefinition.fromJson(
o.toJson()); | 4528 var od = new api.RemarketingAudienceStateBasedAudienceDefinition.fromJson( |
| 4529 o.toJson()); |
| 4561 checkRemarketingAudienceStateBasedAudienceDefinition(od); | 4530 checkRemarketingAudienceStateBasedAudienceDefinition(od); |
| 4562 }); | 4531 }); |
| 4563 }); | 4532 }); |
| 4564 | 4533 |
| 4565 | |
| 4566 unittest.group("obj-schema-RemarketingAudience", () { | 4534 unittest.group("obj-schema-RemarketingAudience", () { |
| 4567 unittest.test("to-json--from-json", () { | 4535 unittest.test("to-json--from-json", () { |
| 4568 var o = buildRemarketingAudience(); | 4536 var o = buildRemarketingAudience(); |
| 4569 var od = new api.RemarketingAudience.fromJson(o.toJson()); | 4537 var od = new api.RemarketingAudience.fromJson(o.toJson()); |
| 4570 checkRemarketingAudience(od); | 4538 checkRemarketingAudience(od); |
| 4571 }); | 4539 }); |
| 4572 }); | 4540 }); |
| 4573 | 4541 |
| 4574 | |
| 4575 unittest.group("obj-schema-RemarketingAudiences", () { | 4542 unittest.group("obj-schema-RemarketingAudiences", () { |
| 4576 unittest.test("to-json--from-json", () { | 4543 unittest.test("to-json--from-json", () { |
| 4577 var o = buildRemarketingAudiences(); | 4544 var o = buildRemarketingAudiences(); |
| 4578 var od = new api.RemarketingAudiences.fromJson(o.toJson()); | 4545 var od = new api.RemarketingAudiences.fromJson(o.toJson()); |
| 4579 checkRemarketingAudiences(od); | 4546 checkRemarketingAudiences(od); |
| 4580 }); | 4547 }); |
| 4581 }); | 4548 }); |
| 4582 | 4549 |
| 4583 | |
| 4584 unittest.group("obj-schema-Segment", () { | 4550 unittest.group("obj-schema-Segment", () { |
| 4585 unittest.test("to-json--from-json", () { | 4551 unittest.test("to-json--from-json", () { |
| 4586 var o = buildSegment(); | 4552 var o = buildSegment(); |
| 4587 var od = new api.Segment.fromJson(o.toJson()); | 4553 var od = new api.Segment.fromJson(o.toJson()); |
| 4588 checkSegment(od); | 4554 checkSegment(od); |
| 4589 }); | 4555 }); |
| 4590 }); | 4556 }); |
| 4591 | 4557 |
| 4592 | |
| 4593 unittest.group("obj-schema-Segments", () { | 4558 unittest.group("obj-schema-Segments", () { |
| 4594 unittest.test("to-json--from-json", () { | 4559 unittest.test("to-json--from-json", () { |
| 4595 var o = buildSegments(); | 4560 var o = buildSegments(); |
| 4596 var od = new api.Segments.fromJson(o.toJson()); | 4561 var od = new api.Segments.fromJson(o.toJson()); |
| 4597 checkSegments(od); | 4562 checkSegments(od); |
| 4598 }); | 4563 }); |
| 4599 }); | 4564 }); |
| 4600 | 4565 |
| 4601 | |
| 4602 unittest.group("obj-schema-UnsampledReportCloudStorageDownloadDetails", () { | 4566 unittest.group("obj-schema-UnsampledReportCloudStorageDownloadDetails", () { |
| 4603 unittest.test("to-json--from-json", () { | 4567 unittest.test("to-json--from-json", () { |
| 4604 var o = buildUnsampledReportCloudStorageDownloadDetails(); | 4568 var o = buildUnsampledReportCloudStorageDownloadDetails(); |
| 4605 var od = new api.UnsampledReportCloudStorageDownloadDetails.fromJson(o.toJ
son()); | 4569 var od = new api.UnsampledReportCloudStorageDownloadDetails.fromJson( |
| 4570 o.toJson()); |
| 4606 checkUnsampledReportCloudStorageDownloadDetails(od); | 4571 checkUnsampledReportCloudStorageDownloadDetails(od); |
| 4607 }); | 4572 }); |
| 4608 }); | 4573 }); |
| 4609 | 4574 |
| 4610 | |
| 4611 unittest.group("obj-schema-UnsampledReportDriveDownloadDetails", () { | 4575 unittest.group("obj-schema-UnsampledReportDriveDownloadDetails", () { |
| 4612 unittest.test("to-json--from-json", () { | 4576 unittest.test("to-json--from-json", () { |
| 4613 var o = buildUnsampledReportDriveDownloadDetails(); | 4577 var o = buildUnsampledReportDriveDownloadDetails(); |
| 4614 var od = new api.UnsampledReportDriveDownloadDetails.fromJson(o.toJson()); | 4578 var od = new api.UnsampledReportDriveDownloadDetails.fromJson(o.toJson()); |
| 4615 checkUnsampledReportDriveDownloadDetails(od); | 4579 checkUnsampledReportDriveDownloadDetails(od); |
| 4616 }); | 4580 }); |
| 4617 }); | 4581 }); |
| 4618 | 4582 |
| 4619 | |
| 4620 unittest.group("obj-schema-UnsampledReport", () { | 4583 unittest.group("obj-schema-UnsampledReport", () { |
| 4621 unittest.test("to-json--from-json", () { | 4584 unittest.test("to-json--from-json", () { |
| 4622 var o = buildUnsampledReport(); | 4585 var o = buildUnsampledReport(); |
| 4623 var od = new api.UnsampledReport.fromJson(o.toJson()); | 4586 var od = new api.UnsampledReport.fromJson(o.toJson()); |
| 4624 checkUnsampledReport(od); | 4587 checkUnsampledReport(od); |
| 4625 }); | 4588 }); |
| 4626 }); | 4589 }); |
| 4627 | 4590 |
| 4628 | |
| 4629 unittest.group("obj-schema-UnsampledReports", () { | 4591 unittest.group("obj-schema-UnsampledReports", () { |
| 4630 unittest.test("to-json--from-json", () { | 4592 unittest.test("to-json--from-json", () { |
| 4631 var o = buildUnsampledReports(); | 4593 var o = buildUnsampledReports(); |
| 4632 var od = new api.UnsampledReports.fromJson(o.toJson()); | 4594 var od = new api.UnsampledReports.fromJson(o.toJson()); |
| 4633 checkUnsampledReports(od); | 4595 checkUnsampledReports(od); |
| 4634 }); | 4596 }); |
| 4635 }); | 4597 }); |
| 4636 | 4598 |
| 4637 | |
| 4638 unittest.group("obj-schema-Upload", () { | 4599 unittest.group("obj-schema-Upload", () { |
| 4639 unittest.test("to-json--from-json", () { | 4600 unittest.test("to-json--from-json", () { |
| 4640 var o = buildUpload(); | 4601 var o = buildUpload(); |
| 4641 var od = new api.Upload.fromJson(o.toJson()); | 4602 var od = new api.Upload.fromJson(o.toJson()); |
| 4642 checkUpload(od); | 4603 checkUpload(od); |
| 4643 }); | 4604 }); |
| 4644 }); | 4605 }); |
| 4645 | 4606 |
| 4646 | |
| 4647 unittest.group("obj-schema-Uploads", () { | 4607 unittest.group("obj-schema-Uploads", () { |
| 4648 unittest.test("to-json--from-json", () { | 4608 unittest.test("to-json--from-json", () { |
| 4649 var o = buildUploads(); | 4609 var o = buildUploads(); |
| 4650 var od = new api.Uploads.fromJson(o.toJson()); | 4610 var od = new api.Uploads.fromJson(o.toJson()); |
| 4651 checkUploads(od); | 4611 checkUploads(od); |
| 4652 }); | 4612 }); |
| 4653 }); | 4613 }); |
| 4654 | 4614 |
| 4655 | |
| 4656 unittest.group("obj-schema-UserRef", () { | 4615 unittest.group("obj-schema-UserRef", () { |
| 4657 unittest.test("to-json--from-json", () { | 4616 unittest.test("to-json--from-json", () { |
| 4658 var o = buildUserRef(); | 4617 var o = buildUserRef(); |
| 4659 var od = new api.UserRef.fromJson(o.toJson()); | 4618 var od = new api.UserRef.fromJson(o.toJson()); |
| 4660 checkUserRef(od); | 4619 checkUserRef(od); |
| 4661 }); | 4620 }); |
| 4662 }); | 4621 }); |
| 4663 | 4622 |
| 4664 | |
| 4665 unittest.group("obj-schema-WebPropertyRef", () { | 4623 unittest.group("obj-schema-WebPropertyRef", () { |
| 4666 unittest.test("to-json--from-json", () { | 4624 unittest.test("to-json--from-json", () { |
| 4667 var o = buildWebPropertyRef(); | 4625 var o = buildWebPropertyRef(); |
| 4668 var od = new api.WebPropertyRef.fromJson(o.toJson()); | 4626 var od = new api.WebPropertyRef.fromJson(o.toJson()); |
| 4669 checkWebPropertyRef(od); | 4627 checkWebPropertyRef(od); |
| 4670 }); | 4628 }); |
| 4671 }); | 4629 }); |
| 4672 | 4630 |
| 4673 | |
| 4674 unittest.group("obj-schema-WebPropertySummary", () { | 4631 unittest.group("obj-schema-WebPropertySummary", () { |
| 4675 unittest.test("to-json--from-json", () { | 4632 unittest.test("to-json--from-json", () { |
| 4676 var o = buildWebPropertySummary(); | 4633 var o = buildWebPropertySummary(); |
| 4677 var od = new api.WebPropertySummary.fromJson(o.toJson()); | 4634 var od = new api.WebPropertySummary.fromJson(o.toJson()); |
| 4678 checkWebPropertySummary(od); | 4635 checkWebPropertySummary(od); |
| 4679 }); | 4636 }); |
| 4680 }); | 4637 }); |
| 4681 | 4638 |
| 4682 | |
| 4683 unittest.group("obj-schema-Webproperties", () { | 4639 unittest.group("obj-schema-Webproperties", () { |
| 4684 unittest.test("to-json--from-json", () { | 4640 unittest.test("to-json--from-json", () { |
| 4685 var o = buildWebproperties(); | 4641 var o = buildWebproperties(); |
| 4686 var od = new api.Webproperties.fromJson(o.toJson()); | 4642 var od = new api.Webproperties.fromJson(o.toJson()); |
| 4687 checkWebproperties(od); | 4643 checkWebproperties(od); |
| 4688 }); | 4644 }); |
| 4689 }); | 4645 }); |
| 4690 | 4646 |
| 4691 | |
| 4692 unittest.group("obj-schema-WebpropertyChildLink", () { | 4647 unittest.group("obj-schema-WebpropertyChildLink", () { |
| 4693 unittest.test("to-json--from-json", () { | 4648 unittest.test("to-json--from-json", () { |
| 4694 var o = buildWebpropertyChildLink(); | 4649 var o = buildWebpropertyChildLink(); |
| 4695 var od = new api.WebpropertyChildLink.fromJson(o.toJson()); | 4650 var od = new api.WebpropertyChildLink.fromJson(o.toJson()); |
| 4696 checkWebpropertyChildLink(od); | 4651 checkWebpropertyChildLink(od); |
| 4697 }); | 4652 }); |
| 4698 }); | 4653 }); |
| 4699 | 4654 |
| 4700 | |
| 4701 unittest.group("obj-schema-WebpropertyParentLink", () { | 4655 unittest.group("obj-schema-WebpropertyParentLink", () { |
| 4702 unittest.test("to-json--from-json", () { | 4656 unittest.test("to-json--from-json", () { |
| 4703 var o = buildWebpropertyParentLink(); | 4657 var o = buildWebpropertyParentLink(); |
| 4704 var od = new api.WebpropertyParentLink.fromJson(o.toJson()); | 4658 var od = new api.WebpropertyParentLink.fromJson(o.toJson()); |
| 4705 checkWebpropertyParentLink(od); | 4659 checkWebpropertyParentLink(od); |
| 4706 }); | 4660 }); |
| 4707 }); | 4661 }); |
| 4708 | 4662 |
| 4709 | |
| 4710 unittest.group("obj-schema-WebpropertyPermissions", () { | 4663 unittest.group("obj-schema-WebpropertyPermissions", () { |
| 4711 unittest.test("to-json--from-json", () { | 4664 unittest.test("to-json--from-json", () { |
| 4712 var o = buildWebpropertyPermissions(); | 4665 var o = buildWebpropertyPermissions(); |
| 4713 var od = new api.WebpropertyPermissions.fromJson(o.toJson()); | 4666 var od = new api.WebpropertyPermissions.fromJson(o.toJson()); |
| 4714 checkWebpropertyPermissions(od); | 4667 checkWebpropertyPermissions(od); |
| 4715 }); | 4668 }); |
| 4716 }); | 4669 }); |
| 4717 | 4670 |
| 4718 | |
| 4719 unittest.group("obj-schema-Webproperty", () { | 4671 unittest.group("obj-schema-Webproperty", () { |
| 4720 unittest.test("to-json--from-json", () { | 4672 unittest.test("to-json--from-json", () { |
| 4721 var o = buildWebproperty(); | 4673 var o = buildWebproperty(); |
| 4722 var od = new api.Webproperty.fromJson(o.toJson()); | 4674 var od = new api.Webproperty.fromJson(o.toJson()); |
| 4723 checkWebproperty(od); | 4675 checkWebproperty(od); |
| 4724 }); | 4676 }); |
| 4725 }); | 4677 }); |
| 4726 | 4678 |
| 4727 | |
| 4728 unittest.group("resource-DataGaResourceApi", () { | 4679 unittest.group("resource-DataGaResourceApi", () { |
| 4729 unittest.test("method--get", () { | 4680 unittest.test("method--get", () { |
| 4730 | |
| 4731 var mock = new HttpServerMock(); | 4681 var mock = new HttpServerMock(); |
| 4732 api.DataGaResourceApi res = new api.AnalyticsApi(mock).data.ga; | 4682 api.DataGaResourceApi res = new api.AnalyticsApi(mock).data.ga; |
| 4733 var arg_ids = "foo"; | 4683 var arg_ids = "foo"; |
| 4734 var arg_start_date = "foo"; | 4684 var arg_start_date = "foo"; |
| 4735 var arg_end_date = "foo"; | 4685 var arg_end_date = "foo"; |
| 4736 var arg_metrics = "foo"; | 4686 var arg_metrics = "foo"; |
| 4737 var arg_dimensions = "foo"; | 4687 var arg_dimensions = "foo"; |
| 4738 var arg_filters = "foo"; | 4688 var arg_filters = "foo"; |
| 4739 var arg_include_empty_rows = true; | 4689 var arg_include_empty_rows = true; |
| 4740 var arg_max_results = 42; | 4690 var arg_max_results = 42; |
| 4741 var arg_output = "foo"; | 4691 var arg_output = "foo"; |
| 4742 var arg_samplingLevel = "foo"; | 4692 var arg_samplingLevel = "foo"; |
| 4743 var arg_segment = "foo"; | 4693 var arg_segment = "foo"; |
| 4744 var arg_sort = "foo"; | 4694 var arg_sort = "foo"; |
| 4745 var arg_start_index = 42; | 4695 var arg_start_index = 42; |
| 4746 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4696 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4747 var path = (req.url).path; | 4697 var path = (req.url).path; |
| 4748 var pathOffset = 0; | 4698 var pathOffset = 0; |
| 4749 var index; | 4699 var index; |
| 4750 var subPart; | 4700 var subPart; |
| 4751 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4701 unittest.expect( |
| 4702 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4752 pathOffset += 1; | 4703 pathOffset += 1; |
| 4753 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 4704 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 4705 unittest.equals("analytics/v3/")); |
| 4754 pathOffset += 13; | 4706 pathOffset += 13; |
| 4755 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("data/ga")); | 4707 unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 4708 unittest.equals("data/ga")); |
| 4756 pathOffset += 7; | 4709 pathOffset += 7; |
| 4757 | 4710 |
| 4758 var query = (req.url).query; | 4711 var query = (req.url).query; |
| 4759 var queryOffset = 0; | 4712 var queryOffset = 0; |
| 4760 var queryMap = {}; | 4713 var queryMap = {}; |
| 4761 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4714 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4762 parseBool(n) { | 4715 parseBool(n) { |
| 4763 if (n == "true") return true; | 4716 if (n == "true") return true; |
| 4764 if (n == "false") return false; | 4717 if (n == "false") return false; |
| 4765 if (n == null) return null; | 4718 if (n == null) return null; |
| 4766 throw new core.ArgumentError("Invalid boolean: $n"); | 4719 throw new core.ArgumentError("Invalid boolean: $n"); |
| 4767 } | 4720 } |
| 4721 |
| 4768 if (query.length > 0) { | 4722 if (query.length > 0) { |
| 4769 for (var part in query.split("&")) { | 4723 for (var part in query.split("&")) { |
| 4770 var keyvalue = part.split("="); | 4724 var keyvalue = part.split("="); |
| 4771 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4725 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4726 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4772 } | 4727 } |
| 4773 } | 4728 } |
| 4774 unittest.expect(queryMap["ids"].first, unittest.equals(arg_ids)); | 4729 unittest.expect(queryMap["ids"].first, unittest.equals(arg_ids)); |
| 4775 unittest.expect(queryMap["start-date"].first, unittest.equals(arg_start_
date)); | 4730 unittest.expect( |
| 4776 unittest.expect(queryMap["end-date"].first, unittest.equals(arg_end_date
)); | 4731 queryMap["start-date"].first, unittest.equals(arg_start_date)); |
| 4777 unittest.expect(queryMap["metrics"].first, unittest.equals(arg_metrics))
; | 4732 unittest.expect( |
| 4778 unittest.expect(queryMap["dimensions"].first, unittest.equals(arg_dimens
ions)); | 4733 queryMap["end-date"].first, unittest.equals(arg_end_date)); |
| 4779 unittest.expect(queryMap["filters"].first, unittest.equals(arg_filters))
; | 4734 unittest.expect( |
| 4780 unittest.expect(queryMap["include-empty-rows"].first, unittest.equals("$
arg_include_empty_rows")); | 4735 queryMap["metrics"].first, unittest.equals(arg_metrics)); |
| 4781 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 4736 unittest.expect( |
| 4737 queryMap["dimensions"].first, unittest.equals(arg_dimensions)); |
| 4738 unittest.expect( |
| 4739 queryMap["filters"].first, unittest.equals(arg_filters)); |
| 4740 unittest.expect(queryMap["include-empty-rows"].first, |
| 4741 unittest.equals("$arg_include_empty_rows")); |
| 4742 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 4743 unittest.equals(arg_max_results)); |
| 4782 unittest.expect(queryMap["output"].first, unittest.equals(arg_output)); | 4744 unittest.expect(queryMap["output"].first, unittest.equals(arg_output)); |
| 4783 unittest.expect(queryMap["samplingLevel"].first, unittest.equals(arg_sam
plingLevel)); | 4745 unittest.expect(queryMap["samplingLevel"].first, |
| 4784 unittest.expect(queryMap["segment"].first, unittest.equals(arg_segment))
; | 4746 unittest.equals(arg_samplingLevel)); |
| 4747 unittest.expect( |
| 4748 queryMap["segment"].first, unittest.equals(arg_segment)); |
| 4785 unittest.expect(queryMap["sort"].first, unittest.equals(arg_sort)); | 4749 unittest.expect(queryMap["sort"].first, unittest.equals(arg_sort)); |
| 4786 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 4750 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 4787 | 4751 unittest.equals(arg_start_index)); |
| 4788 | 4752 |
| 4789 var h = { | 4753 var h = { |
| 4790 "content-type" : "application/json; charset=utf-8", | 4754 "content-type": "application/json; charset=utf-8", |
| 4791 }; | 4755 }; |
| 4792 var resp = convert.JSON.encode(buildGaData()); | 4756 var resp = convert.JSON.encode(buildGaData()); |
| 4793 return new async.Future.value(stringResponse(200, h, resp)); | 4757 return new async.Future.value(stringResponse(200, h, resp)); |
| 4794 }), true); | 4758 }), true); |
| 4795 res.get(arg_ids, arg_start_date, arg_end_date, arg_metrics, dimensions: ar
g_dimensions, filters: arg_filters, include_empty_rows: arg_include_empty_rows,
max_results: arg_max_results, output: arg_output, samplingLevel: arg_samplingLev
el, segment: arg_segment, sort: arg_sort, start_index: arg_start_index).then(uni
ttest.expectAsync1(((api.GaData response) { | 4759 res |
| 4760 .get(arg_ids, arg_start_date, arg_end_date, arg_metrics, |
| 4761 dimensions: arg_dimensions, |
| 4762 filters: arg_filters, |
| 4763 include_empty_rows: arg_include_empty_rows, |
| 4764 max_results: arg_max_results, |
| 4765 output: arg_output, |
| 4766 samplingLevel: arg_samplingLevel, |
| 4767 segment: arg_segment, |
| 4768 sort: arg_sort, |
| 4769 start_index: arg_start_index) |
| 4770 .then(unittest.expectAsync1(((api.GaData response) { |
| 4796 checkGaData(response); | 4771 checkGaData(response); |
| 4797 }))); | 4772 }))); |
| 4798 }); | 4773 }); |
| 4799 | |
| 4800 }); | 4774 }); |
| 4801 | 4775 |
| 4802 | |
| 4803 unittest.group("resource-DataMcfResourceApi", () { | 4776 unittest.group("resource-DataMcfResourceApi", () { |
| 4804 unittest.test("method--get", () { | 4777 unittest.test("method--get", () { |
| 4805 | |
| 4806 var mock = new HttpServerMock(); | 4778 var mock = new HttpServerMock(); |
| 4807 api.DataMcfResourceApi res = new api.AnalyticsApi(mock).data.mcf; | 4779 api.DataMcfResourceApi res = new api.AnalyticsApi(mock).data.mcf; |
| 4808 var arg_ids = "foo"; | 4780 var arg_ids = "foo"; |
| 4809 var arg_start_date = "foo"; | 4781 var arg_start_date = "foo"; |
| 4810 var arg_end_date = "foo"; | 4782 var arg_end_date = "foo"; |
| 4811 var arg_metrics = "foo"; | 4783 var arg_metrics = "foo"; |
| 4812 var arg_dimensions = "foo"; | 4784 var arg_dimensions = "foo"; |
| 4813 var arg_filters = "foo"; | 4785 var arg_filters = "foo"; |
| 4814 var arg_max_results = 42; | 4786 var arg_max_results = 42; |
| 4815 var arg_samplingLevel = "foo"; | 4787 var arg_samplingLevel = "foo"; |
| 4816 var arg_sort = "foo"; | 4788 var arg_sort = "foo"; |
| 4817 var arg_start_index = 42; | 4789 var arg_start_index = 42; |
| 4818 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4790 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4819 var path = (req.url).path; | 4791 var path = (req.url).path; |
| 4820 var pathOffset = 0; | 4792 var pathOffset = 0; |
| 4821 var index; | 4793 var index; |
| 4822 var subPart; | 4794 var subPart; |
| 4823 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4795 unittest.expect( |
| 4796 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4824 pathOffset += 1; | 4797 pathOffset += 1; |
| 4825 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 4798 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 4799 unittest.equals("analytics/v3/")); |
| 4826 pathOffset += 13; | 4800 pathOffset += 13; |
| 4827 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("data/mcf")); | 4801 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 4802 unittest.equals("data/mcf")); |
| 4828 pathOffset += 8; | 4803 pathOffset += 8; |
| 4829 | 4804 |
| 4830 var query = (req.url).query; | 4805 var query = (req.url).query; |
| 4831 var queryOffset = 0; | 4806 var queryOffset = 0; |
| 4832 var queryMap = {}; | 4807 var queryMap = {}; |
| 4833 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4808 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4834 parseBool(n) { | 4809 parseBool(n) { |
| 4835 if (n == "true") return true; | 4810 if (n == "true") return true; |
| 4836 if (n == "false") return false; | 4811 if (n == "false") return false; |
| 4837 if (n == null) return null; | 4812 if (n == null) return null; |
| 4838 throw new core.ArgumentError("Invalid boolean: $n"); | 4813 throw new core.ArgumentError("Invalid boolean: $n"); |
| 4839 } | 4814 } |
| 4815 |
| 4840 if (query.length > 0) { | 4816 if (query.length > 0) { |
| 4841 for (var part in query.split("&")) { | 4817 for (var part in query.split("&")) { |
| 4842 var keyvalue = part.split("="); | 4818 var keyvalue = part.split("="); |
| 4843 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4819 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4820 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4844 } | 4821 } |
| 4845 } | 4822 } |
| 4846 unittest.expect(queryMap["ids"].first, unittest.equals(arg_ids)); | 4823 unittest.expect(queryMap["ids"].first, unittest.equals(arg_ids)); |
| 4847 unittest.expect(queryMap["start-date"].first, unittest.equals(arg_start_
date)); | 4824 unittest.expect( |
| 4848 unittest.expect(queryMap["end-date"].first, unittest.equals(arg_end_date
)); | 4825 queryMap["start-date"].first, unittest.equals(arg_start_date)); |
| 4849 unittest.expect(queryMap["metrics"].first, unittest.equals(arg_metrics))
; | 4826 unittest.expect( |
| 4850 unittest.expect(queryMap["dimensions"].first, unittest.equals(arg_dimens
ions)); | 4827 queryMap["end-date"].first, unittest.equals(arg_end_date)); |
| 4851 unittest.expect(queryMap["filters"].first, unittest.equals(arg_filters))
; | 4828 unittest.expect( |
| 4852 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 4829 queryMap["metrics"].first, unittest.equals(arg_metrics)); |
| 4853 unittest.expect(queryMap["samplingLevel"].first, unittest.equals(arg_sam
plingLevel)); | 4830 unittest.expect( |
| 4831 queryMap["dimensions"].first, unittest.equals(arg_dimensions)); |
| 4832 unittest.expect( |
| 4833 queryMap["filters"].first, unittest.equals(arg_filters)); |
| 4834 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 4835 unittest.equals(arg_max_results)); |
| 4836 unittest.expect(queryMap["samplingLevel"].first, |
| 4837 unittest.equals(arg_samplingLevel)); |
| 4854 unittest.expect(queryMap["sort"].first, unittest.equals(arg_sort)); | 4838 unittest.expect(queryMap["sort"].first, unittest.equals(arg_sort)); |
| 4855 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 4839 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 4856 | 4840 unittest.equals(arg_start_index)); |
| 4857 | 4841 |
| 4858 var h = { | 4842 var h = { |
| 4859 "content-type" : "application/json; charset=utf-8", | 4843 "content-type": "application/json; charset=utf-8", |
| 4860 }; | 4844 }; |
| 4861 var resp = convert.JSON.encode(buildMcfData()); | 4845 var resp = convert.JSON.encode(buildMcfData()); |
| 4862 return new async.Future.value(stringResponse(200, h, resp)); | 4846 return new async.Future.value(stringResponse(200, h, resp)); |
| 4863 }), true); | 4847 }), true); |
| 4864 res.get(arg_ids, arg_start_date, arg_end_date, arg_metrics, dimensions: ar
g_dimensions, filters: arg_filters, max_results: arg_max_results, samplingLevel:
arg_samplingLevel, sort: arg_sort, start_index: arg_start_index).then(unittest.
expectAsync1(((api.McfData response) { | 4848 res |
| 4849 .get(arg_ids, arg_start_date, arg_end_date, arg_metrics, |
| 4850 dimensions: arg_dimensions, |
| 4851 filters: arg_filters, |
| 4852 max_results: arg_max_results, |
| 4853 samplingLevel: arg_samplingLevel, |
| 4854 sort: arg_sort, |
| 4855 start_index: arg_start_index) |
| 4856 .then(unittest.expectAsync1(((api.McfData response) { |
| 4865 checkMcfData(response); | 4857 checkMcfData(response); |
| 4866 }))); | 4858 }))); |
| 4867 }); | 4859 }); |
| 4868 | |
| 4869 }); | 4860 }); |
| 4870 | 4861 |
| 4871 | |
| 4872 unittest.group("resource-DataRealtimeResourceApi", () { | 4862 unittest.group("resource-DataRealtimeResourceApi", () { |
| 4873 unittest.test("method--get", () { | 4863 unittest.test("method--get", () { |
| 4874 | |
| 4875 var mock = new HttpServerMock(); | 4864 var mock = new HttpServerMock(); |
| 4876 api.DataRealtimeResourceApi res = new api.AnalyticsApi(mock).data.realtime
; | 4865 api.DataRealtimeResourceApi res = |
| 4866 new api.AnalyticsApi(mock).data.realtime; |
| 4877 var arg_ids = "foo"; | 4867 var arg_ids = "foo"; |
| 4878 var arg_metrics = "foo"; | 4868 var arg_metrics = "foo"; |
| 4879 var arg_dimensions = "foo"; | 4869 var arg_dimensions = "foo"; |
| 4880 var arg_filters = "foo"; | 4870 var arg_filters = "foo"; |
| 4881 var arg_max_results = 42; | 4871 var arg_max_results = 42; |
| 4882 var arg_sort = "foo"; | 4872 var arg_sort = "foo"; |
| 4883 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4873 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4884 var path = (req.url).path; | 4874 var path = (req.url).path; |
| 4885 var pathOffset = 0; | 4875 var pathOffset = 0; |
| 4886 var index; | 4876 var index; |
| 4887 var subPart; | 4877 var subPart; |
| 4888 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4878 unittest.expect( |
| 4879 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4889 pathOffset += 1; | 4880 pathOffset += 1; |
| 4890 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 4881 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 4882 unittest.equals("analytics/v3/")); |
| 4891 pathOffset += 13; | 4883 pathOffset += 13; |
| 4892 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("data/realtime")); | 4884 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 4885 unittest.equals("data/realtime")); |
| 4893 pathOffset += 13; | 4886 pathOffset += 13; |
| 4894 | 4887 |
| 4895 var query = (req.url).query; | 4888 var query = (req.url).query; |
| 4896 var queryOffset = 0; | 4889 var queryOffset = 0; |
| 4897 var queryMap = {}; | 4890 var queryMap = {}; |
| 4898 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4891 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4899 parseBool(n) { | 4892 parseBool(n) { |
| 4900 if (n == "true") return true; | 4893 if (n == "true") return true; |
| 4901 if (n == "false") return false; | 4894 if (n == "false") return false; |
| 4902 if (n == null) return null; | 4895 if (n == null) return null; |
| 4903 throw new core.ArgumentError("Invalid boolean: $n"); | 4896 throw new core.ArgumentError("Invalid boolean: $n"); |
| 4904 } | 4897 } |
| 4898 |
| 4905 if (query.length > 0) { | 4899 if (query.length > 0) { |
| 4906 for (var part in query.split("&")) { | 4900 for (var part in query.split("&")) { |
| 4907 var keyvalue = part.split("="); | 4901 var keyvalue = part.split("="); |
| 4908 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4902 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4903 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4909 } | 4904 } |
| 4910 } | 4905 } |
| 4911 unittest.expect(queryMap["ids"].first, unittest.equals(arg_ids)); | 4906 unittest.expect(queryMap["ids"].first, unittest.equals(arg_ids)); |
| 4912 unittest.expect(queryMap["metrics"].first, unittest.equals(arg_metrics))
; | 4907 unittest.expect( |
| 4913 unittest.expect(queryMap["dimensions"].first, unittest.equals(arg_dimens
ions)); | 4908 queryMap["metrics"].first, unittest.equals(arg_metrics)); |
| 4914 unittest.expect(queryMap["filters"].first, unittest.equals(arg_filters))
; | 4909 unittest.expect( |
| 4915 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 4910 queryMap["dimensions"].first, unittest.equals(arg_dimensions)); |
| 4911 unittest.expect( |
| 4912 queryMap["filters"].first, unittest.equals(arg_filters)); |
| 4913 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 4914 unittest.equals(arg_max_results)); |
| 4916 unittest.expect(queryMap["sort"].first, unittest.equals(arg_sort)); | 4915 unittest.expect(queryMap["sort"].first, unittest.equals(arg_sort)); |
| 4917 | 4916 |
| 4918 | |
| 4919 var h = { | 4917 var h = { |
| 4920 "content-type" : "application/json; charset=utf-8", | 4918 "content-type": "application/json; charset=utf-8", |
| 4921 }; | 4919 }; |
| 4922 var resp = convert.JSON.encode(buildRealtimeData()); | 4920 var resp = convert.JSON.encode(buildRealtimeData()); |
| 4923 return new async.Future.value(stringResponse(200, h, resp)); | 4921 return new async.Future.value(stringResponse(200, h, resp)); |
| 4924 }), true); | 4922 }), true); |
| 4925 res.get(arg_ids, arg_metrics, dimensions: arg_dimensions, filters: arg_fil
ters, max_results: arg_max_results, sort: arg_sort).then(unittest.expectAsync1((
(api.RealtimeData response) { | 4923 res |
| 4924 .get(arg_ids, arg_metrics, |
| 4925 dimensions: arg_dimensions, |
| 4926 filters: arg_filters, |
| 4927 max_results: arg_max_results, |
| 4928 sort: arg_sort) |
| 4929 .then(unittest.expectAsync1(((api.RealtimeData response) { |
| 4926 checkRealtimeData(response); | 4930 checkRealtimeData(response); |
| 4927 }))); | 4931 }))); |
| 4928 }); | 4932 }); |
| 4929 | |
| 4930 }); | 4933 }); |
| 4931 | 4934 |
| 4932 | |
| 4933 unittest.group("resource-ManagementAccountSummariesResourceApi", () { | 4935 unittest.group("resource-ManagementAccountSummariesResourceApi", () { |
| 4934 unittest.test("method--list", () { | 4936 unittest.test("method--list", () { |
| 4935 | |
| 4936 var mock = new HttpServerMock(); | 4937 var mock = new HttpServerMock(); |
| 4937 api.ManagementAccountSummariesResourceApi res = new api.AnalyticsApi(mock)
.management.accountSummaries; | 4938 api.ManagementAccountSummariesResourceApi res = |
| 4939 new api.AnalyticsApi(mock).management.accountSummaries; |
| 4938 var arg_max_results = 42; | 4940 var arg_max_results = 42; |
| 4939 var arg_start_index = 42; | 4941 var arg_start_index = 42; |
| 4940 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4942 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4941 var path = (req.url).path; | 4943 var path = (req.url).path; |
| 4942 var pathOffset = 0; | 4944 var pathOffset = 0; |
| 4943 var index; | 4945 var index; |
| 4944 var subPart; | 4946 var subPart; |
| 4945 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4947 unittest.expect( |
| 4948 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4946 pathOffset += 1; | 4949 pathOffset += 1; |
| 4947 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 4950 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 4951 unittest.equals("analytics/v3/")); |
| 4948 pathOffset += 13; | 4952 pathOffset += 13; |
| 4949 unittest.expect(path.substring(pathOffset, pathOffset + 27), unittest.eq
uals("management/accountSummaries")); | 4953 unittest.expect(path.substring(pathOffset, pathOffset + 27), |
| 4954 unittest.equals("management/accountSummaries")); |
| 4950 pathOffset += 27; | 4955 pathOffset += 27; |
| 4951 | 4956 |
| 4952 var query = (req.url).query; | 4957 var query = (req.url).query; |
| 4953 var queryOffset = 0; | 4958 var queryOffset = 0; |
| 4954 var queryMap = {}; | 4959 var queryMap = {}; |
| 4955 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4960 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4956 parseBool(n) { | 4961 parseBool(n) { |
| 4957 if (n == "true") return true; | 4962 if (n == "true") return true; |
| 4958 if (n == "false") return false; | 4963 if (n == "false") return false; |
| 4959 if (n == null) return null; | 4964 if (n == null) return null; |
| 4960 throw new core.ArgumentError("Invalid boolean: $n"); | 4965 throw new core.ArgumentError("Invalid boolean: $n"); |
| 4961 } | 4966 } |
| 4967 |
| 4962 if (query.length > 0) { | 4968 if (query.length > 0) { |
| 4963 for (var part in query.split("&")) { | 4969 for (var part in query.split("&")) { |
| 4964 var keyvalue = part.split("="); | 4970 var keyvalue = part.split("="); |
| 4965 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4971 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4972 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4966 } | 4973 } |
| 4967 } | 4974 } |
| 4968 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 4975 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 4969 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 4976 unittest.equals(arg_max_results)); |
| 4970 | 4977 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 4978 unittest.equals(arg_start_index)); |
| 4971 | 4979 |
| 4972 var h = { | 4980 var h = { |
| 4973 "content-type" : "application/json; charset=utf-8", | 4981 "content-type": "application/json; charset=utf-8", |
| 4974 }; | 4982 }; |
| 4975 var resp = convert.JSON.encode(buildAccountSummaries()); | 4983 var resp = convert.JSON.encode(buildAccountSummaries()); |
| 4976 return new async.Future.value(stringResponse(200, h, resp)); | 4984 return new async.Future.value(stringResponse(200, h, resp)); |
| 4977 }), true); | 4985 }), true); |
| 4978 res.list(max_results: arg_max_results, start_index: arg_start_index).then(
unittest.expectAsync1(((api.AccountSummaries response) { | 4986 res |
| 4987 .list(max_results: arg_max_results, start_index: arg_start_index) |
| 4988 .then(unittest.expectAsync1(((api.AccountSummaries response) { |
| 4979 checkAccountSummaries(response); | 4989 checkAccountSummaries(response); |
| 4980 }))); | 4990 }))); |
| 4981 }); | 4991 }); |
| 4982 | |
| 4983 }); | 4992 }); |
| 4984 | 4993 |
| 4985 | |
| 4986 unittest.group("resource-ManagementAccountUserLinksResourceApi", () { | 4994 unittest.group("resource-ManagementAccountUserLinksResourceApi", () { |
| 4987 unittest.test("method--delete", () { | 4995 unittest.test("method--delete", () { |
| 4988 | |
| 4989 var mock = new HttpServerMock(); | 4996 var mock = new HttpServerMock(); |
| 4990 api.ManagementAccountUserLinksResourceApi res = new api.AnalyticsApi(mock)
.management.accountUserLinks; | 4997 api.ManagementAccountUserLinksResourceApi res = |
| 4998 new api.AnalyticsApi(mock).management.accountUserLinks; |
| 4991 var arg_accountId = "foo"; | 4999 var arg_accountId = "foo"; |
| 4992 var arg_linkId = "foo"; | 5000 var arg_linkId = "foo"; |
| 4993 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5001 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4994 var path = (req.url).path; | 5002 var path = (req.url).path; |
| 4995 var pathOffset = 0; | 5003 var pathOffset = 0; |
| 4996 var index; | 5004 var index; |
| 4997 var subPart; | 5005 var subPart; |
| 4998 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5006 unittest.expect( |
| 5007 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4999 pathOffset += 1; | 5008 pathOffset += 1; |
| 5000 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5009 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5010 unittest.equals("analytics/v3/")); |
| 5001 pathOffset += 13; | 5011 pathOffset += 13; |
| 5002 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5012 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5013 unittest.equals("management/accounts/")); |
| 5003 pathOffset += 20; | 5014 pathOffset += 20; |
| 5004 index = path.indexOf("/entityUserLinks/", pathOffset); | 5015 index = path.indexOf("/entityUserLinks/", pathOffset); |
| 5005 unittest.expect(index >= 0, unittest.isTrue); | 5016 unittest.expect(index >= 0, unittest.isTrue); |
| 5006 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5017 subPart = |
| 5018 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5007 pathOffset = index; | 5019 pathOffset = index; |
| 5008 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5020 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5009 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/entityUserLinks/")); | 5021 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 5022 unittest.equals("/entityUserLinks/")); |
| 5010 pathOffset += 17; | 5023 pathOffset += 17; |
| 5011 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 5024 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5012 pathOffset = path.length; | 5025 pathOffset = path.length; |
| 5013 unittest.expect(subPart, unittest.equals("$arg_linkId")); | 5026 unittest.expect(subPart, unittest.equals("$arg_linkId")); |
| 5014 | 5027 |
| 5015 var query = (req.url).query; | 5028 var query = (req.url).query; |
| 5016 var queryOffset = 0; | 5029 var queryOffset = 0; |
| 5017 var queryMap = {}; | 5030 var queryMap = {}; |
| 5018 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5031 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5019 parseBool(n) { | 5032 parseBool(n) { |
| 5020 if (n == "true") return true; | 5033 if (n == "true") return true; |
| 5021 if (n == "false") return false; | 5034 if (n == "false") return false; |
| 5022 if (n == null) return null; | 5035 if (n == null) return null; |
| 5023 throw new core.ArgumentError("Invalid boolean: $n"); | 5036 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5024 } | 5037 } |
| 5038 |
| 5025 if (query.length > 0) { | 5039 if (query.length > 0) { |
| 5026 for (var part in query.split("&")) { | 5040 for (var part in query.split("&")) { |
| 5027 var keyvalue = part.split("="); | 5041 var keyvalue = part.split("="); |
| 5028 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5042 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5043 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5029 } | 5044 } |
| 5030 } | 5045 } |
| 5031 | 5046 |
| 5032 | |
| 5033 var h = { | 5047 var h = { |
| 5034 "content-type" : "application/json; charset=utf-8", | 5048 "content-type": "application/json; charset=utf-8", |
| 5035 }; | 5049 }; |
| 5036 var resp = ""; | 5050 var resp = ""; |
| 5037 return new async.Future.value(stringResponse(200, h, resp)); | 5051 return new async.Future.value(stringResponse(200, h, resp)); |
| 5038 }), true); | 5052 }), true); |
| 5039 res.delete(arg_accountId, arg_linkId).then(unittest.expectAsync1((_) {})); | 5053 res.delete(arg_accountId, arg_linkId).then(unittest.expectAsync1((_) {})); |
| 5040 }); | 5054 }); |
| 5041 | 5055 |
| 5042 unittest.test("method--insert", () { | 5056 unittest.test("method--insert", () { |
| 5043 | |
| 5044 var mock = new HttpServerMock(); | 5057 var mock = new HttpServerMock(); |
| 5045 api.ManagementAccountUserLinksResourceApi res = new api.AnalyticsApi(mock)
.management.accountUserLinks; | 5058 api.ManagementAccountUserLinksResourceApi res = |
| 5059 new api.AnalyticsApi(mock).management.accountUserLinks; |
| 5046 var arg_request = buildEntityUserLink(); | 5060 var arg_request = buildEntityUserLink(); |
| 5047 var arg_accountId = "foo"; | 5061 var arg_accountId = "foo"; |
| 5048 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5062 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5049 var obj = new api.EntityUserLink.fromJson(json); | 5063 var obj = new api.EntityUserLink.fromJson(json); |
| 5050 checkEntityUserLink(obj); | 5064 checkEntityUserLink(obj); |
| 5051 | 5065 |
| 5052 var path = (req.url).path; | 5066 var path = (req.url).path; |
| 5053 var pathOffset = 0; | 5067 var pathOffset = 0; |
| 5054 var index; | 5068 var index; |
| 5055 var subPart; | 5069 var subPart; |
| 5056 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5070 unittest.expect( |
| 5071 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5057 pathOffset += 1; | 5072 pathOffset += 1; |
| 5058 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5073 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5074 unittest.equals("analytics/v3/")); |
| 5059 pathOffset += 13; | 5075 pathOffset += 13; |
| 5060 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5076 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5077 unittest.equals("management/accounts/")); |
| 5061 pathOffset += 20; | 5078 pathOffset += 20; |
| 5062 index = path.indexOf("/entityUserLinks", pathOffset); | 5079 index = path.indexOf("/entityUserLinks", pathOffset); |
| 5063 unittest.expect(index >= 0, unittest.isTrue); | 5080 unittest.expect(index >= 0, unittest.isTrue); |
| 5064 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5081 subPart = |
| 5082 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5065 pathOffset = index; | 5083 pathOffset = index; |
| 5066 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5084 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5067 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/entityUserLinks")); | 5085 unittest.expect(path.substring(pathOffset, pathOffset + 16), |
| 5086 unittest.equals("/entityUserLinks")); |
| 5068 pathOffset += 16; | 5087 pathOffset += 16; |
| 5069 | 5088 |
| 5070 var query = (req.url).query; | 5089 var query = (req.url).query; |
| 5071 var queryOffset = 0; | 5090 var queryOffset = 0; |
| 5072 var queryMap = {}; | 5091 var queryMap = {}; |
| 5073 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5092 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5074 parseBool(n) { | 5093 parseBool(n) { |
| 5075 if (n == "true") return true; | 5094 if (n == "true") return true; |
| 5076 if (n == "false") return false; | 5095 if (n == "false") return false; |
| 5077 if (n == null) return null; | 5096 if (n == null) return null; |
| 5078 throw new core.ArgumentError("Invalid boolean: $n"); | 5097 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5079 } | 5098 } |
| 5099 |
| 5080 if (query.length > 0) { | 5100 if (query.length > 0) { |
| 5081 for (var part in query.split("&")) { | 5101 for (var part in query.split("&")) { |
| 5082 var keyvalue = part.split("="); | 5102 var keyvalue = part.split("="); |
| 5083 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5103 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5104 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5084 } | 5105 } |
| 5085 } | 5106 } |
| 5086 | 5107 |
| 5087 | |
| 5088 var h = { | 5108 var h = { |
| 5089 "content-type" : "application/json; charset=utf-8", | 5109 "content-type": "application/json; charset=utf-8", |
| 5090 }; | 5110 }; |
| 5091 var resp = convert.JSON.encode(buildEntityUserLink()); | 5111 var resp = convert.JSON.encode(buildEntityUserLink()); |
| 5092 return new async.Future.value(stringResponse(200, h, resp)); | 5112 return new async.Future.value(stringResponse(200, h, resp)); |
| 5093 }), true); | 5113 }), true); |
| 5094 res.insert(arg_request, arg_accountId).then(unittest.expectAsync1(((api.En
tityUserLink response) { | 5114 res |
| 5115 .insert(arg_request, arg_accountId) |
| 5116 .then(unittest.expectAsync1(((api.EntityUserLink response) { |
| 5095 checkEntityUserLink(response); | 5117 checkEntityUserLink(response); |
| 5096 }))); | 5118 }))); |
| 5097 }); | 5119 }); |
| 5098 | 5120 |
| 5099 unittest.test("method--list", () { | 5121 unittest.test("method--list", () { |
| 5100 | |
| 5101 var mock = new HttpServerMock(); | 5122 var mock = new HttpServerMock(); |
| 5102 api.ManagementAccountUserLinksResourceApi res = new api.AnalyticsApi(mock)
.management.accountUserLinks; | 5123 api.ManagementAccountUserLinksResourceApi res = |
| 5124 new api.AnalyticsApi(mock).management.accountUserLinks; |
| 5103 var arg_accountId = "foo"; | 5125 var arg_accountId = "foo"; |
| 5104 var arg_max_results = 42; | 5126 var arg_max_results = 42; |
| 5105 var arg_start_index = 42; | 5127 var arg_start_index = 42; |
| 5106 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5128 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5107 var path = (req.url).path; | 5129 var path = (req.url).path; |
| 5108 var pathOffset = 0; | 5130 var pathOffset = 0; |
| 5109 var index; | 5131 var index; |
| 5110 var subPart; | 5132 var subPart; |
| 5111 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5133 unittest.expect( |
| 5134 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5112 pathOffset += 1; | 5135 pathOffset += 1; |
| 5113 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5136 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5137 unittest.equals("analytics/v3/")); |
| 5114 pathOffset += 13; | 5138 pathOffset += 13; |
| 5115 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5139 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5140 unittest.equals("management/accounts/")); |
| 5116 pathOffset += 20; | 5141 pathOffset += 20; |
| 5117 index = path.indexOf("/entityUserLinks", pathOffset); | 5142 index = path.indexOf("/entityUserLinks", pathOffset); |
| 5118 unittest.expect(index >= 0, unittest.isTrue); | 5143 unittest.expect(index >= 0, unittest.isTrue); |
| 5119 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5144 subPart = |
| 5145 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5120 pathOffset = index; | 5146 pathOffset = index; |
| 5121 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5147 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5122 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/entityUserLinks")); | 5148 unittest.expect(path.substring(pathOffset, pathOffset + 16), |
| 5149 unittest.equals("/entityUserLinks")); |
| 5123 pathOffset += 16; | 5150 pathOffset += 16; |
| 5124 | 5151 |
| 5125 var query = (req.url).query; | 5152 var query = (req.url).query; |
| 5126 var queryOffset = 0; | 5153 var queryOffset = 0; |
| 5127 var queryMap = {}; | 5154 var queryMap = {}; |
| 5128 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5155 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5129 parseBool(n) { | 5156 parseBool(n) { |
| 5130 if (n == "true") return true; | 5157 if (n == "true") return true; |
| 5131 if (n == "false") return false; | 5158 if (n == "false") return false; |
| 5132 if (n == null) return null; | 5159 if (n == null) return null; |
| 5133 throw new core.ArgumentError("Invalid boolean: $n"); | 5160 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5134 } | 5161 } |
| 5162 |
| 5135 if (query.length > 0) { | 5163 if (query.length > 0) { |
| 5136 for (var part in query.split("&")) { | 5164 for (var part in query.split("&")) { |
| 5137 var keyvalue = part.split("="); | 5165 var keyvalue = part.split("="); |
| 5138 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5166 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5167 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5139 } | 5168 } |
| 5140 } | 5169 } |
| 5141 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 5170 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 5142 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 5171 unittest.equals(arg_max_results)); |
| 5143 | 5172 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 5173 unittest.equals(arg_start_index)); |
| 5144 | 5174 |
| 5145 var h = { | 5175 var h = { |
| 5146 "content-type" : "application/json; charset=utf-8", | 5176 "content-type": "application/json; charset=utf-8", |
| 5147 }; | 5177 }; |
| 5148 var resp = convert.JSON.encode(buildEntityUserLinks()); | 5178 var resp = convert.JSON.encode(buildEntityUserLinks()); |
| 5149 return new async.Future.value(stringResponse(200, h, resp)); | 5179 return new async.Future.value(stringResponse(200, h, resp)); |
| 5150 }), true); | 5180 }), true); |
| 5151 res.list(arg_accountId, max_results: arg_max_results, start_index: arg_sta
rt_index).then(unittest.expectAsync1(((api.EntityUserLinks response) { | 5181 res |
| 5182 .list(arg_accountId, |
| 5183 max_results: arg_max_results, start_index: arg_start_index) |
| 5184 .then(unittest.expectAsync1(((api.EntityUserLinks response) { |
| 5152 checkEntityUserLinks(response); | 5185 checkEntityUserLinks(response); |
| 5153 }))); | 5186 }))); |
| 5154 }); | 5187 }); |
| 5155 | 5188 |
| 5156 unittest.test("method--update", () { | 5189 unittest.test("method--update", () { |
| 5157 | |
| 5158 var mock = new HttpServerMock(); | 5190 var mock = new HttpServerMock(); |
| 5159 api.ManagementAccountUserLinksResourceApi res = new api.AnalyticsApi(mock)
.management.accountUserLinks; | 5191 api.ManagementAccountUserLinksResourceApi res = |
| 5192 new api.AnalyticsApi(mock).management.accountUserLinks; |
| 5160 var arg_request = buildEntityUserLink(); | 5193 var arg_request = buildEntityUserLink(); |
| 5161 var arg_accountId = "foo"; | 5194 var arg_accountId = "foo"; |
| 5162 var arg_linkId = "foo"; | 5195 var arg_linkId = "foo"; |
| 5163 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5196 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5164 var obj = new api.EntityUserLink.fromJson(json); | 5197 var obj = new api.EntityUserLink.fromJson(json); |
| 5165 checkEntityUserLink(obj); | 5198 checkEntityUserLink(obj); |
| 5166 | 5199 |
| 5167 var path = (req.url).path; | 5200 var path = (req.url).path; |
| 5168 var pathOffset = 0; | 5201 var pathOffset = 0; |
| 5169 var index; | 5202 var index; |
| 5170 var subPart; | 5203 var subPart; |
| 5171 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5204 unittest.expect( |
| 5205 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5172 pathOffset += 1; | 5206 pathOffset += 1; |
| 5173 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5207 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5208 unittest.equals("analytics/v3/")); |
| 5174 pathOffset += 13; | 5209 pathOffset += 13; |
| 5175 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5210 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5211 unittest.equals("management/accounts/")); |
| 5176 pathOffset += 20; | 5212 pathOffset += 20; |
| 5177 index = path.indexOf("/entityUserLinks/", pathOffset); | 5213 index = path.indexOf("/entityUserLinks/", pathOffset); |
| 5178 unittest.expect(index >= 0, unittest.isTrue); | 5214 unittest.expect(index >= 0, unittest.isTrue); |
| 5179 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5215 subPart = |
| 5216 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5180 pathOffset = index; | 5217 pathOffset = index; |
| 5181 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5218 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5182 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/entityUserLinks/")); | 5219 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 5220 unittest.equals("/entityUserLinks/")); |
| 5183 pathOffset += 17; | 5221 pathOffset += 17; |
| 5184 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 5222 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5185 pathOffset = path.length; | 5223 pathOffset = path.length; |
| 5186 unittest.expect(subPart, unittest.equals("$arg_linkId")); | 5224 unittest.expect(subPart, unittest.equals("$arg_linkId")); |
| 5187 | 5225 |
| 5188 var query = (req.url).query; | 5226 var query = (req.url).query; |
| 5189 var queryOffset = 0; | 5227 var queryOffset = 0; |
| 5190 var queryMap = {}; | 5228 var queryMap = {}; |
| 5191 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5229 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5192 parseBool(n) { | 5230 parseBool(n) { |
| 5193 if (n == "true") return true; | 5231 if (n == "true") return true; |
| 5194 if (n == "false") return false; | 5232 if (n == "false") return false; |
| 5195 if (n == null) return null; | 5233 if (n == null) return null; |
| 5196 throw new core.ArgumentError("Invalid boolean: $n"); | 5234 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5197 } | 5235 } |
| 5236 |
| 5198 if (query.length > 0) { | 5237 if (query.length > 0) { |
| 5199 for (var part in query.split("&")) { | 5238 for (var part in query.split("&")) { |
| 5200 var keyvalue = part.split("="); | 5239 var keyvalue = part.split("="); |
| 5201 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5240 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5241 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5202 } | 5242 } |
| 5203 } | 5243 } |
| 5204 | 5244 |
| 5205 | |
| 5206 var h = { | 5245 var h = { |
| 5207 "content-type" : "application/json; charset=utf-8", | 5246 "content-type": "application/json; charset=utf-8", |
| 5208 }; | 5247 }; |
| 5209 var resp = convert.JSON.encode(buildEntityUserLink()); | 5248 var resp = convert.JSON.encode(buildEntityUserLink()); |
| 5210 return new async.Future.value(stringResponse(200, h, resp)); | 5249 return new async.Future.value(stringResponse(200, h, resp)); |
| 5211 }), true); | 5250 }), true); |
| 5212 res.update(arg_request, arg_accountId, arg_linkId).then(unittest.expectAsy
nc1(((api.EntityUserLink response) { | 5251 res |
| 5252 .update(arg_request, arg_accountId, arg_linkId) |
| 5253 .then(unittest.expectAsync1(((api.EntityUserLink response) { |
| 5213 checkEntityUserLink(response); | 5254 checkEntityUserLink(response); |
| 5214 }))); | 5255 }))); |
| 5215 }); | 5256 }); |
| 5216 | |
| 5217 }); | 5257 }); |
| 5218 | 5258 |
| 5219 | |
| 5220 unittest.group("resource-ManagementAccountsResourceApi", () { | 5259 unittest.group("resource-ManagementAccountsResourceApi", () { |
| 5221 unittest.test("method--list", () { | 5260 unittest.test("method--list", () { |
| 5222 | |
| 5223 var mock = new HttpServerMock(); | 5261 var mock = new HttpServerMock(); |
| 5224 api.ManagementAccountsResourceApi res = new api.AnalyticsApi(mock).managem
ent.accounts; | 5262 api.ManagementAccountsResourceApi res = |
| 5263 new api.AnalyticsApi(mock).management.accounts; |
| 5225 var arg_max_results = 42; | 5264 var arg_max_results = 42; |
| 5226 var arg_start_index = 42; | 5265 var arg_start_index = 42; |
| 5227 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5266 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5228 var path = (req.url).path; | 5267 var path = (req.url).path; |
| 5229 var pathOffset = 0; | 5268 var pathOffset = 0; |
| 5230 var index; | 5269 var index; |
| 5231 var subPart; | 5270 var subPart; |
| 5232 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5271 unittest.expect( |
| 5272 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5233 pathOffset += 1; | 5273 pathOffset += 1; |
| 5234 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5274 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5275 unittest.equals("analytics/v3/")); |
| 5235 pathOffset += 13; | 5276 pathOffset += 13; |
| 5236 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("management/accounts")); | 5277 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 5278 unittest.equals("management/accounts")); |
| 5237 pathOffset += 19; | 5279 pathOffset += 19; |
| 5238 | 5280 |
| 5239 var query = (req.url).query; | 5281 var query = (req.url).query; |
| 5240 var queryOffset = 0; | 5282 var queryOffset = 0; |
| 5241 var queryMap = {}; | 5283 var queryMap = {}; |
| 5242 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5284 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5243 parseBool(n) { | 5285 parseBool(n) { |
| 5244 if (n == "true") return true; | 5286 if (n == "true") return true; |
| 5245 if (n == "false") return false; | 5287 if (n == "false") return false; |
| 5246 if (n == null) return null; | 5288 if (n == null) return null; |
| 5247 throw new core.ArgumentError("Invalid boolean: $n"); | 5289 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5248 } | 5290 } |
| 5291 |
| 5249 if (query.length > 0) { | 5292 if (query.length > 0) { |
| 5250 for (var part in query.split("&")) { | 5293 for (var part in query.split("&")) { |
| 5251 var keyvalue = part.split("="); | 5294 var keyvalue = part.split("="); |
| 5252 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5295 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5296 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5253 } | 5297 } |
| 5254 } | 5298 } |
| 5255 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 5299 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 5256 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 5300 unittest.equals(arg_max_results)); |
| 5257 | 5301 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 5302 unittest.equals(arg_start_index)); |
| 5258 | 5303 |
| 5259 var h = { | 5304 var h = { |
| 5260 "content-type" : "application/json; charset=utf-8", | 5305 "content-type": "application/json; charset=utf-8", |
| 5261 }; | 5306 }; |
| 5262 var resp = convert.JSON.encode(buildAccounts()); | 5307 var resp = convert.JSON.encode(buildAccounts()); |
| 5263 return new async.Future.value(stringResponse(200, h, resp)); | 5308 return new async.Future.value(stringResponse(200, h, resp)); |
| 5264 }), true); | 5309 }), true); |
| 5265 res.list(max_results: arg_max_results, start_index: arg_start_index).then(
unittest.expectAsync1(((api.Accounts response) { | 5310 res |
| 5311 .list(max_results: arg_max_results, start_index: arg_start_index) |
| 5312 .then(unittest.expectAsync1(((api.Accounts response) { |
| 5266 checkAccounts(response); | 5313 checkAccounts(response); |
| 5267 }))); | 5314 }))); |
| 5268 }); | 5315 }); |
| 5269 | |
| 5270 }); | 5316 }); |
| 5271 | 5317 |
| 5272 | |
| 5273 unittest.group("resource-ManagementCustomDataSourcesResourceApi", () { | 5318 unittest.group("resource-ManagementCustomDataSourcesResourceApi", () { |
| 5274 unittest.test("method--list", () { | 5319 unittest.test("method--list", () { |
| 5275 | |
| 5276 var mock = new HttpServerMock(); | 5320 var mock = new HttpServerMock(); |
| 5277 api.ManagementCustomDataSourcesResourceApi res = new api.AnalyticsApi(mock
).management.customDataSources; | 5321 api.ManagementCustomDataSourcesResourceApi res = |
| 5322 new api.AnalyticsApi(mock).management.customDataSources; |
| 5278 var arg_accountId = "foo"; | 5323 var arg_accountId = "foo"; |
| 5279 var arg_webPropertyId = "foo"; | 5324 var arg_webPropertyId = "foo"; |
| 5280 var arg_max_results = 42; | 5325 var arg_max_results = 42; |
| 5281 var arg_start_index = 42; | 5326 var arg_start_index = 42; |
| 5282 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5327 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5283 var path = (req.url).path; | 5328 var path = (req.url).path; |
| 5284 var pathOffset = 0; | 5329 var pathOffset = 0; |
| 5285 var index; | 5330 var index; |
| 5286 var subPart; | 5331 var subPart; |
| 5287 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5332 unittest.expect( |
| 5333 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5288 pathOffset += 1; | 5334 pathOffset += 1; |
| 5289 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5335 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5336 unittest.equals("analytics/v3/")); |
| 5290 pathOffset += 13; | 5337 pathOffset += 13; |
| 5291 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5338 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5339 unittest.equals("management/accounts/")); |
| 5292 pathOffset += 20; | 5340 pathOffset += 20; |
| 5293 index = path.indexOf("/webproperties/", pathOffset); | 5341 index = path.indexOf("/webproperties/", pathOffset); |
| 5294 unittest.expect(index >= 0, unittest.isTrue); | 5342 unittest.expect(index >= 0, unittest.isTrue); |
| 5295 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5343 subPart = |
| 5344 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5296 pathOffset = index; | 5345 pathOffset = index; |
| 5297 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5346 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5298 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 5347 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 5348 unittest.equals("/webproperties/")); |
| 5299 pathOffset += 15; | 5349 pathOffset += 15; |
| 5300 index = path.indexOf("/customDataSources", pathOffset); | 5350 index = path.indexOf("/customDataSources", pathOffset); |
| 5301 unittest.expect(index >= 0, unittest.isTrue); | 5351 unittest.expect(index >= 0, unittest.isTrue); |
| 5302 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5352 subPart = |
| 5353 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5303 pathOffset = index; | 5354 pathOffset = index; |
| 5304 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 5355 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 5305 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/customDataSources")); | 5356 unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 5357 unittest.equals("/customDataSources")); |
| 5306 pathOffset += 18; | 5358 pathOffset += 18; |
| 5307 | 5359 |
| 5308 var query = (req.url).query; | 5360 var query = (req.url).query; |
| 5309 var queryOffset = 0; | 5361 var queryOffset = 0; |
| 5310 var queryMap = {}; | 5362 var queryMap = {}; |
| 5311 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5363 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5312 parseBool(n) { | 5364 parseBool(n) { |
| 5313 if (n == "true") return true; | 5365 if (n == "true") return true; |
| 5314 if (n == "false") return false; | 5366 if (n == "false") return false; |
| 5315 if (n == null) return null; | 5367 if (n == null) return null; |
| 5316 throw new core.ArgumentError("Invalid boolean: $n"); | 5368 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5317 } | 5369 } |
| 5370 |
| 5318 if (query.length > 0) { | 5371 if (query.length > 0) { |
| 5319 for (var part in query.split("&")) { | 5372 for (var part in query.split("&")) { |
| 5320 var keyvalue = part.split("="); | 5373 var keyvalue = part.split("="); |
| 5321 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5374 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5375 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5322 } | 5376 } |
| 5323 } | 5377 } |
| 5324 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 5378 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 5325 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 5379 unittest.equals(arg_max_results)); |
| 5326 | 5380 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 5381 unittest.equals(arg_start_index)); |
| 5327 | 5382 |
| 5328 var h = { | 5383 var h = { |
| 5329 "content-type" : "application/json; charset=utf-8", | 5384 "content-type": "application/json; charset=utf-8", |
| 5330 }; | 5385 }; |
| 5331 var resp = convert.JSON.encode(buildCustomDataSources()); | 5386 var resp = convert.JSON.encode(buildCustomDataSources()); |
| 5332 return new async.Future.value(stringResponse(200, h, resp)); | 5387 return new async.Future.value(stringResponse(200, h, resp)); |
| 5333 }), true); | 5388 }), true); |
| 5334 res.list(arg_accountId, arg_webPropertyId, max_results: arg_max_results, s
tart_index: arg_start_index).then(unittest.expectAsync1(((api.CustomDataSources
response) { | 5389 res |
| 5390 .list(arg_accountId, arg_webPropertyId, |
| 5391 max_results: arg_max_results, start_index: arg_start_index) |
| 5392 .then(unittest.expectAsync1(((api.CustomDataSources response) { |
| 5335 checkCustomDataSources(response); | 5393 checkCustomDataSources(response); |
| 5336 }))); | 5394 }))); |
| 5337 }); | 5395 }); |
| 5338 | |
| 5339 }); | 5396 }); |
| 5340 | 5397 |
| 5341 | |
| 5342 unittest.group("resource-ManagementCustomDimensionsResourceApi", () { | 5398 unittest.group("resource-ManagementCustomDimensionsResourceApi", () { |
| 5343 unittest.test("method--get", () { | 5399 unittest.test("method--get", () { |
| 5344 | |
| 5345 var mock = new HttpServerMock(); | 5400 var mock = new HttpServerMock(); |
| 5346 api.ManagementCustomDimensionsResourceApi res = new api.AnalyticsApi(mock)
.management.customDimensions; | 5401 api.ManagementCustomDimensionsResourceApi res = |
| 5402 new api.AnalyticsApi(mock).management.customDimensions; |
| 5347 var arg_accountId = "foo"; | 5403 var arg_accountId = "foo"; |
| 5348 var arg_webPropertyId = "foo"; | 5404 var arg_webPropertyId = "foo"; |
| 5349 var arg_customDimensionId = "foo"; | 5405 var arg_customDimensionId = "foo"; |
| 5350 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5406 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5351 var path = (req.url).path; | 5407 var path = (req.url).path; |
| 5352 var pathOffset = 0; | 5408 var pathOffset = 0; |
| 5353 var index; | 5409 var index; |
| 5354 var subPart; | 5410 var subPart; |
| 5355 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5411 unittest.expect( |
| 5412 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5356 pathOffset += 1; | 5413 pathOffset += 1; |
| 5357 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5414 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5415 unittest.equals("analytics/v3/")); |
| 5358 pathOffset += 13; | 5416 pathOffset += 13; |
| 5359 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5417 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5418 unittest.equals("management/accounts/")); |
| 5360 pathOffset += 20; | 5419 pathOffset += 20; |
| 5361 index = path.indexOf("/webproperties/", pathOffset); | 5420 index = path.indexOf("/webproperties/", pathOffset); |
| 5362 unittest.expect(index >= 0, unittest.isTrue); | 5421 unittest.expect(index >= 0, unittest.isTrue); |
| 5363 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5422 subPart = |
| 5423 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5364 pathOffset = index; | 5424 pathOffset = index; |
| 5365 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5425 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5366 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 5426 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 5427 unittest.equals("/webproperties/")); |
| 5367 pathOffset += 15; | 5428 pathOffset += 15; |
| 5368 index = path.indexOf("/customDimensions/", pathOffset); | 5429 index = path.indexOf("/customDimensions/", pathOffset); |
| 5369 unittest.expect(index >= 0, unittest.isTrue); | 5430 unittest.expect(index >= 0, unittest.isTrue); |
| 5370 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5431 subPart = |
| 5432 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5371 pathOffset = index; | 5433 pathOffset = index; |
| 5372 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 5434 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 5373 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/customDimensions/")); | 5435 unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 5436 unittest.equals("/customDimensions/")); |
| 5374 pathOffset += 18; | 5437 pathOffset += 18; |
| 5375 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 5438 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5376 pathOffset = path.length; | 5439 pathOffset = path.length; |
| 5377 unittest.expect(subPart, unittest.equals("$arg_customDimensionId")); | 5440 unittest.expect(subPart, unittest.equals("$arg_customDimensionId")); |
| 5378 | 5441 |
| 5379 var query = (req.url).query; | 5442 var query = (req.url).query; |
| 5380 var queryOffset = 0; | 5443 var queryOffset = 0; |
| 5381 var queryMap = {}; | 5444 var queryMap = {}; |
| 5382 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5445 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5383 parseBool(n) { | 5446 parseBool(n) { |
| 5384 if (n == "true") return true; | 5447 if (n == "true") return true; |
| 5385 if (n == "false") return false; | 5448 if (n == "false") return false; |
| 5386 if (n == null) return null; | 5449 if (n == null) return null; |
| 5387 throw new core.ArgumentError("Invalid boolean: $n"); | 5450 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5388 } | 5451 } |
| 5452 |
| 5389 if (query.length > 0) { | 5453 if (query.length > 0) { |
| 5390 for (var part in query.split("&")) { | 5454 for (var part in query.split("&")) { |
| 5391 var keyvalue = part.split("="); | 5455 var keyvalue = part.split("="); |
| 5392 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5456 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5457 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5393 } | 5458 } |
| 5394 } | 5459 } |
| 5395 | 5460 |
| 5396 | |
| 5397 var h = { | 5461 var h = { |
| 5398 "content-type" : "application/json; charset=utf-8", | 5462 "content-type": "application/json; charset=utf-8", |
| 5399 }; | 5463 }; |
| 5400 var resp = convert.JSON.encode(buildCustomDimension()); | 5464 var resp = convert.JSON.encode(buildCustomDimension()); |
| 5401 return new async.Future.value(stringResponse(200, h, resp)); | 5465 return new async.Future.value(stringResponse(200, h, resp)); |
| 5402 }), true); | 5466 }), true); |
| 5403 res.get(arg_accountId, arg_webPropertyId, arg_customDimensionId).then(unit
test.expectAsync1(((api.CustomDimension response) { | 5467 res |
| 5468 .get(arg_accountId, arg_webPropertyId, arg_customDimensionId) |
| 5469 .then(unittest.expectAsync1(((api.CustomDimension response) { |
| 5404 checkCustomDimension(response); | 5470 checkCustomDimension(response); |
| 5405 }))); | 5471 }))); |
| 5406 }); | 5472 }); |
| 5407 | 5473 |
| 5408 unittest.test("method--insert", () { | 5474 unittest.test("method--insert", () { |
| 5409 | |
| 5410 var mock = new HttpServerMock(); | 5475 var mock = new HttpServerMock(); |
| 5411 api.ManagementCustomDimensionsResourceApi res = new api.AnalyticsApi(mock)
.management.customDimensions; | 5476 api.ManagementCustomDimensionsResourceApi res = |
| 5477 new api.AnalyticsApi(mock).management.customDimensions; |
| 5412 var arg_request = buildCustomDimension(); | 5478 var arg_request = buildCustomDimension(); |
| 5413 var arg_accountId = "foo"; | 5479 var arg_accountId = "foo"; |
| 5414 var arg_webPropertyId = "foo"; | 5480 var arg_webPropertyId = "foo"; |
| 5415 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5481 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5416 var obj = new api.CustomDimension.fromJson(json); | 5482 var obj = new api.CustomDimension.fromJson(json); |
| 5417 checkCustomDimension(obj); | 5483 checkCustomDimension(obj); |
| 5418 | 5484 |
| 5419 var path = (req.url).path; | 5485 var path = (req.url).path; |
| 5420 var pathOffset = 0; | 5486 var pathOffset = 0; |
| 5421 var index; | 5487 var index; |
| 5422 var subPart; | 5488 var subPart; |
| 5423 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5489 unittest.expect( |
| 5490 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5424 pathOffset += 1; | 5491 pathOffset += 1; |
| 5425 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5492 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5493 unittest.equals("analytics/v3/")); |
| 5426 pathOffset += 13; | 5494 pathOffset += 13; |
| 5427 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5495 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5496 unittest.equals("management/accounts/")); |
| 5428 pathOffset += 20; | 5497 pathOffset += 20; |
| 5429 index = path.indexOf("/webproperties/", pathOffset); | 5498 index = path.indexOf("/webproperties/", pathOffset); |
| 5430 unittest.expect(index >= 0, unittest.isTrue); | 5499 unittest.expect(index >= 0, unittest.isTrue); |
| 5431 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5500 subPart = |
| 5501 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5432 pathOffset = index; | 5502 pathOffset = index; |
| 5433 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5503 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5434 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 5504 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 5505 unittest.equals("/webproperties/")); |
| 5435 pathOffset += 15; | 5506 pathOffset += 15; |
| 5436 index = path.indexOf("/customDimensions", pathOffset); | 5507 index = path.indexOf("/customDimensions", pathOffset); |
| 5437 unittest.expect(index >= 0, unittest.isTrue); | 5508 unittest.expect(index >= 0, unittest.isTrue); |
| 5438 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5509 subPart = |
| 5510 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5439 pathOffset = index; | 5511 pathOffset = index; |
| 5440 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 5512 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 5441 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/customDimensions")); | 5513 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 5514 unittest.equals("/customDimensions")); |
| 5442 pathOffset += 17; | 5515 pathOffset += 17; |
| 5443 | 5516 |
| 5444 var query = (req.url).query; | 5517 var query = (req.url).query; |
| 5445 var queryOffset = 0; | 5518 var queryOffset = 0; |
| 5446 var queryMap = {}; | 5519 var queryMap = {}; |
| 5447 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5520 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5448 parseBool(n) { | 5521 parseBool(n) { |
| 5449 if (n == "true") return true; | 5522 if (n == "true") return true; |
| 5450 if (n == "false") return false; | 5523 if (n == "false") return false; |
| 5451 if (n == null) return null; | 5524 if (n == null) return null; |
| 5452 throw new core.ArgumentError("Invalid boolean: $n"); | 5525 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5453 } | 5526 } |
| 5527 |
| 5454 if (query.length > 0) { | 5528 if (query.length > 0) { |
| 5455 for (var part in query.split("&")) { | 5529 for (var part in query.split("&")) { |
| 5456 var keyvalue = part.split("="); | 5530 var keyvalue = part.split("="); |
| 5457 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5531 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5532 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5458 } | 5533 } |
| 5459 } | 5534 } |
| 5460 | 5535 |
| 5461 | |
| 5462 var h = { | 5536 var h = { |
| 5463 "content-type" : "application/json; charset=utf-8", | 5537 "content-type": "application/json; charset=utf-8", |
| 5464 }; | 5538 }; |
| 5465 var resp = convert.JSON.encode(buildCustomDimension()); | 5539 var resp = convert.JSON.encode(buildCustomDimension()); |
| 5466 return new async.Future.value(stringResponse(200, h, resp)); | 5540 return new async.Future.value(stringResponse(200, h, resp)); |
| 5467 }), true); | 5541 }), true); |
| 5468 res.insert(arg_request, arg_accountId, arg_webPropertyId).then(unittest.ex
pectAsync1(((api.CustomDimension response) { | 5542 res |
| 5543 .insert(arg_request, arg_accountId, arg_webPropertyId) |
| 5544 .then(unittest.expectAsync1(((api.CustomDimension response) { |
| 5469 checkCustomDimension(response); | 5545 checkCustomDimension(response); |
| 5470 }))); | 5546 }))); |
| 5471 }); | 5547 }); |
| 5472 | 5548 |
| 5473 unittest.test("method--list", () { | 5549 unittest.test("method--list", () { |
| 5474 | |
| 5475 var mock = new HttpServerMock(); | 5550 var mock = new HttpServerMock(); |
| 5476 api.ManagementCustomDimensionsResourceApi res = new api.AnalyticsApi(mock)
.management.customDimensions; | 5551 api.ManagementCustomDimensionsResourceApi res = |
| 5552 new api.AnalyticsApi(mock).management.customDimensions; |
| 5477 var arg_accountId = "foo"; | 5553 var arg_accountId = "foo"; |
| 5478 var arg_webPropertyId = "foo"; | 5554 var arg_webPropertyId = "foo"; |
| 5479 var arg_max_results = 42; | 5555 var arg_max_results = 42; |
| 5480 var arg_start_index = 42; | 5556 var arg_start_index = 42; |
| 5481 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5557 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5482 var path = (req.url).path; | 5558 var path = (req.url).path; |
| 5483 var pathOffset = 0; | 5559 var pathOffset = 0; |
| 5484 var index; | 5560 var index; |
| 5485 var subPart; | 5561 var subPart; |
| 5486 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5562 unittest.expect( |
| 5563 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5487 pathOffset += 1; | 5564 pathOffset += 1; |
| 5488 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5565 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5566 unittest.equals("analytics/v3/")); |
| 5489 pathOffset += 13; | 5567 pathOffset += 13; |
| 5490 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5568 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5569 unittest.equals("management/accounts/")); |
| 5491 pathOffset += 20; | 5570 pathOffset += 20; |
| 5492 index = path.indexOf("/webproperties/", pathOffset); | 5571 index = path.indexOf("/webproperties/", pathOffset); |
| 5493 unittest.expect(index >= 0, unittest.isTrue); | 5572 unittest.expect(index >= 0, unittest.isTrue); |
| 5494 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5573 subPart = |
| 5574 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5495 pathOffset = index; | 5575 pathOffset = index; |
| 5496 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5576 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5497 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 5577 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 5578 unittest.equals("/webproperties/")); |
| 5498 pathOffset += 15; | 5579 pathOffset += 15; |
| 5499 index = path.indexOf("/customDimensions", pathOffset); | 5580 index = path.indexOf("/customDimensions", pathOffset); |
| 5500 unittest.expect(index >= 0, unittest.isTrue); | 5581 unittest.expect(index >= 0, unittest.isTrue); |
| 5501 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5582 subPart = |
| 5583 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5502 pathOffset = index; | 5584 pathOffset = index; |
| 5503 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 5585 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 5504 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/customDimensions")); | 5586 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 5587 unittest.equals("/customDimensions")); |
| 5505 pathOffset += 17; | 5588 pathOffset += 17; |
| 5506 | 5589 |
| 5507 var query = (req.url).query; | 5590 var query = (req.url).query; |
| 5508 var queryOffset = 0; | 5591 var queryOffset = 0; |
| 5509 var queryMap = {}; | 5592 var queryMap = {}; |
| 5510 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5593 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5511 parseBool(n) { | 5594 parseBool(n) { |
| 5512 if (n == "true") return true; | 5595 if (n == "true") return true; |
| 5513 if (n == "false") return false; | 5596 if (n == "false") return false; |
| 5514 if (n == null) return null; | 5597 if (n == null) return null; |
| 5515 throw new core.ArgumentError("Invalid boolean: $n"); | 5598 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5516 } | 5599 } |
| 5600 |
| 5517 if (query.length > 0) { | 5601 if (query.length > 0) { |
| 5518 for (var part in query.split("&")) { | 5602 for (var part in query.split("&")) { |
| 5519 var keyvalue = part.split("="); | 5603 var keyvalue = part.split("="); |
| 5520 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5604 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5605 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5521 } | 5606 } |
| 5522 } | 5607 } |
| 5523 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 5608 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 5524 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 5609 unittest.equals(arg_max_results)); |
| 5525 | 5610 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 5611 unittest.equals(arg_start_index)); |
| 5526 | 5612 |
| 5527 var h = { | 5613 var h = { |
| 5528 "content-type" : "application/json; charset=utf-8", | 5614 "content-type": "application/json; charset=utf-8", |
| 5529 }; | 5615 }; |
| 5530 var resp = convert.JSON.encode(buildCustomDimensions()); | 5616 var resp = convert.JSON.encode(buildCustomDimensions()); |
| 5531 return new async.Future.value(stringResponse(200, h, resp)); | 5617 return new async.Future.value(stringResponse(200, h, resp)); |
| 5532 }), true); | 5618 }), true); |
| 5533 res.list(arg_accountId, arg_webPropertyId, max_results: arg_max_results, s
tart_index: arg_start_index).then(unittest.expectAsync1(((api.CustomDimensions r
esponse) { | 5619 res |
| 5620 .list(arg_accountId, arg_webPropertyId, |
| 5621 max_results: arg_max_results, start_index: arg_start_index) |
| 5622 .then(unittest.expectAsync1(((api.CustomDimensions response) { |
| 5534 checkCustomDimensions(response); | 5623 checkCustomDimensions(response); |
| 5535 }))); | 5624 }))); |
| 5536 }); | 5625 }); |
| 5537 | 5626 |
| 5538 unittest.test("method--patch", () { | 5627 unittest.test("method--patch", () { |
| 5539 | |
| 5540 var mock = new HttpServerMock(); | 5628 var mock = new HttpServerMock(); |
| 5541 api.ManagementCustomDimensionsResourceApi res = new api.AnalyticsApi(mock)
.management.customDimensions; | 5629 api.ManagementCustomDimensionsResourceApi res = |
| 5630 new api.AnalyticsApi(mock).management.customDimensions; |
| 5542 var arg_request = buildCustomDimension(); | 5631 var arg_request = buildCustomDimension(); |
| 5543 var arg_accountId = "foo"; | 5632 var arg_accountId = "foo"; |
| 5544 var arg_webPropertyId = "foo"; | 5633 var arg_webPropertyId = "foo"; |
| 5545 var arg_customDimensionId = "foo"; | 5634 var arg_customDimensionId = "foo"; |
| 5546 var arg_ignoreCustomDataSourceLinks = true; | 5635 var arg_ignoreCustomDataSourceLinks = true; |
| 5547 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5636 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5548 var obj = new api.CustomDimension.fromJson(json); | 5637 var obj = new api.CustomDimension.fromJson(json); |
| 5549 checkCustomDimension(obj); | 5638 checkCustomDimension(obj); |
| 5550 | 5639 |
| 5551 var path = (req.url).path; | 5640 var path = (req.url).path; |
| 5552 var pathOffset = 0; | 5641 var pathOffset = 0; |
| 5553 var index; | 5642 var index; |
| 5554 var subPart; | 5643 var subPart; |
| 5555 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5644 unittest.expect( |
| 5645 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5556 pathOffset += 1; | 5646 pathOffset += 1; |
| 5557 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5647 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5648 unittest.equals("analytics/v3/")); |
| 5558 pathOffset += 13; | 5649 pathOffset += 13; |
| 5559 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5650 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5651 unittest.equals("management/accounts/")); |
| 5560 pathOffset += 20; | 5652 pathOffset += 20; |
| 5561 index = path.indexOf("/webproperties/", pathOffset); | 5653 index = path.indexOf("/webproperties/", pathOffset); |
| 5562 unittest.expect(index >= 0, unittest.isTrue); | 5654 unittest.expect(index >= 0, unittest.isTrue); |
| 5563 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5655 subPart = |
| 5656 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5564 pathOffset = index; | 5657 pathOffset = index; |
| 5565 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5658 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5566 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 5659 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 5660 unittest.equals("/webproperties/")); |
| 5567 pathOffset += 15; | 5661 pathOffset += 15; |
| 5568 index = path.indexOf("/customDimensions/", pathOffset); | 5662 index = path.indexOf("/customDimensions/", pathOffset); |
| 5569 unittest.expect(index >= 0, unittest.isTrue); | 5663 unittest.expect(index >= 0, unittest.isTrue); |
| 5570 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5664 subPart = |
| 5665 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5571 pathOffset = index; | 5666 pathOffset = index; |
| 5572 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 5667 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 5573 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/customDimensions/")); | 5668 unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 5669 unittest.equals("/customDimensions/")); |
| 5574 pathOffset += 18; | 5670 pathOffset += 18; |
| 5575 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 5671 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5576 pathOffset = path.length; | 5672 pathOffset = path.length; |
| 5577 unittest.expect(subPart, unittest.equals("$arg_customDimensionId")); | 5673 unittest.expect(subPart, unittest.equals("$arg_customDimensionId")); |
| 5578 | 5674 |
| 5579 var query = (req.url).query; | 5675 var query = (req.url).query; |
| 5580 var queryOffset = 0; | 5676 var queryOffset = 0; |
| 5581 var queryMap = {}; | 5677 var queryMap = {}; |
| 5582 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5678 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5583 parseBool(n) { | 5679 parseBool(n) { |
| 5584 if (n == "true") return true; | 5680 if (n == "true") return true; |
| 5585 if (n == "false") return false; | 5681 if (n == "false") return false; |
| 5586 if (n == null) return null; | 5682 if (n == null) return null; |
| 5587 throw new core.ArgumentError("Invalid boolean: $n"); | 5683 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5588 } | 5684 } |
| 5685 |
| 5589 if (query.length > 0) { | 5686 if (query.length > 0) { |
| 5590 for (var part in query.split("&")) { | 5687 for (var part in query.split("&")) { |
| 5591 var keyvalue = part.split("="); | 5688 var keyvalue = part.split("="); |
| 5592 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5689 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5690 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5593 } | 5691 } |
| 5594 } | 5692 } |
| 5595 unittest.expect(queryMap["ignoreCustomDataSourceLinks"].first, unittest.
equals("$arg_ignoreCustomDataSourceLinks")); | 5693 unittest.expect(queryMap["ignoreCustomDataSourceLinks"].first, |
| 5596 | 5694 unittest.equals("$arg_ignoreCustomDataSourceLinks")); |
| 5597 | 5695 |
| 5598 var h = { | 5696 var h = { |
| 5599 "content-type" : "application/json; charset=utf-8", | 5697 "content-type": "application/json; charset=utf-8", |
| 5600 }; | 5698 }; |
| 5601 var resp = convert.JSON.encode(buildCustomDimension()); | 5699 var resp = convert.JSON.encode(buildCustomDimension()); |
| 5602 return new async.Future.value(stringResponse(200, h, resp)); | 5700 return new async.Future.value(stringResponse(200, h, resp)); |
| 5603 }), true); | 5701 }), true); |
| 5604 res.patch(arg_request, arg_accountId, arg_webPropertyId, arg_customDimensi
onId, ignoreCustomDataSourceLinks: arg_ignoreCustomDataSourceLinks).then(unittes
t.expectAsync1(((api.CustomDimension response) { | 5702 res |
| 5703 .patch(arg_request, arg_accountId, arg_webPropertyId, |
| 5704 arg_customDimensionId, |
| 5705 ignoreCustomDataSourceLinks: arg_ignoreCustomDataSourceLinks) |
| 5706 .then(unittest.expectAsync1(((api.CustomDimension response) { |
| 5605 checkCustomDimension(response); | 5707 checkCustomDimension(response); |
| 5606 }))); | 5708 }))); |
| 5607 }); | 5709 }); |
| 5608 | 5710 |
| 5609 unittest.test("method--update", () { | 5711 unittest.test("method--update", () { |
| 5610 | |
| 5611 var mock = new HttpServerMock(); | 5712 var mock = new HttpServerMock(); |
| 5612 api.ManagementCustomDimensionsResourceApi res = new api.AnalyticsApi(mock)
.management.customDimensions; | 5713 api.ManagementCustomDimensionsResourceApi res = |
| 5714 new api.AnalyticsApi(mock).management.customDimensions; |
| 5613 var arg_request = buildCustomDimension(); | 5715 var arg_request = buildCustomDimension(); |
| 5614 var arg_accountId = "foo"; | 5716 var arg_accountId = "foo"; |
| 5615 var arg_webPropertyId = "foo"; | 5717 var arg_webPropertyId = "foo"; |
| 5616 var arg_customDimensionId = "foo"; | 5718 var arg_customDimensionId = "foo"; |
| 5617 var arg_ignoreCustomDataSourceLinks = true; | 5719 var arg_ignoreCustomDataSourceLinks = true; |
| 5618 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5720 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5619 var obj = new api.CustomDimension.fromJson(json); | 5721 var obj = new api.CustomDimension.fromJson(json); |
| 5620 checkCustomDimension(obj); | 5722 checkCustomDimension(obj); |
| 5621 | 5723 |
| 5622 var path = (req.url).path; | 5724 var path = (req.url).path; |
| 5623 var pathOffset = 0; | 5725 var pathOffset = 0; |
| 5624 var index; | 5726 var index; |
| 5625 var subPart; | 5727 var subPart; |
| 5626 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5728 unittest.expect( |
| 5729 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5627 pathOffset += 1; | 5730 pathOffset += 1; |
| 5628 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5731 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5732 unittest.equals("analytics/v3/")); |
| 5629 pathOffset += 13; | 5733 pathOffset += 13; |
| 5630 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5734 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5735 unittest.equals("management/accounts/")); |
| 5631 pathOffset += 20; | 5736 pathOffset += 20; |
| 5632 index = path.indexOf("/webproperties/", pathOffset); | 5737 index = path.indexOf("/webproperties/", pathOffset); |
| 5633 unittest.expect(index >= 0, unittest.isTrue); | 5738 unittest.expect(index >= 0, unittest.isTrue); |
| 5634 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5739 subPart = |
| 5740 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5635 pathOffset = index; | 5741 pathOffset = index; |
| 5636 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5742 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5637 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 5743 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 5744 unittest.equals("/webproperties/")); |
| 5638 pathOffset += 15; | 5745 pathOffset += 15; |
| 5639 index = path.indexOf("/customDimensions/", pathOffset); | 5746 index = path.indexOf("/customDimensions/", pathOffset); |
| 5640 unittest.expect(index >= 0, unittest.isTrue); | 5747 unittest.expect(index >= 0, unittest.isTrue); |
| 5641 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5748 subPart = |
| 5749 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5642 pathOffset = index; | 5750 pathOffset = index; |
| 5643 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 5751 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 5644 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/customDimensions/")); | 5752 unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 5753 unittest.equals("/customDimensions/")); |
| 5645 pathOffset += 18; | 5754 pathOffset += 18; |
| 5646 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 5755 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5647 pathOffset = path.length; | 5756 pathOffset = path.length; |
| 5648 unittest.expect(subPart, unittest.equals("$arg_customDimensionId")); | 5757 unittest.expect(subPart, unittest.equals("$arg_customDimensionId")); |
| 5649 | 5758 |
| 5650 var query = (req.url).query; | 5759 var query = (req.url).query; |
| 5651 var queryOffset = 0; | 5760 var queryOffset = 0; |
| 5652 var queryMap = {}; | 5761 var queryMap = {}; |
| 5653 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5762 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5654 parseBool(n) { | 5763 parseBool(n) { |
| 5655 if (n == "true") return true; | 5764 if (n == "true") return true; |
| 5656 if (n == "false") return false; | 5765 if (n == "false") return false; |
| 5657 if (n == null) return null; | 5766 if (n == null) return null; |
| 5658 throw new core.ArgumentError("Invalid boolean: $n"); | 5767 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5659 } | 5768 } |
| 5769 |
| 5660 if (query.length > 0) { | 5770 if (query.length > 0) { |
| 5661 for (var part in query.split("&")) { | 5771 for (var part in query.split("&")) { |
| 5662 var keyvalue = part.split("="); | 5772 var keyvalue = part.split("="); |
| 5663 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5773 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5774 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5664 } | 5775 } |
| 5665 } | 5776 } |
| 5666 unittest.expect(queryMap["ignoreCustomDataSourceLinks"].first, unittest.
equals("$arg_ignoreCustomDataSourceLinks")); | 5777 unittest.expect(queryMap["ignoreCustomDataSourceLinks"].first, |
| 5667 | 5778 unittest.equals("$arg_ignoreCustomDataSourceLinks")); |
| 5668 | 5779 |
| 5669 var h = { | 5780 var h = { |
| 5670 "content-type" : "application/json; charset=utf-8", | 5781 "content-type": "application/json; charset=utf-8", |
| 5671 }; | 5782 }; |
| 5672 var resp = convert.JSON.encode(buildCustomDimension()); | 5783 var resp = convert.JSON.encode(buildCustomDimension()); |
| 5673 return new async.Future.value(stringResponse(200, h, resp)); | 5784 return new async.Future.value(stringResponse(200, h, resp)); |
| 5674 }), true); | 5785 }), true); |
| 5675 res.update(arg_request, arg_accountId, arg_webPropertyId, arg_customDimens
ionId, ignoreCustomDataSourceLinks: arg_ignoreCustomDataSourceLinks).then(unitte
st.expectAsync1(((api.CustomDimension response) { | 5786 res |
| 5787 .update(arg_request, arg_accountId, arg_webPropertyId, |
| 5788 arg_customDimensionId, |
| 5789 ignoreCustomDataSourceLinks: arg_ignoreCustomDataSourceLinks) |
| 5790 .then(unittest.expectAsync1(((api.CustomDimension response) { |
| 5676 checkCustomDimension(response); | 5791 checkCustomDimension(response); |
| 5677 }))); | 5792 }))); |
| 5678 }); | 5793 }); |
| 5679 | |
| 5680 }); | 5794 }); |
| 5681 | 5795 |
| 5682 | |
| 5683 unittest.group("resource-ManagementCustomMetricsResourceApi", () { | 5796 unittest.group("resource-ManagementCustomMetricsResourceApi", () { |
| 5684 unittest.test("method--get", () { | 5797 unittest.test("method--get", () { |
| 5685 | |
| 5686 var mock = new HttpServerMock(); | 5798 var mock = new HttpServerMock(); |
| 5687 api.ManagementCustomMetricsResourceApi res = new api.AnalyticsApi(mock).ma
nagement.customMetrics; | 5799 api.ManagementCustomMetricsResourceApi res = |
| 5800 new api.AnalyticsApi(mock).management.customMetrics; |
| 5688 var arg_accountId = "foo"; | 5801 var arg_accountId = "foo"; |
| 5689 var arg_webPropertyId = "foo"; | 5802 var arg_webPropertyId = "foo"; |
| 5690 var arg_customMetricId = "foo"; | 5803 var arg_customMetricId = "foo"; |
| 5691 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5804 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5692 var path = (req.url).path; | 5805 var path = (req.url).path; |
| 5693 var pathOffset = 0; | 5806 var pathOffset = 0; |
| 5694 var index; | 5807 var index; |
| 5695 var subPart; | 5808 var subPart; |
| 5696 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5809 unittest.expect( |
| 5810 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5697 pathOffset += 1; | 5811 pathOffset += 1; |
| 5698 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5812 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5813 unittest.equals("analytics/v3/")); |
| 5699 pathOffset += 13; | 5814 pathOffset += 13; |
| 5700 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5815 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5816 unittest.equals("management/accounts/")); |
| 5701 pathOffset += 20; | 5817 pathOffset += 20; |
| 5702 index = path.indexOf("/webproperties/", pathOffset); | 5818 index = path.indexOf("/webproperties/", pathOffset); |
| 5703 unittest.expect(index >= 0, unittest.isTrue); | 5819 unittest.expect(index >= 0, unittest.isTrue); |
| 5704 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5820 subPart = |
| 5821 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5705 pathOffset = index; | 5822 pathOffset = index; |
| 5706 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5823 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5707 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 5824 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 5825 unittest.equals("/webproperties/")); |
| 5708 pathOffset += 15; | 5826 pathOffset += 15; |
| 5709 index = path.indexOf("/customMetrics/", pathOffset); | 5827 index = path.indexOf("/customMetrics/", pathOffset); |
| 5710 unittest.expect(index >= 0, unittest.isTrue); | 5828 unittest.expect(index >= 0, unittest.isTrue); |
| 5711 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5829 subPart = |
| 5830 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5712 pathOffset = index; | 5831 pathOffset = index; |
| 5713 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 5832 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 5714 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/customMetrics/")); | 5833 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 5834 unittest.equals("/customMetrics/")); |
| 5715 pathOffset += 15; | 5835 pathOffset += 15; |
| 5716 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 5836 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5717 pathOffset = path.length; | 5837 pathOffset = path.length; |
| 5718 unittest.expect(subPart, unittest.equals("$arg_customMetricId")); | 5838 unittest.expect(subPart, unittest.equals("$arg_customMetricId")); |
| 5719 | 5839 |
| 5720 var query = (req.url).query; | 5840 var query = (req.url).query; |
| 5721 var queryOffset = 0; | 5841 var queryOffset = 0; |
| 5722 var queryMap = {}; | 5842 var queryMap = {}; |
| 5723 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5843 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5724 parseBool(n) { | 5844 parseBool(n) { |
| 5725 if (n == "true") return true; | 5845 if (n == "true") return true; |
| 5726 if (n == "false") return false; | 5846 if (n == "false") return false; |
| 5727 if (n == null) return null; | 5847 if (n == null) return null; |
| 5728 throw new core.ArgumentError("Invalid boolean: $n"); | 5848 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5729 } | 5849 } |
| 5850 |
| 5730 if (query.length > 0) { | 5851 if (query.length > 0) { |
| 5731 for (var part in query.split("&")) { | 5852 for (var part in query.split("&")) { |
| 5732 var keyvalue = part.split("="); | 5853 var keyvalue = part.split("="); |
| 5733 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5854 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5855 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5734 } | 5856 } |
| 5735 } | 5857 } |
| 5736 | 5858 |
| 5737 | |
| 5738 var h = { | 5859 var h = { |
| 5739 "content-type" : "application/json; charset=utf-8", | 5860 "content-type": "application/json; charset=utf-8", |
| 5740 }; | 5861 }; |
| 5741 var resp = convert.JSON.encode(buildCustomMetric()); | 5862 var resp = convert.JSON.encode(buildCustomMetric()); |
| 5742 return new async.Future.value(stringResponse(200, h, resp)); | 5863 return new async.Future.value(stringResponse(200, h, resp)); |
| 5743 }), true); | 5864 }), true); |
| 5744 res.get(arg_accountId, arg_webPropertyId, arg_customMetricId).then(unittes
t.expectAsync1(((api.CustomMetric response) { | 5865 res |
| 5866 .get(arg_accountId, arg_webPropertyId, arg_customMetricId) |
| 5867 .then(unittest.expectAsync1(((api.CustomMetric response) { |
| 5745 checkCustomMetric(response); | 5868 checkCustomMetric(response); |
| 5746 }))); | 5869 }))); |
| 5747 }); | 5870 }); |
| 5748 | 5871 |
| 5749 unittest.test("method--insert", () { | 5872 unittest.test("method--insert", () { |
| 5750 | |
| 5751 var mock = new HttpServerMock(); | 5873 var mock = new HttpServerMock(); |
| 5752 api.ManagementCustomMetricsResourceApi res = new api.AnalyticsApi(mock).ma
nagement.customMetrics; | 5874 api.ManagementCustomMetricsResourceApi res = |
| 5875 new api.AnalyticsApi(mock).management.customMetrics; |
| 5753 var arg_request = buildCustomMetric(); | 5876 var arg_request = buildCustomMetric(); |
| 5754 var arg_accountId = "foo"; | 5877 var arg_accountId = "foo"; |
| 5755 var arg_webPropertyId = "foo"; | 5878 var arg_webPropertyId = "foo"; |
| 5756 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5879 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5757 var obj = new api.CustomMetric.fromJson(json); | 5880 var obj = new api.CustomMetric.fromJson(json); |
| 5758 checkCustomMetric(obj); | 5881 checkCustomMetric(obj); |
| 5759 | 5882 |
| 5760 var path = (req.url).path; | 5883 var path = (req.url).path; |
| 5761 var pathOffset = 0; | 5884 var pathOffset = 0; |
| 5762 var index; | 5885 var index; |
| 5763 var subPart; | 5886 var subPart; |
| 5764 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5887 unittest.expect( |
| 5888 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5765 pathOffset += 1; | 5889 pathOffset += 1; |
| 5766 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5890 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5891 unittest.equals("analytics/v3/")); |
| 5767 pathOffset += 13; | 5892 pathOffset += 13; |
| 5768 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5893 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5894 unittest.equals("management/accounts/")); |
| 5769 pathOffset += 20; | 5895 pathOffset += 20; |
| 5770 index = path.indexOf("/webproperties/", pathOffset); | 5896 index = path.indexOf("/webproperties/", pathOffset); |
| 5771 unittest.expect(index >= 0, unittest.isTrue); | 5897 unittest.expect(index >= 0, unittest.isTrue); |
| 5772 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5898 subPart = |
| 5899 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5773 pathOffset = index; | 5900 pathOffset = index; |
| 5774 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5901 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5775 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 5902 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 5903 unittest.equals("/webproperties/")); |
| 5776 pathOffset += 15; | 5904 pathOffset += 15; |
| 5777 index = path.indexOf("/customMetrics", pathOffset); | 5905 index = path.indexOf("/customMetrics", pathOffset); |
| 5778 unittest.expect(index >= 0, unittest.isTrue); | 5906 unittest.expect(index >= 0, unittest.isTrue); |
| 5779 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5907 subPart = |
| 5908 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5780 pathOffset = index; | 5909 pathOffset = index; |
| 5781 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 5910 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 5782 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/customMetrics")); | 5911 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 5912 unittest.equals("/customMetrics")); |
| 5783 pathOffset += 14; | 5913 pathOffset += 14; |
| 5784 | 5914 |
| 5785 var query = (req.url).query; | 5915 var query = (req.url).query; |
| 5786 var queryOffset = 0; | 5916 var queryOffset = 0; |
| 5787 var queryMap = {}; | 5917 var queryMap = {}; |
| 5788 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5918 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5789 parseBool(n) { | 5919 parseBool(n) { |
| 5790 if (n == "true") return true; | 5920 if (n == "true") return true; |
| 5791 if (n == "false") return false; | 5921 if (n == "false") return false; |
| 5792 if (n == null) return null; | 5922 if (n == null) return null; |
| 5793 throw new core.ArgumentError("Invalid boolean: $n"); | 5923 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5794 } | 5924 } |
| 5925 |
| 5795 if (query.length > 0) { | 5926 if (query.length > 0) { |
| 5796 for (var part in query.split("&")) { | 5927 for (var part in query.split("&")) { |
| 5797 var keyvalue = part.split("="); | 5928 var keyvalue = part.split("="); |
| 5798 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5929 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5930 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5799 } | 5931 } |
| 5800 } | 5932 } |
| 5801 | 5933 |
| 5802 | |
| 5803 var h = { | 5934 var h = { |
| 5804 "content-type" : "application/json; charset=utf-8", | 5935 "content-type": "application/json; charset=utf-8", |
| 5805 }; | 5936 }; |
| 5806 var resp = convert.JSON.encode(buildCustomMetric()); | 5937 var resp = convert.JSON.encode(buildCustomMetric()); |
| 5807 return new async.Future.value(stringResponse(200, h, resp)); | 5938 return new async.Future.value(stringResponse(200, h, resp)); |
| 5808 }), true); | 5939 }), true); |
| 5809 res.insert(arg_request, arg_accountId, arg_webPropertyId).then(unittest.ex
pectAsync1(((api.CustomMetric response) { | 5940 res |
| 5941 .insert(arg_request, arg_accountId, arg_webPropertyId) |
| 5942 .then(unittest.expectAsync1(((api.CustomMetric response) { |
| 5810 checkCustomMetric(response); | 5943 checkCustomMetric(response); |
| 5811 }))); | 5944 }))); |
| 5812 }); | 5945 }); |
| 5813 | 5946 |
| 5814 unittest.test("method--list", () { | 5947 unittest.test("method--list", () { |
| 5815 | |
| 5816 var mock = new HttpServerMock(); | 5948 var mock = new HttpServerMock(); |
| 5817 api.ManagementCustomMetricsResourceApi res = new api.AnalyticsApi(mock).ma
nagement.customMetrics; | 5949 api.ManagementCustomMetricsResourceApi res = |
| 5950 new api.AnalyticsApi(mock).management.customMetrics; |
| 5818 var arg_accountId = "foo"; | 5951 var arg_accountId = "foo"; |
| 5819 var arg_webPropertyId = "foo"; | 5952 var arg_webPropertyId = "foo"; |
| 5820 var arg_max_results = 42; | 5953 var arg_max_results = 42; |
| 5821 var arg_start_index = 42; | 5954 var arg_start_index = 42; |
| 5822 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 5955 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5823 var path = (req.url).path; | 5956 var path = (req.url).path; |
| 5824 var pathOffset = 0; | 5957 var pathOffset = 0; |
| 5825 var index; | 5958 var index; |
| 5826 var subPart; | 5959 var subPart; |
| 5827 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5960 unittest.expect( |
| 5961 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5828 pathOffset += 1; | 5962 pathOffset += 1; |
| 5829 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 5963 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5964 unittest.equals("analytics/v3/")); |
| 5830 pathOffset += 13; | 5965 pathOffset += 13; |
| 5831 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 5966 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 5967 unittest.equals("management/accounts/")); |
| 5832 pathOffset += 20; | 5968 pathOffset += 20; |
| 5833 index = path.indexOf("/webproperties/", pathOffset); | 5969 index = path.indexOf("/webproperties/", pathOffset); |
| 5834 unittest.expect(index >= 0, unittest.isTrue); | 5970 unittest.expect(index >= 0, unittest.isTrue); |
| 5835 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5971 subPart = |
| 5972 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5836 pathOffset = index; | 5973 pathOffset = index; |
| 5837 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 5974 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5838 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 5975 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 5976 unittest.equals("/webproperties/")); |
| 5839 pathOffset += 15; | 5977 pathOffset += 15; |
| 5840 index = path.indexOf("/customMetrics", pathOffset); | 5978 index = path.indexOf("/customMetrics", pathOffset); |
| 5841 unittest.expect(index >= 0, unittest.isTrue); | 5979 unittest.expect(index >= 0, unittest.isTrue); |
| 5842 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 5980 subPart = |
| 5981 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5843 pathOffset = index; | 5982 pathOffset = index; |
| 5844 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 5983 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 5845 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/customMetrics")); | 5984 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 5985 unittest.equals("/customMetrics")); |
| 5846 pathOffset += 14; | 5986 pathOffset += 14; |
| 5847 | 5987 |
| 5848 var query = (req.url).query; | 5988 var query = (req.url).query; |
| 5849 var queryOffset = 0; | 5989 var queryOffset = 0; |
| 5850 var queryMap = {}; | 5990 var queryMap = {}; |
| 5851 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 5991 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5852 parseBool(n) { | 5992 parseBool(n) { |
| 5853 if (n == "true") return true; | 5993 if (n == "true") return true; |
| 5854 if (n == "false") return false; | 5994 if (n == "false") return false; |
| 5855 if (n == null) return null; | 5995 if (n == null) return null; |
| 5856 throw new core.ArgumentError("Invalid boolean: $n"); | 5996 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5857 } | 5997 } |
| 5998 |
| 5858 if (query.length > 0) { | 5999 if (query.length > 0) { |
| 5859 for (var part in query.split("&")) { | 6000 for (var part in query.split("&")) { |
| 5860 var keyvalue = part.split("="); | 6001 var keyvalue = part.split("="); |
| 5861 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6002 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6003 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5862 } | 6004 } |
| 5863 } | 6005 } |
| 5864 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 6006 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 5865 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 6007 unittest.equals(arg_max_results)); |
| 5866 | 6008 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 6009 unittest.equals(arg_start_index)); |
| 5867 | 6010 |
| 5868 var h = { | 6011 var h = { |
| 5869 "content-type" : "application/json; charset=utf-8", | 6012 "content-type": "application/json; charset=utf-8", |
| 5870 }; | 6013 }; |
| 5871 var resp = convert.JSON.encode(buildCustomMetrics()); | 6014 var resp = convert.JSON.encode(buildCustomMetrics()); |
| 5872 return new async.Future.value(stringResponse(200, h, resp)); | 6015 return new async.Future.value(stringResponse(200, h, resp)); |
| 5873 }), true); | 6016 }), true); |
| 5874 res.list(arg_accountId, arg_webPropertyId, max_results: arg_max_results, s
tart_index: arg_start_index).then(unittest.expectAsync1(((api.CustomMetrics resp
onse) { | 6017 res |
| 6018 .list(arg_accountId, arg_webPropertyId, |
| 6019 max_results: arg_max_results, start_index: arg_start_index) |
| 6020 .then(unittest.expectAsync1(((api.CustomMetrics response) { |
| 5875 checkCustomMetrics(response); | 6021 checkCustomMetrics(response); |
| 5876 }))); | 6022 }))); |
| 5877 }); | 6023 }); |
| 5878 | 6024 |
| 5879 unittest.test("method--patch", () { | 6025 unittest.test("method--patch", () { |
| 5880 | |
| 5881 var mock = new HttpServerMock(); | 6026 var mock = new HttpServerMock(); |
| 5882 api.ManagementCustomMetricsResourceApi res = new api.AnalyticsApi(mock).ma
nagement.customMetrics; | 6027 api.ManagementCustomMetricsResourceApi res = |
| 6028 new api.AnalyticsApi(mock).management.customMetrics; |
| 5883 var arg_request = buildCustomMetric(); | 6029 var arg_request = buildCustomMetric(); |
| 5884 var arg_accountId = "foo"; | 6030 var arg_accountId = "foo"; |
| 5885 var arg_webPropertyId = "foo"; | 6031 var arg_webPropertyId = "foo"; |
| 5886 var arg_customMetricId = "foo"; | 6032 var arg_customMetricId = "foo"; |
| 5887 var arg_ignoreCustomDataSourceLinks = true; | 6033 var arg_ignoreCustomDataSourceLinks = true; |
| 5888 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6034 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5889 var obj = new api.CustomMetric.fromJson(json); | 6035 var obj = new api.CustomMetric.fromJson(json); |
| 5890 checkCustomMetric(obj); | 6036 checkCustomMetric(obj); |
| 5891 | 6037 |
| 5892 var path = (req.url).path; | 6038 var path = (req.url).path; |
| 5893 var pathOffset = 0; | 6039 var pathOffset = 0; |
| 5894 var index; | 6040 var index; |
| 5895 var subPart; | 6041 var subPart; |
| 5896 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6042 unittest.expect( |
| 6043 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5897 pathOffset += 1; | 6044 pathOffset += 1; |
| 5898 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 6045 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6046 unittest.equals("analytics/v3/")); |
| 5899 pathOffset += 13; | 6047 pathOffset += 13; |
| 5900 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 6048 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 6049 unittest.equals("management/accounts/")); |
| 5901 pathOffset += 20; | 6050 pathOffset += 20; |
| 5902 index = path.indexOf("/webproperties/", pathOffset); | 6051 index = path.indexOf("/webproperties/", pathOffset); |
| 5903 unittest.expect(index >= 0, unittest.isTrue); | 6052 unittest.expect(index >= 0, unittest.isTrue); |
| 5904 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6053 subPart = |
| 6054 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5905 pathOffset = index; | 6055 pathOffset = index; |
| 5906 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 6056 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5907 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 6057 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 6058 unittest.equals("/webproperties/")); |
| 5908 pathOffset += 15; | 6059 pathOffset += 15; |
| 5909 index = path.indexOf("/customMetrics/", pathOffset); | 6060 index = path.indexOf("/customMetrics/", pathOffset); |
| 5910 unittest.expect(index >= 0, unittest.isTrue); | 6061 unittest.expect(index >= 0, unittest.isTrue); |
| 5911 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6062 subPart = |
| 6063 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5912 pathOffset = index; | 6064 pathOffset = index; |
| 5913 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 6065 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 5914 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/customMetrics/")); | 6066 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 6067 unittest.equals("/customMetrics/")); |
| 5915 pathOffset += 15; | 6068 pathOffset += 15; |
| 5916 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 6069 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5917 pathOffset = path.length; | 6070 pathOffset = path.length; |
| 5918 unittest.expect(subPart, unittest.equals("$arg_customMetricId")); | 6071 unittest.expect(subPart, unittest.equals("$arg_customMetricId")); |
| 5919 | 6072 |
| 5920 var query = (req.url).query; | 6073 var query = (req.url).query; |
| 5921 var queryOffset = 0; | 6074 var queryOffset = 0; |
| 5922 var queryMap = {}; | 6075 var queryMap = {}; |
| 5923 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 6076 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5924 parseBool(n) { | 6077 parseBool(n) { |
| 5925 if (n == "true") return true; | 6078 if (n == "true") return true; |
| 5926 if (n == "false") return false; | 6079 if (n == "false") return false; |
| 5927 if (n == null) return null; | 6080 if (n == null) return null; |
| 5928 throw new core.ArgumentError("Invalid boolean: $n"); | 6081 throw new core.ArgumentError("Invalid boolean: $n"); |
| 5929 } | 6082 } |
| 6083 |
| 5930 if (query.length > 0) { | 6084 if (query.length > 0) { |
| 5931 for (var part in query.split("&")) { | 6085 for (var part in query.split("&")) { |
| 5932 var keyvalue = part.split("="); | 6086 var keyvalue = part.split("="); |
| 5933 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6087 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6088 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5934 } | 6089 } |
| 5935 } | 6090 } |
| 5936 unittest.expect(queryMap["ignoreCustomDataSourceLinks"].first, unittest.
equals("$arg_ignoreCustomDataSourceLinks")); | 6091 unittest.expect(queryMap["ignoreCustomDataSourceLinks"].first, |
| 5937 | 6092 unittest.equals("$arg_ignoreCustomDataSourceLinks")); |
| 5938 | 6093 |
| 5939 var h = { | 6094 var h = { |
| 5940 "content-type" : "application/json; charset=utf-8", | 6095 "content-type": "application/json; charset=utf-8", |
| 5941 }; | 6096 }; |
| 5942 var resp = convert.JSON.encode(buildCustomMetric()); | 6097 var resp = convert.JSON.encode(buildCustomMetric()); |
| 5943 return new async.Future.value(stringResponse(200, h, resp)); | 6098 return new async.Future.value(stringResponse(200, h, resp)); |
| 5944 }), true); | 6099 }), true); |
| 5945 res.patch(arg_request, arg_accountId, arg_webPropertyId, arg_customMetricI
d, ignoreCustomDataSourceLinks: arg_ignoreCustomDataSourceLinks).then(unittest.e
xpectAsync1(((api.CustomMetric response) { | 6100 res |
| 6101 .patch( |
| 6102 arg_request, arg_accountId, arg_webPropertyId, arg_customMetricId, |
| 6103 ignoreCustomDataSourceLinks: arg_ignoreCustomDataSourceLinks) |
| 6104 .then(unittest.expectAsync1(((api.CustomMetric response) { |
| 5946 checkCustomMetric(response); | 6105 checkCustomMetric(response); |
| 5947 }))); | 6106 }))); |
| 5948 }); | 6107 }); |
| 5949 | 6108 |
| 5950 unittest.test("method--update", () { | 6109 unittest.test("method--update", () { |
| 5951 | |
| 5952 var mock = new HttpServerMock(); | 6110 var mock = new HttpServerMock(); |
| 5953 api.ManagementCustomMetricsResourceApi res = new api.AnalyticsApi(mock).ma
nagement.customMetrics; | 6111 api.ManagementCustomMetricsResourceApi res = |
| 6112 new api.AnalyticsApi(mock).management.customMetrics; |
| 5954 var arg_request = buildCustomMetric(); | 6113 var arg_request = buildCustomMetric(); |
| 5955 var arg_accountId = "foo"; | 6114 var arg_accountId = "foo"; |
| 5956 var arg_webPropertyId = "foo"; | 6115 var arg_webPropertyId = "foo"; |
| 5957 var arg_customMetricId = "foo"; | 6116 var arg_customMetricId = "foo"; |
| 5958 var arg_ignoreCustomDataSourceLinks = true; | 6117 var arg_ignoreCustomDataSourceLinks = true; |
| 5959 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6118 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5960 var obj = new api.CustomMetric.fromJson(json); | 6119 var obj = new api.CustomMetric.fromJson(json); |
| 5961 checkCustomMetric(obj); | 6120 checkCustomMetric(obj); |
| 5962 | 6121 |
| 5963 var path = (req.url).path; | 6122 var path = (req.url).path; |
| 5964 var pathOffset = 0; | 6123 var pathOffset = 0; |
| 5965 var index; | 6124 var index; |
| 5966 var subPart; | 6125 var subPart; |
| 5967 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6126 unittest.expect( |
| 6127 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5968 pathOffset += 1; | 6128 pathOffset += 1; |
| 5969 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 6129 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6130 unittest.equals("analytics/v3/")); |
| 5970 pathOffset += 13; | 6131 pathOffset += 13; |
| 5971 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 6132 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 6133 unittest.equals("management/accounts/")); |
| 5972 pathOffset += 20; | 6134 pathOffset += 20; |
| 5973 index = path.indexOf("/webproperties/", pathOffset); | 6135 index = path.indexOf("/webproperties/", pathOffset); |
| 5974 unittest.expect(index >= 0, unittest.isTrue); | 6136 unittest.expect(index >= 0, unittest.isTrue); |
| 5975 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6137 subPart = |
| 6138 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5976 pathOffset = index; | 6139 pathOffset = index; |
| 5977 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 6140 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 5978 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 6141 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 6142 unittest.equals("/webproperties/")); |
| 5979 pathOffset += 15; | 6143 pathOffset += 15; |
| 5980 index = path.indexOf("/customMetrics/", pathOffset); | 6144 index = path.indexOf("/customMetrics/", pathOffset); |
| 5981 unittest.expect(index >= 0, unittest.isTrue); | 6145 unittest.expect(index >= 0, unittest.isTrue); |
| 5982 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6146 subPart = |
| 6147 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5983 pathOffset = index; | 6148 pathOffset = index; |
| 5984 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 6149 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 5985 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/customMetrics/")); | 6150 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 6151 unittest.equals("/customMetrics/")); |
| 5986 pathOffset += 15; | 6152 pathOffset += 15; |
| 5987 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 6153 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5988 pathOffset = path.length; | 6154 pathOffset = path.length; |
| 5989 unittest.expect(subPart, unittest.equals("$arg_customMetricId")); | 6155 unittest.expect(subPart, unittest.equals("$arg_customMetricId")); |
| 5990 | 6156 |
| 5991 var query = (req.url).query; | 6157 var query = (req.url).query; |
| 5992 var queryOffset = 0; | 6158 var queryOffset = 0; |
| 5993 var queryMap = {}; | 6159 var queryMap = {}; |
| 5994 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 6160 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5995 parseBool(n) { | 6161 parseBool(n) { |
| 5996 if (n == "true") return true; | 6162 if (n == "true") return true; |
| 5997 if (n == "false") return false; | 6163 if (n == "false") return false; |
| 5998 if (n == null) return null; | 6164 if (n == null) return null; |
| 5999 throw new core.ArgumentError("Invalid boolean: $n"); | 6165 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6000 } | 6166 } |
| 6167 |
| 6001 if (query.length > 0) { | 6168 if (query.length > 0) { |
| 6002 for (var part in query.split("&")) { | 6169 for (var part in query.split("&")) { |
| 6003 var keyvalue = part.split("="); | 6170 var keyvalue = part.split("="); |
| 6004 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6171 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6172 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6005 } | 6173 } |
| 6006 } | 6174 } |
| 6007 unittest.expect(queryMap["ignoreCustomDataSourceLinks"].first, unittest.
equals("$arg_ignoreCustomDataSourceLinks")); | 6175 unittest.expect(queryMap["ignoreCustomDataSourceLinks"].first, |
| 6008 | 6176 unittest.equals("$arg_ignoreCustomDataSourceLinks")); |
| 6009 | 6177 |
| 6010 var h = { | 6178 var h = { |
| 6011 "content-type" : "application/json; charset=utf-8", | 6179 "content-type": "application/json; charset=utf-8", |
| 6012 }; | 6180 }; |
| 6013 var resp = convert.JSON.encode(buildCustomMetric()); | 6181 var resp = convert.JSON.encode(buildCustomMetric()); |
| 6014 return new async.Future.value(stringResponse(200, h, resp)); | 6182 return new async.Future.value(stringResponse(200, h, resp)); |
| 6015 }), true); | 6183 }), true); |
| 6016 res.update(arg_request, arg_accountId, arg_webPropertyId, arg_customMetric
Id, ignoreCustomDataSourceLinks: arg_ignoreCustomDataSourceLinks).then(unittest.
expectAsync1(((api.CustomMetric response) { | 6184 res |
| 6185 .update( |
| 6186 arg_request, arg_accountId, arg_webPropertyId, arg_customMetricId, |
| 6187 ignoreCustomDataSourceLinks: arg_ignoreCustomDataSourceLinks) |
| 6188 .then(unittest.expectAsync1(((api.CustomMetric response) { |
| 6017 checkCustomMetric(response); | 6189 checkCustomMetric(response); |
| 6018 }))); | 6190 }))); |
| 6019 }); | 6191 }); |
| 6020 | |
| 6021 }); | 6192 }); |
| 6022 | 6193 |
| 6023 | |
| 6024 unittest.group("resource-ManagementExperimentsResourceApi", () { | 6194 unittest.group("resource-ManagementExperimentsResourceApi", () { |
| 6025 unittest.test("method--delete", () { | 6195 unittest.test("method--delete", () { |
| 6026 | |
| 6027 var mock = new HttpServerMock(); | 6196 var mock = new HttpServerMock(); |
| 6028 api.ManagementExperimentsResourceApi res = new api.AnalyticsApi(mock).mana
gement.experiments; | 6197 api.ManagementExperimentsResourceApi res = |
| 6198 new api.AnalyticsApi(mock).management.experiments; |
| 6029 var arg_accountId = "foo"; | 6199 var arg_accountId = "foo"; |
| 6030 var arg_webPropertyId = "foo"; | 6200 var arg_webPropertyId = "foo"; |
| 6031 var arg_profileId = "foo"; | 6201 var arg_profileId = "foo"; |
| 6032 var arg_experimentId = "foo"; | 6202 var arg_experimentId = "foo"; |
| 6033 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6203 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6034 var path = (req.url).path; | 6204 var path = (req.url).path; |
| 6035 var pathOffset = 0; | 6205 var pathOffset = 0; |
| 6036 var index; | 6206 var index; |
| 6037 var subPart; | 6207 var subPart; |
| 6038 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6208 unittest.expect( |
| 6209 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6039 pathOffset += 1; | 6210 pathOffset += 1; |
| 6040 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 6211 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6212 unittest.equals("analytics/v3/")); |
| 6041 pathOffset += 13; | 6213 pathOffset += 13; |
| 6042 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 6214 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 6215 unittest.equals("management/accounts/")); |
| 6043 pathOffset += 20; | 6216 pathOffset += 20; |
| 6044 index = path.indexOf("/webproperties/", pathOffset); | 6217 index = path.indexOf("/webproperties/", pathOffset); |
| 6045 unittest.expect(index >= 0, unittest.isTrue); | 6218 unittest.expect(index >= 0, unittest.isTrue); |
| 6046 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6219 subPart = |
| 6220 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6047 pathOffset = index; | 6221 pathOffset = index; |
| 6048 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 6222 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6049 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 6223 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 6224 unittest.equals("/webproperties/")); |
| 6050 pathOffset += 15; | 6225 pathOffset += 15; |
| 6051 index = path.indexOf("/profiles/", pathOffset); | 6226 index = path.indexOf("/profiles/", pathOffset); |
| 6052 unittest.expect(index >= 0, unittest.isTrue); | 6227 unittest.expect(index >= 0, unittest.isTrue); |
| 6053 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6228 subPart = |
| 6229 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6054 pathOffset = index; | 6230 pathOffset = index; |
| 6055 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 6231 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 6056 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 6232 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 6233 unittest.equals("/profiles/")); |
| 6057 pathOffset += 10; | 6234 pathOffset += 10; |
| 6058 index = path.indexOf("/experiments/", pathOffset); | 6235 index = path.indexOf("/experiments/", pathOffset); |
| 6059 unittest.expect(index >= 0, unittest.isTrue); | 6236 unittest.expect(index >= 0, unittest.isTrue); |
| 6060 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6237 subPart = |
| 6238 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6061 pathOffset = index; | 6239 pathOffset = index; |
| 6062 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 6240 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 6063 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/experiments/")); | 6241 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6242 unittest.equals("/experiments/")); |
| 6064 pathOffset += 13; | 6243 pathOffset += 13; |
| 6065 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 6244 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6066 pathOffset = path.length; | 6245 pathOffset = path.length; |
| 6067 unittest.expect(subPart, unittest.equals("$arg_experimentId")); | 6246 unittest.expect(subPart, unittest.equals("$arg_experimentId")); |
| 6068 | 6247 |
| 6069 var query = (req.url).query; | 6248 var query = (req.url).query; |
| 6070 var queryOffset = 0; | 6249 var queryOffset = 0; |
| 6071 var queryMap = {}; | 6250 var queryMap = {}; |
| 6072 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 6251 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6073 parseBool(n) { | 6252 parseBool(n) { |
| 6074 if (n == "true") return true; | 6253 if (n == "true") return true; |
| 6075 if (n == "false") return false; | 6254 if (n == "false") return false; |
| 6076 if (n == null) return null; | 6255 if (n == null) return null; |
| 6077 throw new core.ArgumentError("Invalid boolean: $n"); | 6256 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6078 } | 6257 } |
| 6258 |
| 6079 if (query.length > 0) { | 6259 if (query.length > 0) { |
| 6080 for (var part in query.split("&")) { | 6260 for (var part in query.split("&")) { |
| 6081 var keyvalue = part.split("="); | 6261 var keyvalue = part.split("="); |
| 6082 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6262 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6263 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6083 } | 6264 } |
| 6084 } | 6265 } |
| 6085 | 6266 |
| 6086 | |
| 6087 var h = { | 6267 var h = { |
| 6088 "content-type" : "application/json; charset=utf-8", | 6268 "content-type": "application/json; charset=utf-8", |
| 6089 }; | 6269 }; |
| 6090 var resp = ""; | 6270 var resp = ""; |
| 6091 return new async.Future.value(stringResponse(200, h, resp)); | 6271 return new async.Future.value(stringResponse(200, h, resp)); |
| 6092 }), true); | 6272 }), true); |
| 6093 res.delete(arg_accountId, arg_webPropertyId, arg_profileId, arg_experiment
Id).then(unittest.expectAsync1((_) {})); | 6273 res |
| 6274 .delete( |
| 6275 arg_accountId, arg_webPropertyId, arg_profileId, arg_experimentId) |
| 6276 .then(unittest.expectAsync1((_) {})); |
| 6094 }); | 6277 }); |
| 6095 | 6278 |
| 6096 unittest.test("method--get", () { | 6279 unittest.test("method--get", () { |
| 6097 | |
| 6098 var mock = new HttpServerMock(); | 6280 var mock = new HttpServerMock(); |
| 6099 api.ManagementExperimentsResourceApi res = new api.AnalyticsApi(mock).mana
gement.experiments; | 6281 api.ManagementExperimentsResourceApi res = |
| 6282 new api.AnalyticsApi(mock).management.experiments; |
| 6100 var arg_accountId = "foo"; | 6283 var arg_accountId = "foo"; |
| 6101 var arg_webPropertyId = "foo"; | 6284 var arg_webPropertyId = "foo"; |
| 6102 var arg_profileId = "foo"; | 6285 var arg_profileId = "foo"; |
| 6103 var arg_experimentId = "foo"; | 6286 var arg_experimentId = "foo"; |
| 6104 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6287 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6105 var path = (req.url).path; | 6288 var path = (req.url).path; |
| 6106 var pathOffset = 0; | 6289 var pathOffset = 0; |
| 6107 var index; | 6290 var index; |
| 6108 var subPart; | 6291 var subPart; |
| 6109 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6292 unittest.expect( |
| 6293 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6110 pathOffset += 1; | 6294 pathOffset += 1; |
| 6111 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 6295 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6296 unittest.equals("analytics/v3/")); |
| 6112 pathOffset += 13; | 6297 pathOffset += 13; |
| 6113 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 6298 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 6299 unittest.equals("management/accounts/")); |
| 6114 pathOffset += 20; | 6300 pathOffset += 20; |
| 6115 index = path.indexOf("/webproperties/", pathOffset); | 6301 index = path.indexOf("/webproperties/", pathOffset); |
| 6116 unittest.expect(index >= 0, unittest.isTrue); | 6302 unittest.expect(index >= 0, unittest.isTrue); |
| 6117 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6303 subPart = |
| 6304 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6118 pathOffset = index; | 6305 pathOffset = index; |
| 6119 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 6306 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6120 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 6307 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 6308 unittest.equals("/webproperties/")); |
| 6121 pathOffset += 15; | 6309 pathOffset += 15; |
| 6122 index = path.indexOf("/profiles/", pathOffset); | 6310 index = path.indexOf("/profiles/", pathOffset); |
| 6123 unittest.expect(index >= 0, unittest.isTrue); | 6311 unittest.expect(index >= 0, unittest.isTrue); |
| 6124 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6312 subPart = |
| 6313 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6125 pathOffset = index; | 6314 pathOffset = index; |
| 6126 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 6315 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 6127 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 6316 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 6317 unittest.equals("/profiles/")); |
| 6128 pathOffset += 10; | 6318 pathOffset += 10; |
| 6129 index = path.indexOf("/experiments/", pathOffset); | 6319 index = path.indexOf("/experiments/", pathOffset); |
| 6130 unittest.expect(index >= 0, unittest.isTrue); | 6320 unittest.expect(index >= 0, unittest.isTrue); |
| 6131 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6321 subPart = |
| 6322 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6132 pathOffset = index; | 6323 pathOffset = index; |
| 6133 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 6324 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 6134 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/experiments/")); | 6325 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6326 unittest.equals("/experiments/")); |
| 6135 pathOffset += 13; | 6327 pathOffset += 13; |
| 6136 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 6328 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6137 pathOffset = path.length; | 6329 pathOffset = path.length; |
| 6138 unittest.expect(subPart, unittest.equals("$arg_experimentId")); | 6330 unittest.expect(subPart, unittest.equals("$arg_experimentId")); |
| 6139 | 6331 |
| 6140 var query = (req.url).query; | 6332 var query = (req.url).query; |
| 6141 var queryOffset = 0; | 6333 var queryOffset = 0; |
| 6142 var queryMap = {}; | 6334 var queryMap = {}; |
| 6143 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 6335 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6144 parseBool(n) { | 6336 parseBool(n) { |
| 6145 if (n == "true") return true; | 6337 if (n == "true") return true; |
| 6146 if (n == "false") return false; | 6338 if (n == "false") return false; |
| 6147 if (n == null) return null; | 6339 if (n == null) return null; |
| 6148 throw new core.ArgumentError("Invalid boolean: $n"); | 6340 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6149 } | 6341 } |
| 6342 |
| 6150 if (query.length > 0) { | 6343 if (query.length > 0) { |
| 6151 for (var part in query.split("&")) { | 6344 for (var part in query.split("&")) { |
| 6152 var keyvalue = part.split("="); | 6345 var keyvalue = part.split("="); |
| 6153 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6346 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6347 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6154 } | 6348 } |
| 6155 } | 6349 } |
| 6156 | 6350 |
| 6157 | |
| 6158 var h = { | 6351 var h = { |
| 6159 "content-type" : "application/json; charset=utf-8", | 6352 "content-type": "application/json; charset=utf-8", |
| 6160 }; | 6353 }; |
| 6161 var resp = convert.JSON.encode(buildExperiment()); | 6354 var resp = convert.JSON.encode(buildExperiment()); |
| 6162 return new async.Future.value(stringResponse(200, h, resp)); | 6355 return new async.Future.value(stringResponse(200, h, resp)); |
| 6163 }), true); | 6356 }), true); |
| 6164 res.get(arg_accountId, arg_webPropertyId, arg_profileId, arg_experimentId)
.then(unittest.expectAsync1(((api.Experiment response) { | 6357 res |
| 6358 .get( |
| 6359 arg_accountId, arg_webPropertyId, arg_profileId, arg_experimentId) |
| 6360 .then(unittest.expectAsync1(((api.Experiment response) { |
| 6165 checkExperiment(response); | 6361 checkExperiment(response); |
| 6166 }))); | 6362 }))); |
| 6167 }); | 6363 }); |
| 6168 | 6364 |
| 6169 unittest.test("method--insert", () { | 6365 unittest.test("method--insert", () { |
| 6170 | |
| 6171 var mock = new HttpServerMock(); | 6366 var mock = new HttpServerMock(); |
| 6172 api.ManagementExperimentsResourceApi res = new api.AnalyticsApi(mock).mana
gement.experiments; | 6367 api.ManagementExperimentsResourceApi res = |
| 6368 new api.AnalyticsApi(mock).management.experiments; |
| 6173 var arg_request = buildExperiment(); | 6369 var arg_request = buildExperiment(); |
| 6174 var arg_accountId = "foo"; | 6370 var arg_accountId = "foo"; |
| 6175 var arg_webPropertyId = "foo"; | 6371 var arg_webPropertyId = "foo"; |
| 6176 var arg_profileId = "foo"; | 6372 var arg_profileId = "foo"; |
| 6177 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6373 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6178 var obj = new api.Experiment.fromJson(json); | 6374 var obj = new api.Experiment.fromJson(json); |
| 6179 checkExperiment(obj); | 6375 checkExperiment(obj); |
| 6180 | 6376 |
| 6181 var path = (req.url).path; | 6377 var path = (req.url).path; |
| 6182 var pathOffset = 0; | 6378 var pathOffset = 0; |
| 6183 var index; | 6379 var index; |
| 6184 var subPart; | 6380 var subPart; |
| 6185 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6381 unittest.expect( |
| 6382 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6186 pathOffset += 1; | 6383 pathOffset += 1; |
| 6187 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 6384 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6385 unittest.equals("analytics/v3/")); |
| 6188 pathOffset += 13; | 6386 pathOffset += 13; |
| 6189 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 6387 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 6388 unittest.equals("management/accounts/")); |
| 6190 pathOffset += 20; | 6389 pathOffset += 20; |
| 6191 index = path.indexOf("/webproperties/", pathOffset); | 6390 index = path.indexOf("/webproperties/", pathOffset); |
| 6192 unittest.expect(index >= 0, unittest.isTrue); | 6391 unittest.expect(index >= 0, unittest.isTrue); |
| 6193 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6392 subPart = |
| 6393 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6194 pathOffset = index; | 6394 pathOffset = index; |
| 6195 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 6395 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6196 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 6396 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 6397 unittest.equals("/webproperties/")); |
| 6197 pathOffset += 15; | 6398 pathOffset += 15; |
| 6198 index = path.indexOf("/profiles/", pathOffset); | 6399 index = path.indexOf("/profiles/", pathOffset); |
| 6199 unittest.expect(index >= 0, unittest.isTrue); | 6400 unittest.expect(index >= 0, unittest.isTrue); |
| 6200 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6401 subPart = |
| 6402 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6201 pathOffset = index; | 6403 pathOffset = index; |
| 6202 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 6404 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 6203 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 6405 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 6406 unittest.equals("/profiles/")); |
| 6204 pathOffset += 10; | 6407 pathOffset += 10; |
| 6205 index = path.indexOf("/experiments", pathOffset); | 6408 index = path.indexOf("/experiments", pathOffset); |
| 6206 unittest.expect(index >= 0, unittest.isTrue); | 6409 unittest.expect(index >= 0, unittest.isTrue); |
| 6207 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6410 subPart = |
| 6411 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6208 pathOffset = index; | 6412 pathOffset = index; |
| 6209 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 6413 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 6210 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/experiments")); | 6414 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 6415 unittest.equals("/experiments")); |
| 6211 pathOffset += 12; | 6416 pathOffset += 12; |
| 6212 | 6417 |
| 6213 var query = (req.url).query; | 6418 var query = (req.url).query; |
| 6214 var queryOffset = 0; | 6419 var queryOffset = 0; |
| 6215 var queryMap = {}; | 6420 var queryMap = {}; |
| 6216 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 6421 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6217 parseBool(n) { | 6422 parseBool(n) { |
| 6218 if (n == "true") return true; | 6423 if (n == "true") return true; |
| 6219 if (n == "false") return false; | 6424 if (n == "false") return false; |
| 6220 if (n == null) return null; | 6425 if (n == null) return null; |
| 6221 throw new core.ArgumentError("Invalid boolean: $n"); | 6426 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6222 } | 6427 } |
| 6428 |
| 6223 if (query.length > 0) { | 6429 if (query.length > 0) { |
| 6224 for (var part in query.split("&")) { | 6430 for (var part in query.split("&")) { |
| 6225 var keyvalue = part.split("="); | 6431 var keyvalue = part.split("="); |
| 6226 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6432 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6433 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6227 } | 6434 } |
| 6228 } | 6435 } |
| 6229 | 6436 |
| 6230 | |
| 6231 var h = { | 6437 var h = { |
| 6232 "content-type" : "application/json; charset=utf-8", | 6438 "content-type": "application/json; charset=utf-8", |
| 6233 }; | 6439 }; |
| 6234 var resp = convert.JSON.encode(buildExperiment()); | 6440 var resp = convert.JSON.encode(buildExperiment()); |
| 6235 return new async.Future.value(stringResponse(200, h, resp)); | 6441 return new async.Future.value(stringResponse(200, h, resp)); |
| 6236 }), true); | 6442 }), true); |
| 6237 res.insert(arg_request, arg_accountId, arg_webPropertyId, arg_profileId).t
hen(unittest.expectAsync1(((api.Experiment response) { | 6443 res |
| 6444 .insert(arg_request, arg_accountId, arg_webPropertyId, arg_profileId) |
| 6445 .then(unittest.expectAsync1(((api.Experiment response) { |
| 6238 checkExperiment(response); | 6446 checkExperiment(response); |
| 6239 }))); | 6447 }))); |
| 6240 }); | 6448 }); |
| 6241 | 6449 |
| 6242 unittest.test("method--list", () { | 6450 unittest.test("method--list", () { |
| 6243 | |
| 6244 var mock = new HttpServerMock(); | 6451 var mock = new HttpServerMock(); |
| 6245 api.ManagementExperimentsResourceApi res = new api.AnalyticsApi(mock).mana
gement.experiments; | 6452 api.ManagementExperimentsResourceApi res = |
| 6453 new api.AnalyticsApi(mock).management.experiments; |
| 6246 var arg_accountId = "foo"; | 6454 var arg_accountId = "foo"; |
| 6247 var arg_webPropertyId = "foo"; | 6455 var arg_webPropertyId = "foo"; |
| 6248 var arg_profileId = "foo"; | 6456 var arg_profileId = "foo"; |
| 6249 var arg_max_results = 42; | 6457 var arg_max_results = 42; |
| 6250 var arg_start_index = 42; | 6458 var arg_start_index = 42; |
| 6251 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6459 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6252 var path = (req.url).path; | 6460 var path = (req.url).path; |
| 6253 var pathOffset = 0; | 6461 var pathOffset = 0; |
| 6254 var index; | 6462 var index; |
| 6255 var subPart; | 6463 var subPart; |
| 6256 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6464 unittest.expect( |
| 6465 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6257 pathOffset += 1; | 6466 pathOffset += 1; |
| 6258 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 6467 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6468 unittest.equals("analytics/v3/")); |
| 6259 pathOffset += 13; | 6469 pathOffset += 13; |
| 6260 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 6470 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 6471 unittest.equals("management/accounts/")); |
| 6261 pathOffset += 20; | 6472 pathOffset += 20; |
| 6262 index = path.indexOf("/webproperties/", pathOffset); | 6473 index = path.indexOf("/webproperties/", pathOffset); |
| 6263 unittest.expect(index >= 0, unittest.isTrue); | 6474 unittest.expect(index >= 0, unittest.isTrue); |
| 6264 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6475 subPart = |
| 6476 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6265 pathOffset = index; | 6477 pathOffset = index; |
| 6266 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 6478 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6267 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 6479 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 6480 unittest.equals("/webproperties/")); |
| 6268 pathOffset += 15; | 6481 pathOffset += 15; |
| 6269 index = path.indexOf("/profiles/", pathOffset); | 6482 index = path.indexOf("/profiles/", pathOffset); |
| 6270 unittest.expect(index >= 0, unittest.isTrue); | 6483 unittest.expect(index >= 0, unittest.isTrue); |
| 6271 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6484 subPart = |
| 6485 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6272 pathOffset = index; | 6486 pathOffset = index; |
| 6273 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 6487 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 6274 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 6488 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 6489 unittest.equals("/profiles/")); |
| 6275 pathOffset += 10; | 6490 pathOffset += 10; |
| 6276 index = path.indexOf("/experiments", pathOffset); | 6491 index = path.indexOf("/experiments", pathOffset); |
| 6277 unittest.expect(index >= 0, unittest.isTrue); | 6492 unittest.expect(index >= 0, unittest.isTrue); |
| 6278 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6493 subPart = |
| 6494 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6279 pathOffset = index; | 6495 pathOffset = index; |
| 6280 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 6496 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 6281 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/experiments")); | 6497 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 6498 unittest.equals("/experiments")); |
| 6282 pathOffset += 12; | 6499 pathOffset += 12; |
| 6283 | 6500 |
| 6284 var query = (req.url).query; | 6501 var query = (req.url).query; |
| 6285 var queryOffset = 0; | 6502 var queryOffset = 0; |
| 6286 var queryMap = {}; | 6503 var queryMap = {}; |
| 6287 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 6504 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6288 parseBool(n) { | 6505 parseBool(n) { |
| 6289 if (n == "true") return true; | 6506 if (n == "true") return true; |
| 6290 if (n == "false") return false; | 6507 if (n == "false") return false; |
| 6291 if (n == null) return null; | 6508 if (n == null) return null; |
| 6292 throw new core.ArgumentError("Invalid boolean: $n"); | 6509 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6293 } | 6510 } |
| 6511 |
| 6294 if (query.length > 0) { | 6512 if (query.length > 0) { |
| 6295 for (var part in query.split("&")) { | 6513 for (var part in query.split("&")) { |
| 6296 var keyvalue = part.split("="); | 6514 var keyvalue = part.split("="); |
| 6297 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6515 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6516 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6298 } | 6517 } |
| 6299 } | 6518 } |
| 6300 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 6519 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 6301 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 6520 unittest.equals(arg_max_results)); |
| 6302 | 6521 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 6522 unittest.equals(arg_start_index)); |
| 6303 | 6523 |
| 6304 var h = { | 6524 var h = { |
| 6305 "content-type" : "application/json; charset=utf-8", | 6525 "content-type": "application/json; charset=utf-8", |
| 6306 }; | 6526 }; |
| 6307 var resp = convert.JSON.encode(buildExperiments()); | 6527 var resp = convert.JSON.encode(buildExperiments()); |
| 6308 return new async.Future.value(stringResponse(200, h, resp)); | 6528 return new async.Future.value(stringResponse(200, h, resp)); |
| 6309 }), true); | 6529 }), true); |
| 6310 res.list(arg_accountId, arg_webPropertyId, arg_profileId, max_results: arg
_max_results, start_index: arg_start_index).then(unittest.expectAsync1(((api.Exp
eriments response) { | 6530 res |
| 6531 .list(arg_accountId, arg_webPropertyId, arg_profileId, |
| 6532 max_results: arg_max_results, start_index: arg_start_index) |
| 6533 .then(unittest.expectAsync1(((api.Experiments response) { |
| 6311 checkExperiments(response); | 6534 checkExperiments(response); |
| 6312 }))); | 6535 }))); |
| 6313 }); | 6536 }); |
| 6314 | 6537 |
| 6315 unittest.test("method--patch", () { | 6538 unittest.test("method--patch", () { |
| 6316 | |
| 6317 var mock = new HttpServerMock(); | 6539 var mock = new HttpServerMock(); |
| 6318 api.ManagementExperimentsResourceApi res = new api.AnalyticsApi(mock).mana
gement.experiments; | 6540 api.ManagementExperimentsResourceApi res = |
| 6541 new api.AnalyticsApi(mock).management.experiments; |
| 6319 var arg_request = buildExperiment(); | 6542 var arg_request = buildExperiment(); |
| 6320 var arg_accountId = "foo"; | 6543 var arg_accountId = "foo"; |
| 6321 var arg_webPropertyId = "foo"; | 6544 var arg_webPropertyId = "foo"; |
| 6322 var arg_profileId = "foo"; | 6545 var arg_profileId = "foo"; |
| 6323 var arg_experimentId = "foo"; | 6546 var arg_experimentId = "foo"; |
| 6324 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6547 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6325 var obj = new api.Experiment.fromJson(json); | 6548 var obj = new api.Experiment.fromJson(json); |
| 6326 checkExperiment(obj); | 6549 checkExperiment(obj); |
| 6327 | 6550 |
| 6328 var path = (req.url).path; | 6551 var path = (req.url).path; |
| 6329 var pathOffset = 0; | 6552 var pathOffset = 0; |
| 6330 var index; | 6553 var index; |
| 6331 var subPart; | 6554 var subPart; |
| 6332 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6555 unittest.expect( |
| 6556 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6333 pathOffset += 1; | 6557 pathOffset += 1; |
| 6334 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 6558 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6559 unittest.equals("analytics/v3/")); |
| 6335 pathOffset += 13; | 6560 pathOffset += 13; |
| 6336 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 6561 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 6562 unittest.equals("management/accounts/")); |
| 6337 pathOffset += 20; | 6563 pathOffset += 20; |
| 6338 index = path.indexOf("/webproperties/", pathOffset); | 6564 index = path.indexOf("/webproperties/", pathOffset); |
| 6339 unittest.expect(index >= 0, unittest.isTrue); | 6565 unittest.expect(index >= 0, unittest.isTrue); |
| 6340 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6566 subPart = |
| 6567 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6341 pathOffset = index; | 6568 pathOffset = index; |
| 6342 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 6569 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6343 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 6570 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 6571 unittest.equals("/webproperties/")); |
| 6344 pathOffset += 15; | 6572 pathOffset += 15; |
| 6345 index = path.indexOf("/profiles/", pathOffset); | 6573 index = path.indexOf("/profiles/", pathOffset); |
| 6346 unittest.expect(index >= 0, unittest.isTrue); | 6574 unittest.expect(index >= 0, unittest.isTrue); |
| 6347 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6575 subPart = |
| 6576 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6348 pathOffset = index; | 6577 pathOffset = index; |
| 6349 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 6578 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 6350 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 6579 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 6580 unittest.equals("/profiles/")); |
| 6351 pathOffset += 10; | 6581 pathOffset += 10; |
| 6352 index = path.indexOf("/experiments/", pathOffset); | 6582 index = path.indexOf("/experiments/", pathOffset); |
| 6353 unittest.expect(index >= 0, unittest.isTrue); | 6583 unittest.expect(index >= 0, unittest.isTrue); |
| 6354 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6584 subPart = |
| 6585 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6355 pathOffset = index; | 6586 pathOffset = index; |
| 6356 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 6587 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 6357 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/experiments/")); | 6588 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6589 unittest.equals("/experiments/")); |
| 6358 pathOffset += 13; | 6590 pathOffset += 13; |
| 6359 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 6591 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6360 pathOffset = path.length; | 6592 pathOffset = path.length; |
| 6361 unittest.expect(subPart, unittest.equals("$arg_experimentId")); | 6593 unittest.expect(subPart, unittest.equals("$arg_experimentId")); |
| 6362 | 6594 |
| 6363 var query = (req.url).query; | 6595 var query = (req.url).query; |
| 6364 var queryOffset = 0; | 6596 var queryOffset = 0; |
| 6365 var queryMap = {}; | 6597 var queryMap = {}; |
| 6366 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 6598 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6367 parseBool(n) { | 6599 parseBool(n) { |
| 6368 if (n == "true") return true; | 6600 if (n == "true") return true; |
| 6369 if (n == "false") return false; | 6601 if (n == "false") return false; |
| 6370 if (n == null) return null; | 6602 if (n == null) return null; |
| 6371 throw new core.ArgumentError("Invalid boolean: $n"); | 6603 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6372 } | 6604 } |
| 6605 |
| 6373 if (query.length > 0) { | 6606 if (query.length > 0) { |
| 6374 for (var part in query.split("&")) { | 6607 for (var part in query.split("&")) { |
| 6375 var keyvalue = part.split("="); | 6608 var keyvalue = part.split("="); |
| 6376 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6609 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6610 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6377 } | 6611 } |
| 6378 } | 6612 } |
| 6379 | 6613 |
| 6380 | |
| 6381 var h = { | 6614 var h = { |
| 6382 "content-type" : "application/json; charset=utf-8", | 6615 "content-type": "application/json; charset=utf-8", |
| 6383 }; | 6616 }; |
| 6384 var resp = convert.JSON.encode(buildExperiment()); | 6617 var resp = convert.JSON.encode(buildExperiment()); |
| 6385 return new async.Future.value(stringResponse(200, h, resp)); | 6618 return new async.Future.value(stringResponse(200, h, resp)); |
| 6386 }), true); | 6619 }), true); |
| 6387 res.patch(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, ar
g_experimentId).then(unittest.expectAsync1(((api.Experiment response) { | 6620 res |
| 6621 .patch(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, |
| 6622 arg_experimentId) |
| 6623 .then(unittest.expectAsync1(((api.Experiment response) { |
| 6388 checkExperiment(response); | 6624 checkExperiment(response); |
| 6389 }))); | 6625 }))); |
| 6390 }); | 6626 }); |
| 6391 | 6627 |
| 6392 unittest.test("method--update", () { | 6628 unittest.test("method--update", () { |
| 6393 | |
| 6394 var mock = new HttpServerMock(); | 6629 var mock = new HttpServerMock(); |
| 6395 api.ManagementExperimentsResourceApi res = new api.AnalyticsApi(mock).mana
gement.experiments; | 6630 api.ManagementExperimentsResourceApi res = |
| 6631 new api.AnalyticsApi(mock).management.experiments; |
| 6396 var arg_request = buildExperiment(); | 6632 var arg_request = buildExperiment(); |
| 6397 var arg_accountId = "foo"; | 6633 var arg_accountId = "foo"; |
| 6398 var arg_webPropertyId = "foo"; | 6634 var arg_webPropertyId = "foo"; |
| 6399 var arg_profileId = "foo"; | 6635 var arg_profileId = "foo"; |
| 6400 var arg_experimentId = "foo"; | 6636 var arg_experimentId = "foo"; |
| 6401 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6637 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6402 var obj = new api.Experiment.fromJson(json); | 6638 var obj = new api.Experiment.fromJson(json); |
| 6403 checkExperiment(obj); | 6639 checkExperiment(obj); |
| 6404 | 6640 |
| 6405 var path = (req.url).path; | 6641 var path = (req.url).path; |
| 6406 var pathOffset = 0; | 6642 var pathOffset = 0; |
| 6407 var index; | 6643 var index; |
| 6408 var subPart; | 6644 var subPart; |
| 6409 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6645 unittest.expect( |
| 6646 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6410 pathOffset += 1; | 6647 pathOffset += 1; |
| 6411 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 6648 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6649 unittest.equals("analytics/v3/")); |
| 6412 pathOffset += 13; | 6650 pathOffset += 13; |
| 6413 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 6651 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 6652 unittest.equals("management/accounts/")); |
| 6414 pathOffset += 20; | 6653 pathOffset += 20; |
| 6415 index = path.indexOf("/webproperties/", pathOffset); | 6654 index = path.indexOf("/webproperties/", pathOffset); |
| 6416 unittest.expect(index >= 0, unittest.isTrue); | 6655 unittest.expect(index >= 0, unittest.isTrue); |
| 6417 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6656 subPart = |
| 6657 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6418 pathOffset = index; | 6658 pathOffset = index; |
| 6419 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 6659 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6420 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 6660 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 6661 unittest.equals("/webproperties/")); |
| 6421 pathOffset += 15; | 6662 pathOffset += 15; |
| 6422 index = path.indexOf("/profiles/", pathOffset); | 6663 index = path.indexOf("/profiles/", pathOffset); |
| 6423 unittest.expect(index >= 0, unittest.isTrue); | 6664 unittest.expect(index >= 0, unittest.isTrue); |
| 6424 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6665 subPart = |
| 6666 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6425 pathOffset = index; | 6667 pathOffset = index; |
| 6426 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 6668 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 6427 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 6669 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 6670 unittest.equals("/profiles/")); |
| 6428 pathOffset += 10; | 6671 pathOffset += 10; |
| 6429 index = path.indexOf("/experiments/", pathOffset); | 6672 index = path.indexOf("/experiments/", pathOffset); |
| 6430 unittest.expect(index >= 0, unittest.isTrue); | 6673 unittest.expect(index >= 0, unittest.isTrue); |
| 6431 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6674 subPart = |
| 6675 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6432 pathOffset = index; | 6676 pathOffset = index; |
| 6433 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 6677 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 6434 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/experiments/")); | 6678 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6679 unittest.equals("/experiments/")); |
| 6435 pathOffset += 13; | 6680 pathOffset += 13; |
| 6436 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 6681 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6437 pathOffset = path.length; | 6682 pathOffset = path.length; |
| 6438 unittest.expect(subPart, unittest.equals("$arg_experimentId")); | 6683 unittest.expect(subPart, unittest.equals("$arg_experimentId")); |
| 6439 | 6684 |
| 6440 var query = (req.url).query; | 6685 var query = (req.url).query; |
| 6441 var queryOffset = 0; | 6686 var queryOffset = 0; |
| 6442 var queryMap = {}; | 6687 var queryMap = {}; |
| 6443 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 6688 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6444 parseBool(n) { | 6689 parseBool(n) { |
| 6445 if (n == "true") return true; | 6690 if (n == "true") return true; |
| 6446 if (n == "false") return false; | 6691 if (n == "false") return false; |
| 6447 if (n == null) return null; | 6692 if (n == null) return null; |
| 6448 throw new core.ArgumentError("Invalid boolean: $n"); | 6693 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6449 } | 6694 } |
| 6695 |
| 6450 if (query.length > 0) { | 6696 if (query.length > 0) { |
| 6451 for (var part in query.split("&")) { | 6697 for (var part in query.split("&")) { |
| 6452 var keyvalue = part.split("="); | 6698 var keyvalue = part.split("="); |
| 6453 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6699 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6700 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6454 } | 6701 } |
| 6455 } | 6702 } |
| 6456 | 6703 |
| 6457 | |
| 6458 var h = { | 6704 var h = { |
| 6459 "content-type" : "application/json; charset=utf-8", | 6705 "content-type": "application/json; charset=utf-8", |
| 6460 }; | 6706 }; |
| 6461 var resp = convert.JSON.encode(buildExperiment()); | 6707 var resp = convert.JSON.encode(buildExperiment()); |
| 6462 return new async.Future.value(stringResponse(200, h, resp)); | 6708 return new async.Future.value(stringResponse(200, h, resp)); |
| 6463 }), true); | 6709 }), true); |
| 6464 res.update(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, a
rg_experimentId).then(unittest.expectAsync1(((api.Experiment response) { | 6710 res |
| 6711 .update(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, |
| 6712 arg_experimentId) |
| 6713 .then(unittest.expectAsync1(((api.Experiment response) { |
| 6465 checkExperiment(response); | 6714 checkExperiment(response); |
| 6466 }))); | 6715 }))); |
| 6467 }); | 6716 }); |
| 6468 | |
| 6469 }); | 6717 }); |
| 6470 | 6718 |
| 6471 | |
| 6472 unittest.group("resource-ManagementFiltersResourceApi", () { | 6719 unittest.group("resource-ManagementFiltersResourceApi", () { |
| 6473 unittest.test("method--delete", () { | 6720 unittest.test("method--delete", () { |
| 6474 | |
| 6475 var mock = new HttpServerMock(); | 6721 var mock = new HttpServerMock(); |
| 6476 api.ManagementFiltersResourceApi res = new api.AnalyticsApi(mock).manageme
nt.filters; | 6722 api.ManagementFiltersResourceApi res = |
| 6723 new api.AnalyticsApi(mock).management.filters; |
| 6477 var arg_accountId = "foo"; | 6724 var arg_accountId = "foo"; |
| 6478 var arg_filterId = "foo"; | 6725 var arg_filterId = "foo"; |
| 6479 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6726 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6480 var path = (req.url).path; | 6727 var path = (req.url).path; |
| 6481 var pathOffset = 0; | 6728 var pathOffset = 0; |
| 6482 var index; | 6729 var index; |
| 6483 var subPart; | 6730 var subPart; |
| 6484 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6731 unittest.expect( |
| 6732 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6485 pathOffset += 1; | 6733 pathOffset += 1; |
| 6486 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 6734 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6735 unittest.equals("analytics/v3/")); |
| 6487 pathOffset += 13; | 6736 pathOffset += 13; |
| 6488 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 6737 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 6738 unittest.equals("management/accounts/")); |
| 6489 pathOffset += 20; | 6739 pathOffset += 20; |
| 6490 index = path.indexOf("/filters/", pathOffset); | 6740 index = path.indexOf("/filters/", pathOffset); |
| 6491 unittest.expect(index >= 0, unittest.isTrue); | 6741 unittest.expect(index >= 0, unittest.isTrue); |
| 6492 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6742 subPart = |
| 6743 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6493 pathOffset = index; | 6744 pathOffset = index; |
| 6494 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 6745 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6495 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/filters/")); | 6746 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6747 unittest.equals("/filters/")); |
| 6496 pathOffset += 9; | 6748 pathOffset += 9; |
| 6497 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 6749 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6498 pathOffset = path.length; | 6750 pathOffset = path.length; |
| 6499 unittest.expect(subPart, unittest.equals("$arg_filterId")); | 6751 unittest.expect(subPart, unittest.equals("$arg_filterId")); |
| 6500 | 6752 |
| 6501 var query = (req.url).query; | 6753 var query = (req.url).query; |
| 6502 var queryOffset = 0; | 6754 var queryOffset = 0; |
| 6503 var queryMap = {}; | 6755 var queryMap = {}; |
| 6504 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 6756 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6505 parseBool(n) { | 6757 parseBool(n) { |
| 6506 if (n == "true") return true; | 6758 if (n == "true") return true; |
| 6507 if (n == "false") return false; | 6759 if (n == "false") return false; |
| 6508 if (n == null) return null; | 6760 if (n == null) return null; |
| 6509 throw new core.ArgumentError("Invalid boolean: $n"); | 6761 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6510 } | 6762 } |
| 6763 |
| 6511 if (query.length > 0) { | 6764 if (query.length > 0) { |
| 6512 for (var part in query.split("&")) { | 6765 for (var part in query.split("&")) { |
| 6513 var keyvalue = part.split("="); | 6766 var keyvalue = part.split("="); |
| 6514 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6767 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6768 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6515 } | 6769 } |
| 6516 } | 6770 } |
| 6517 | 6771 |
| 6518 | |
| 6519 var h = { | 6772 var h = { |
| 6520 "content-type" : "application/json; charset=utf-8", | 6773 "content-type": "application/json; charset=utf-8", |
| 6521 }; | 6774 }; |
| 6522 var resp = convert.JSON.encode(buildFilter()); | 6775 var resp = convert.JSON.encode(buildFilter()); |
| 6523 return new async.Future.value(stringResponse(200, h, resp)); | 6776 return new async.Future.value(stringResponse(200, h, resp)); |
| 6524 }), true); | 6777 }), true); |
| 6525 res.delete(arg_accountId, arg_filterId).then(unittest.expectAsync1(((api.F
ilter response) { | 6778 res |
| 6779 .delete(arg_accountId, arg_filterId) |
| 6780 .then(unittest.expectAsync1(((api.Filter response) { |
| 6526 checkFilter(response); | 6781 checkFilter(response); |
| 6527 }))); | 6782 }))); |
| 6528 }); | 6783 }); |
| 6529 | 6784 |
| 6530 unittest.test("method--get", () { | 6785 unittest.test("method--get", () { |
| 6531 | |
| 6532 var mock = new HttpServerMock(); | 6786 var mock = new HttpServerMock(); |
| 6533 api.ManagementFiltersResourceApi res = new api.AnalyticsApi(mock).manageme
nt.filters; | 6787 api.ManagementFiltersResourceApi res = |
| 6788 new api.AnalyticsApi(mock).management.filters; |
| 6534 var arg_accountId = "foo"; | 6789 var arg_accountId = "foo"; |
| 6535 var arg_filterId = "foo"; | 6790 var arg_filterId = "foo"; |
| 6536 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6791 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6537 var path = (req.url).path; | 6792 var path = (req.url).path; |
| 6538 var pathOffset = 0; | 6793 var pathOffset = 0; |
| 6539 var index; | 6794 var index; |
| 6540 var subPart; | 6795 var subPart; |
| 6541 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6796 unittest.expect( |
| 6797 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6542 pathOffset += 1; | 6798 pathOffset += 1; |
| 6543 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 6799 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6800 unittest.equals("analytics/v3/")); |
| 6544 pathOffset += 13; | 6801 pathOffset += 13; |
| 6545 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 6802 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 6803 unittest.equals("management/accounts/")); |
| 6546 pathOffset += 20; | 6804 pathOffset += 20; |
| 6547 index = path.indexOf("/filters/", pathOffset); | 6805 index = path.indexOf("/filters/", pathOffset); |
| 6548 unittest.expect(index >= 0, unittest.isTrue); | 6806 unittest.expect(index >= 0, unittest.isTrue); |
| 6549 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6807 subPart = |
| 6808 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6550 pathOffset = index; | 6809 pathOffset = index; |
| 6551 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 6810 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6552 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/filters/")); | 6811 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6812 unittest.equals("/filters/")); |
| 6553 pathOffset += 9; | 6813 pathOffset += 9; |
| 6554 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 6814 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6555 pathOffset = path.length; | 6815 pathOffset = path.length; |
| 6556 unittest.expect(subPart, unittest.equals("$arg_filterId")); | 6816 unittest.expect(subPart, unittest.equals("$arg_filterId")); |
| 6557 | 6817 |
| 6558 var query = (req.url).query; | 6818 var query = (req.url).query; |
| 6559 var queryOffset = 0; | 6819 var queryOffset = 0; |
| 6560 var queryMap = {}; | 6820 var queryMap = {}; |
| 6561 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 6821 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6562 parseBool(n) { | 6822 parseBool(n) { |
| 6563 if (n == "true") return true; | 6823 if (n == "true") return true; |
| 6564 if (n == "false") return false; | 6824 if (n == "false") return false; |
| 6565 if (n == null) return null; | 6825 if (n == null) return null; |
| 6566 throw new core.ArgumentError("Invalid boolean: $n"); | 6826 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6567 } | 6827 } |
| 6828 |
| 6568 if (query.length > 0) { | 6829 if (query.length > 0) { |
| 6569 for (var part in query.split("&")) { | 6830 for (var part in query.split("&")) { |
| 6570 var keyvalue = part.split("="); | 6831 var keyvalue = part.split("="); |
| 6571 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6832 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6833 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6572 } | 6834 } |
| 6573 } | 6835 } |
| 6574 | 6836 |
| 6575 | |
| 6576 var h = { | 6837 var h = { |
| 6577 "content-type" : "application/json; charset=utf-8", | 6838 "content-type": "application/json; charset=utf-8", |
| 6578 }; | 6839 }; |
| 6579 var resp = convert.JSON.encode(buildFilter()); | 6840 var resp = convert.JSON.encode(buildFilter()); |
| 6580 return new async.Future.value(stringResponse(200, h, resp)); | 6841 return new async.Future.value(stringResponse(200, h, resp)); |
| 6581 }), true); | 6842 }), true); |
| 6582 res.get(arg_accountId, arg_filterId).then(unittest.expectAsync1(((api.Filt
er response) { | 6843 res |
| 6844 .get(arg_accountId, arg_filterId) |
| 6845 .then(unittest.expectAsync1(((api.Filter response) { |
| 6583 checkFilter(response); | 6846 checkFilter(response); |
| 6584 }))); | 6847 }))); |
| 6585 }); | 6848 }); |
| 6586 | 6849 |
| 6587 unittest.test("method--insert", () { | 6850 unittest.test("method--insert", () { |
| 6588 | |
| 6589 var mock = new HttpServerMock(); | 6851 var mock = new HttpServerMock(); |
| 6590 api.ManagementFiltersResourceApi res = new api.AnalyticsApi(mock).manageme
nt.filters; | 6852 api.ManagementFiltersResourceApi res = |
| 6853 new api.AnalyticsApi(mock).management.filters; |
| 6591 var arg_request = buildFilter(); | 6854 var arg_request = buildFilter(); |
| 6592 var arg_accountId = "foo"; | 6855 var arg_accountId = "foo"; |
| 6593 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6856 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6594 var obj = new api.Filter.fromJson(json); | 6857 var obj = new api.Filter.fromJson(json); |
| 6595 checkFilter(obj); | 6858 checkFilter(obj); |
| 6596 | 6859 |
| 6597 var path = (req.url).path; | 6860 var path = (req.url).path; |
| 6598 var pathOffset = 0; | 6861 var pathOffset = 0; |
| 6599 var index; | 6862 var index; |
| 6600 var subPart; | 6863 var subPart; |
| 6601 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6864 unittest.expect( |
| 6865 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6602 pathOffset += 1; | 6866 pathOffset += 1; |
| 6603 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 6867 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6868 unittest.equals("analytics/v3/")); |
| 6604 pathOffset += 13; | 6869 pathOffset += 13; |
| 6605 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 6870 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 6871 unittest.equals("management/accounts/")); |
| 6606 pathOffset += 20; | 6872 pathOffset += 20; |
| 6607 index = path.indexOf("/filters", pathOffset); | 6873 index = path.indexOf("/filters", pathOffset); |
| 6608 unittest.expect(index >= 0, unittest.isTrue); | 6874 unittest.expect(index >= 0, unittest.isTrue); |
| 6609 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6875 subPart = |
| 6876 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6610 pathOffset = index; | 6877 pathOffset = index; |
| 6611 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 6878 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6612 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/filters")); | 6879 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 6880 unittest.equals("/filters")); |
| 6613 pathOffset += 8; | 6881 pathOffset += 8; |
| 6614 | 6882 |
| 6615 var query = (req.url).query; | 6883 var query = (req.url).query; |
| 6616 var queryOffset = 0; | 6884 var queryOffset = 0; |
| 6617 var queryMap = {}; | 6885 var queryMap = {}; |
| 6618 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 6886 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6619 parseBool(n) { | 6887 parseBool(n) { |
| 6620 if (n == "true") return true; | 6888 if (n == "true") return true; |
| 6621 if (n == "false") return false; | 6889 if (n == "false") return false; |
| 6622 if (n == null) return null; | 6890 if (n == null) return null; |
| 6623 throw new core.ArgumentError("Invalid boolean: $n"); | 6891 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6624 } | 6892 } |
| 6893 |
| 6625 if (query.length > 0) { | 6894 if (query.length > 0) { |
| 6626 for (var part in query.split("&")) { | 6895 for (var part in query.split("&")) { |
| 6627 var keyvalue = part.split("="); | 6896 var keyvalue = part.split("="); |
| 6628 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6897 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6898 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6629 } | 6899 } |
| 6630 } | 6900 } |
| 6631 | 6901 |
| 6632 | |
| 6633 var h = { | 6902 var h = { |
| 6634 "content-type" : "application/json; charset=utf-8", | 6903 "content-type": "application/json; charset=utf-8", |
| 6635 }; | 6904 }; |
| 6636 var resp = convert.JSON.encode(buildFilter()); | 6905 var resp = convert.JSON.encode(buildFilter()); |
| 6637 return new async.Future.value(stringResponse(200, h, resp)); | 6906 return new async.Future.value(stringResponse(200, h, resp)); |
| 6638 }), true); | 6907 }), true); |
| 6639 res.insert(arg_request, arg_accountId).then(unittest.expectAsync1(((api.Fi
lter response) { | 6908 res |
| 6909 .insert(arg_request, arg_accountId) |
| 6910 .then(unittest.expectAsync1(((api.Filter response) { |
| 6640 checkFilter(response); | 6911 checkFilter(response); |
| 6641 }))); | 6912 }))); |
| 6642 }); | 6913 }); |
| 6643 | 6914 |
| 6644 unittest.test("method--list", () { | 6915 unittest.test("method--list", () { |
| 6645 | |
| 6646 var mock = new HttpServerMock(); | 6916 var mock = new HttpServerMock(); |
| 6647 api.ManagementFiltersResourceApi res = new api.AnalyticsApi(mock).manageme
nt.filters; | 6917 api.ManagementFiltersResourceApi res = |
| 6918 new api.AnalyticsApi(mock).management.filters; |
| 6648 var arg_accountId = "foo"; | 6919 var arg_accountId = "foo"; |
| 6649 var arg_max_results = 42; | 6920 var arg_max_results = 42; |
| 6650 var arg_start_index = 42; | 6921 var arg_start_index = 42; |
| 6651 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6922 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6652 var path = (req.url).path; | 6923 var path = (req.url).path; |
| 6653 var pathOffset = 0; | 6924 var pathOffset = 0; |
| 6654 var index; | 6925 var index; |
| 6655 var subPart; | 6926 var subPart; |
| 6656 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6927 unittest.expect( |
| 6928 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6657 pathOffset += 1; | 6929 pathOffset += 1; |
| 6658 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 6930 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6931 unittest.equals("analytics/v3/")); |
| 6659 pathOffset += 13; | 6932 pathOffset += 13; |
| 6660 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 6933 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 6934 unittest.equals("management/accounts/")); |
| 6661 pathOffset += 20; | 6935 pathOffset += 20; |
| 6662 index = path.indexOf("/filters", pathOffset); | 6936 index = path.indexOf("/filters", pathOffset); |
| 6663 unittest.expect(index >= 0, unittest.isTrue); | 6937 unittest.expect(index >= 0, unittest.isTrue); |
| 6664 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 6938 subPart = |
| 6939 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6665 pathOffset = index; | 6940 pathOffset = index; |
| 6666 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 6941 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6667 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/filters")); | 6942 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 6943 unittest.equals("/filters")); |
| 6668 pathOffset += 8; | 6944 pathOffset += 8; |
| 6669 | 6945 |
| 6670 var query = (req.url).query; | 6946 var query = (req.url).query; |
| 6671 var queryOffset = 0; | 6947 var queryOffset = 0; |
| 6672 var queryMap = {}; | 6948 var queryMap = {}; |
| 6673 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 6949 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6674 parseBool(n) { | 6950 parseBool(n) { |
| 6675 if (n == "true") return true; | 6951 if (n == "true") return true; |
| 6676 if (n == "false") return false; | 6952 if (n == "false") return false; |
| 6677 if (n == null) return null; | 6953 if (n == null) return null; |
| 6678 throw new core.ArgumentError("Invalid boolean: $n"); | 6954 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6679 } | 6955 } |
| 6956 |
| 6680 if (query.length > 0) { | 6957 if (query.length > 0) { |
| 6681 for (var part in query.split("&")) { | 6958 for (var part in query.split("&")) { |
| 6682 var keyvalue = part.split("="); | 6959 var keyvalue = part.split("="); |
| 6683 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 6960 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6961 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6684 } | 6962 } |
| 6685 } | 6963 } |
| 6686 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 6964 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 6687 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 6965 unittest.equals(arg_max_results)); |
| 6688 | 6966 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 6967 unittest.equals(arg_start_index)); |
| 6689 | 6968 |
| 6690 var h = { | 6969 var h = { |
| 6691 "content-type" : "application/json; charset=utf-8", | 6970 "content-type": "application/json; charset=utf-8", |
| 6692 }; | 6971 }; |
| 6693 var resp = convert.JSON.encode(buildFilters()); | 6972 var resp = convert.JSON.encode(buildFilters()); |
| 6694 return new async.Future.value(stringResponse(200, h, resp)); | 6973 return new async.Future.value(stringResponse(200, h, resp)); |
| 6695 }), true); | 6974 }), true); |
| 6696 res.list(arg_accountId, max_results: arg_max_results, start_index: arg_sta
rt_index).then(unittest.expectAsync1(((api.Filters response) { | 6975 res |
| 6976 .list(arg_accountId, |
| 6977 max_results: arg_max_results, start_index: arg_start_index) |
| 6978 .then(unittest.expectAsync1(((api.Filters response) { |
| 6697 checkFilters(response); | 6979 checkFilters(response); |
| 6698 }))); | 6980 }))); |
| 6699 }); | 6981 }); |
| 6700 | 6982 |
| 6701 unittest.test("method--patch", () { | 6983 unittest.test("method--patch", () { |
| 6702 | |
| 6703 var mock = new HttpServerMock(); | 6984 var mock = new HttpServerMock(); |
| 6704 api.ManagementFiltersResourceApi res = new api.AnalyticsApi(mock).manageme
nt.filters; | 6985 api.ManagementFiltersResourceApi res = |
| 6986 new api.AnalyticsApi(mock).management.filters; |
| 6705 var arg_request = buildFilter(); | 6987 var arg_request = buildFilter(); |
| 6706 var arg_accountId = "foo"; | 6988 var arg_accountId = "foo"; |
| 6707 var arg_filterId = "foo"; | 6989 var arg_filterId = "foo"; |
| 6708 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 6990 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6709 var obj = new api.Filter.fromJson(json); | 6991 var obj = new api.Filter.fromJson(json); |
| 6710 checkFilter(obj); | 6992 checkFilter(obj); |
| 6711 | 6993 |
| 6712 var path = (req.url).path; | 6994 var path = (req.url).path; |
| 6713 var pathOffset = 0; | 6995 var pathOffset = 0; |
| 6714 var index; | 6996 var index; |
| 6715 var subPart; | 6997 var subPart; |
| 6716 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6998 unittest.expect( |
| 6999 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6717 pathOffset += 1; | 7000 pathOffset += 1; |
| 6718 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 7001 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 7002 unittest.equals("analytics/v3/")); |
| 6719 pathOffset += 13; | 7003 pathOffset += 13; |
| 6720 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 7004 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7005 unittest.equals("management/accounts/")); |
| 6721 pathOffset += 20; | 7006 pathOffset += 20; |
| 6722 index = path.indexOf("/filters/", pathOffset); | 7007 index = path.indexOf("/filters/", pathOffset); |
| 6723 unittest.expect(index >= 0, unittest.isTrue); | 7008 unittest.expect(index >= 0, unittest.isTrue); |
| 6724 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7009 subPart = |
| 7010 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6725 pathOffset = index; | 7011 pathOffset = index; |
| 6726 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 7012 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6727 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/filters/")); | 7013 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7014 unittest.equals("/filters/")); |
| 6728 pathOffset += 9; | 7015 pathOffset += 9; |
| 6729 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 7016 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6730 pathOffset = path.length; | 7017 pathOffset = path.length; |
| 6731 unittest.expect(subPart, unittest.equals("$arg_filterId")); | 7018 unittest.expect(subPart, unittest.equals("$arg_filterId")); |
| 6732 | 7019 |
| 6733 var query = (req.url).query; | 7020 var query = (req.url).query; |
| 6734 var queryOffset = 0; | 7021 var queryOffset = 0; |
| 6735 var queryMap = {}; | 7022 var queryMap = {}; |
| 6736 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7023 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6737 parseBool(n) { | 7024 parseBool(n) { |
| 6738 if (n == "true") return true; | 7025 if (n == "true") return true; |
| 6739 if (n == "false") return false; | 7026 if (n == "false") return false; |
| 6740 if (n == null) return null; | 7027 if (n == null) return null; |
| 6741 throw new core.ArgumentError("Invalid boolean: $n"); | 7028 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6742 } | 7029 } |
| 7030 |
| 6743 if (query.length > 0) { | 7031 if (query.length > 0) { |
| 6744 for (var part in query.split("&")) { | 7032 for (var part in query.split("&")) { |
| 6745 var keyvalue = part.split("="); | 7033 var keyvalue = part.split("="); |
| 6746 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7034 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7035 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6747 } | 7036 } |
| 6748 } | 7037 } |
| 6749 | 7038 |
| 6750 | |
| 6751 var h = { | 7039 var h = { |
| 6752 "content-type" : "application/json; charset=utf-8", | 7040 "content-type": "application/json; charset=utf-8", |
| 6753 }; | 7041 }; |
| 6754 var resp = convert.JSON.encode(buildFilter()); | 7042 var resp = convert.JSON.encode(buildFilter()); |
| 6755 return new async.Future.value(stringResponse(200, h, resp)); | 7043 return new async.Future.value(stringResponse(200, h, resp)); |
| 6756 }), true); | 7044 }), true); |
| 6757 res.patch(arg_request, arg_accountId, arg_filterId).then(unittest.expectAs
ync1(((api.Filter response) { | 7045 res |
| 7046 .patch(arg_request, arg_accountId, arg_filterId) |
| 7047 .then(unittest.expectAsync1(((api.Filter response) { |
| 6758 checkFilter(response); | 7048 checkFilter(response); |
| 6759 }))); | 7049 }))); |
| 6760 }); | 7050 }); |
| 6761 | 7051 |
| 6762 unittest.test("method--update", () { | 7052 unittest.test("method--update", () { |
| 6763 | |
| 6764 var mock = new HttpServerMock(); | 7053 var mock = new HttpServerMock(); |
| 6765 api.ManagementFiltersResourceApi res = new api.AnalyticsApi(mock).manageme
nt.filters; | 7054 api.ManagementFiltersResourceApi res = |
| 7055 new api.AnalyticsApi(mock).management.filters; |
| 6766 var arg_request = buildFilter(); | 7056 var arg_request = buildFilter(); |
| 6767 var arg_accountId = "foo"; | 7057 var arg_accountId = "foo"; |
| 6768 var arg_filterId = "foo"; | 7058 var arg_filterId = "foo"; |
| 6769 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7059 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6770 var obj = new api.Filter.fromJson(json); | 7060 var obj = new api.Filter.fromJson(json); |
| 6771 checkFilter(obj); | 7061 checkFilter(obj); |
| 6772 | 7062 |
| 6773 var path = (req.url).path; | 7063 var path = (req.url).path; |
| 6774 var pathOffset = 0; | 7064 var pathOffset = 0; |
| 6775 var index; | 7065 var index; |
| 6776 var subPart; | 7066 var subPart; |
| 6777 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7067 unittest.expect( |
| 7068 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6778 pathOffset += 1; | 7069 pathOffset += 1; |
| 6779 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 7070 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 7071 unittest.equals("analytics/v3/")); |
| 6780 pathOffset += 13; | 7072 pathOffset += 13; |
| 6781 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 7073 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7074 unittest.equals("management/accounts/")); |
| 6782 pathOffset += 20; | 7075 pathOffset += 20; |
| 6783 index = path.indexOf("/filters/", pathOffset); | 7076 index = path.indexOf("/filters/", pathOffset); |
| 6784 unittest.expect(index >= 0, unittest.isTrue); | 7077 unittest.expect(index >= 0, unittest.isTrue); |
| 6785 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7078 subPart = |
| 7079 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6786 pathOffset = index; | 7080 pathOffset = index; |
| 6787 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 7081 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6788 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/filters/")); | 7082 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7083 unittest.equals("/filters/")); |
| 6789 pathOffset += 9; | 7084 pathOffset += 9; |
| 6790 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 7085 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6791 pathOffset = path.length; | 7086 pathOffset = path.length; |
| 6792 unittest.expect(subPart, unittest.equals("$arg_filterId")); | 7087 unittest.expect(subPart, unittest.equals("$arg_filterId")); |
| 6793 | 7088 |
| 6794 var query = (req.url).query; | 7089 var query = (req.url).query; |
| 6795 var queryOffset = 0; | 7090 var queryOffset = 0; |
| 6796 var queryMap = {}; | 7091 var queryMap = {}; |
| 6797 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7092 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6798 parseBool(n) { | 7093 parseBool(n) { |
| 6799 if (n == "true") return true; | 7094 if (n == "true") return true; |
| 6800 if (n == "false") return false; | 7095 if (n == "false") return false; |
| 6801 if (n == null) return null; | 7096 if (n == null) return null; |
| 6802 throw new core.ArgumentError("Invalid boolean: $n"); | 7097 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6803 } | 7098 } |
| 7099 |
| 6804 if (query.length > 0) { | 7100 if (query.length > 0) { |
| 6805 for (var part in query.split("&")) { | 7101 for (var part in query.split("&")) { |
| 6806 var keyvalue = part.split("="); | 7102 var keyvalue = part.split("="); |
| 6807 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7103 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7104 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6808 } | 7105 } |
| 6809 } | 7106 } |
| 6810 | 7107 |
| 6811 | |
| 6812 var h = { | 7108 var h = { |
| 6813 "content-type" : "application/json; charset=utf-8", | 7109 "content-type": "application/json; charset=utf-8", |
| 6814 }; | 7110 }; |
| 6815 var resp = convert.JSON.encode(buildFilter()); | 7111 var resp = convert.JSON.encode(buildFilter()); |
| 6816 return new async.Future.value(stringResponse(200, h, resp)); | 7112 return new async.Future.value(stringResponse(200, h, resp)); |
| 6817 }), true); | 7113 }), true); |
| 6818 res.update(arg_request, arg_accountId, arg_filterId).then(unittest.expectA
sync1(((api.Filter response) { | 7114 res |
| 7115 .update(arg_request, arg_accountId, arg_filterId) |
| 7116 .then(unittest.expectAsync1(((api.Filter response) { |
| 6819 checkFilter(response); | 7117 checkFilter(response); |
| 6820 }))); | 7118 }))); |
| 6821 }); | 7119 }); |
| 6822 | |
| 6823 }); | 7120 }); |
| 6824 | 7121 |
| 6825 | |
| 6826 unittest.group("resource-ManagementGoalsResourceApi", () { | 7122 unittest.group("resource-ManagementGoalsResourceApi", () { |
| 6827 unittest.test("method--get", () { | 7123 unittest.test("method--get", () { |
| 6828 | |
| 6829 var mock = new HttpServerMock(); | 7124 var mock = new HttpServerMock(); |
| 6830 api.ManagementGoalsResourceApi res = new api.AnalyticsApi(mock).management
.goals; | 7125 api.ManagementGoalsResourceApi res = |
| 7126 new api.AnalyticsApi(mock).management.goals; |
| 6831 var arg_accountId = "foo"; | 7127 var arg_accountId = "foo"; |
| 6832 var arg_webPropertyId = "foo"; | 7128 var arg_webPropertyId = "foo"; |
| 6833 var arg_profileId = "foo"; | 7129 var arg_profileId = "foo"; |
| 6834 var arg_goalId = "foo"; | 7130 var arg_goalId = "foo"; |
| 6835 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7131 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6836 var path = (req.url).path; | 7132 var path = (req.url).path; |
| 6837 var pathOffset = 0; | 7133 var pathOffset = 0; |
| 6838 var index; | 7134 var index; |
| 6839 var subPart; | 7135 var subPart; |
| 6840 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7136 unittest.expect( |
| 7137 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6841 pathOffset += 1; | 7138 pathOffset += 1; |
| 6842 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 7139 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 7140 unittest.equals("analytics/v3/")); |
| 6843 pathOffset += 13; | 7141 pathOffset += 13; |
| 6844 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 7142 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7143 unittest.equals("management/accounts/")); |
| 6845 pathOffset += 20; | 7144 pathOffset += 20; |
| 6846 index = path.indexOf("/webproperties/", pathOffset); | 7145 index = path.indexOf("/webproperties/", pathOffset); |
| 6847 unittest.expect(index >= 0, unittest.isTrue); | 7146 unittest.expect(index >= 0, unittest.isTrue); |
| 6848 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7147 subPart = |
| 7148 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6849 pathOffset = index; | 7149 pathOffset = index; |
| 6850 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 7150 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6851 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 7151 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7152 unittest.equals("/webproperties/")); |
| 6852 pathOffset += 15; | 7153 pathOffset += 15; |
| 6853 index = path.indexOf("/profiles/", pathOffset); | 7154 index = path.indexOf("/profiles/", pathOffset); |
| 6854 unittest.expect(index >= 0, unittest.isTrue); | 7155 unittest.expect(index >= 0, unittest.isTrue); |
| 6855 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7156 subPart = |
| 7157 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6856 pathOffset = index; | 7158 pathOffset = index; |
| 6857 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 7159 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 6858 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 7160 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7161 unittest.equals("/profiles/")); |
| 6859 pathOffset += 10; | 7162 pathOffset += 10; |
| 6860 index = path.indexOf("/goals/", pathOffset); | 7163 index = path.indexOf("/goals/", pathOffset); |
| 6861 unittest.expect(index >= 0, unittest.isTrue); | 7164 unittest.expect(index >= 0, unittest.isTrue); |
| 6862 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7165 subPart = |
| 7166 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6863 pathOffset = index; | 7167 pathOffset = index; |
| 6864 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 7168 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 6865 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/goals/")); | 7169 unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 7170 unittest.equals("/goals/")); |
| 6866 pathOffset += 7; | 7171 pathOffset += 7; |
| 6867 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 7172 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6868 pathOffset = path.length; | 7173 pathOffset = path.length; |
| 6869 unittest.expect(subPart, unittest.equals("$arg_goalId")); | 7174 unittest.expect(subPart, unittest.equals("$arg_goalId")); |
| 6870 | 7175 |
| 6871 var query = (req.url).query; | 7176 var query = (req.url).query; |
| 6872 var queryOffset = 0; | 7177 var queryOffset = 0; |
| 6873 var queryMap = {}; | 7178 var queryMap = {}; |
| 6874 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7179 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6875 parseBool(n) { | 7180 parseBool(n) { |
| 6876 if (n == "true") return true; | 7181 if (n == "true") return true; |
| 6877 if (n == "false") return false; | 7182 if (n == "false") return false; |
| 6878 if (n == null) return null; | 7183 if (n == null) return null; |
| 6879 throw new core.ArgumentError("Invalid boolean: $n"); | 7184 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6880 } | 7185 } |
| 7186 |
| 6881 if (query.length > 0) { | 7187 if (query.length > 0) { |
| 6882 for (var part in query.split("&")) { | 7188 for (var part in query.split("&")) { |
| 6883 var keyvalue = part.split("="); | 7189 var keyvalue = part.split("="); |
| 6884 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7190 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7191 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6885 } | 7192 } |
| 6886 } | 7193 } |
| 6887 | 7194 |
| 6888 | |
| 6889 var h = { | 7195 var h = { |
| 6890 "content-type" : "application/json; charset=utf-8", | 7196 "content-type": "application/json; charset=utf-8", |
| 6891 }; | 7197 }; |
| 6892 var resp = convert.JSON.encode(buildGoal()); | 7198 var resp = convert.JSON.encode(buildGoal()); |
| 6893 return new async.Future.value(stringResponse(200, h, resp)); | 7199 return new async.Future.value(stringResponse(200, h, resp)); |
| 6894 }), true); | 7200 }), true); |
| 6895 res.get(arg_accountId, arg_webPropertyId, arg_profileId, arg_goalId).then(
unittest.expectAsync1(((api.Goal response) { | 7201 res |
| 7202 .get(arg_accountId, arg_webPropertyId, arg_profileId, arg_goalId) |
| 7203 .then(unittest.expectAsync1(((api.Goal response) { |
| 6896 checkGoal(response); | 7204 checkGoal(response); |
| 6897 }))); | 7205 }))); |
| 6898 }); | 7206 }); |
| 6899 | 7207 |
| 6900 unittest.test("method--insert", () { | 7208 unittest.test("method--insert", () { |
| 6901 | |
| 6902 var mock = new HttpServerMock(); | 7209 var mock = new HttpServerMock(); |
| 6903 api.ManagementGoalsResourceApi res = new api.AnalyticsApi(mock).management
.goals; | 7210 api.ManagementGoalsResourceApi res = |
| 7211 new api.AnalyticsApi(mock).management.goals; |
| 6904 var arg_request = buildGoal(); | 7212 var arg_request = buildGoal(); |
| 6905 var arg_accountId = "foo"; | 7213 var arg_accountId = "foo"; |
| 6906 var arg_webPropertyId = "foo"; | 7214 var arg_webPropertyId = "foo"; |
| 6907 var arg_profileId = "foo"; | 7215 var arg_profileId = "foo"; |
| 6908 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7216 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6909 var obj = new api.Goal.fromJson(json); | 7217 var obj = new api.Goal.fromJson(json); |
| 6910 checkGoal(obj); | 7218 checkGoal(obj); |
| 6911 | 7219 |
| 6912 var path = (req.url).path; | 7220 var path = (req.url).path; |
| 6913 var pathOffset = 0; | 7221 var pathOffset = 0; |
| 6914 var index; | 7222 var index; |
| 6915 var subPart; | 7223 var subPart; |
| 6916 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7224 unittest.expect( |
| 7225 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6917 pathOffset += 1; | 7226 pathOffset += 1; |
| 6918 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 7227 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 7228 unittest.equals("analytics/v3/")); |
| 6919 pathOffset += 13; | 7229 pathOffset += 13; |
| 6920 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 7230 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7231 unittest.equals("management/accounts/")); |
| 6921 pathOffset += 20; | 7232 pathOffset += 20; |
| 6922 index = path.indexOf("/webproperties/", pathOffset); | 7233 index = path.indexOf("/webproperties/", pathOffset); |
| 6923 unittest.expect(index >= 0, unittest.isTrue); | 7234 unittest.expect(index >= 0, unittest.isTrue); |
| 6924 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7235 subPart = |
| 7236 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6925 pathOffset = index; | 7237 pathOffset = index; |
| 6926 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 7238 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6927 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 7239 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7240 unittest.equals("/webproperties/")); |
| 6928 pathOffset += 15; | 7241 pathOffset += 15; |
| 6929 index = path.indexOf("/profiles/", pathOffset); | 7242 index = path.indexOf("/profiles/", pathOffset); |
| 6930 unittest.expect(index >= 0, unittest.isTrue); | 7243 unittest.expect(index >= 0, unittest.isTrue); |
| 6931 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7244 subPart = |
| 7245 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6932 pathOffset = index; | 7246 pathOffset = index; |
| 6933 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 7247 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 6934 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 7248 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7249 unittest.equals("/profiles/")); |
| 6935 pathOffset += 10; | 7250 pathOffset += 10; |
| 6936 index = path.indexOf("/goals", pathOffset); | 7251 index = path.indexOf("/goals", pathOffset); |
| 6937 unittest.expect(index >= 0, unittest.isTrue); | 7252 unittest.expect(index >= 0, unittest.isTrue); |
| 6938 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7253 subPart = |
| 7254 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6939 pathOffset = index; | 7255 pathOffset = index; |
| 6940 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 7256 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 6941 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/goals")); | 7257 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 7258 unittest.equals("/goals")); |
| 6942 pathOffset += 6; | 7259 pathOffset += 6; |
| 6943 | 7260 |
| 6944 var query = (req.url).query; | 7261 var query = (req.url).query; |
| 6945 var queryOffset = 0; | 7262 var queryOffset = 0; |
| 6946 var queryMap = {}; | 7263 var queryMap = {}; |
| 6947 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7264 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6948 parseBool(n) { | 7265 parseBool(n) { |
| 6949 if (n == "true") return true; | 7266 if (n == "true") return true; |
| 6950 if (n == "false") return false; | 7267 if (n == "false") return false; |
| 6951 if (n == null) return null; | 7268 if (n == null) return null; |
| 6952 throw new core.ArgumentError("Invalid boolean: $n"); | 7269 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6953 } | 7270 } |
| 7271 |
| 6954 if (query.length > 0) { | 7272 if (query.length > 0) { |
| 6955 for (var part in query.split("&")) { | 7273 for (var part in query.split("&")) { |
| 6956 var keyvalue = part.split("="); | 7274 var keyvalue = part.split("="); |
| 6957 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7275 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7276 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6958 } | 7277 } |
| 6959 } | 7278 } |
| 6960 | 7279 |
| 6961 | |
| 6962 var h = { | 7280 var h = { |
| 6963 "content-type" : "application/json; charset=utf-8", | 7281 "content-type": "application/json; charset=utf-8", |
| 6964 }; | 7282 }; |
| 6965 var resp = convert.JSON.encode(buildGoal()); | 7283 var resp = convert.JSON.encode(buildGoal()); |
| 6966 return new async.Future.value(stringResponse(200, h, resp)); | 7284 return new async.Future.value(stringResponse(200, h, resp)); |
| 6967 }), true); | 7285 }), true); |
| 6968 res.insert(arg_request, arg_accountId, arg_webPropertyId, arg_profileId).t
hen(unittest.expectAsync1(((api.Goal response) { | 7286 res |
| 7287 .insert(arg_request, arg_accountId, arg_webPropertyId, arg_profileId) |
| 7288 .then(unittest.expectAsync1(((api.Goal response) { |
| 6969 checkGoal(response); | 7289 checkGoal(response); |
| 6970 }))); | 7290 }))); |
| 6971 }); | 7291 }); |
| 6972 | 7292 |
| 6973 unittest.test("method--list", () { | 7293 unittest.test("method--list", () { |
| 6974 | |
| 6975 var mock = new HttpServerMock(); | 7294 var mock = new HttpServerMock(); |
| 6976 api.ManagementGoalsResourceApi res = new api.AnalyticsApi(mock).management
.goals; | 7295 api.ManagementGoalsResourceApi res = |
| 7296 new api.AnalyticsApi(mock).management.goals; |
| 6977 var arg_accountId = "foo"; | 7297 var arg_accountId = "foo"; |
| 6978 var arg_webPropertyId = "foo"; | 7298 var arg_webPropertyId = "foo"; |
| 6979 var arg_profileId = "foo"; | 7299 var arg_profileId = "foo"; |
| 6980 var arg_max_results = 42; | 7300 var arg_max_results = 42; |
| 6981 var arg_start_index = 42; | 7301 var arg_start_index = 42; |
| 6982 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7302 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6983 var path = (req.url).path; | 7303 var path = (req.url).path; |
| 6984 var pathOffset = 0; | 7304 var pathOffset = 0; |
| 6985 var index; | 7305 var index; |
| 6986 var subPart; | 7306 var subPart; |
| 6987 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7307 unittest.expect( |
| 7308 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6988 pathOffset += 1; | 7309 pathOffset += 1; |
| 6989 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 7310 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 7311 unittest.equals("analytics/v3/")); |
| 6990 pathOffset += 13; | 7312 pathOffset += 13; |
| 6991 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 7313 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7314 unittest.equals("management/accounts/")); |
| 6992 pathOffset += 20; | 7315 pathOffset += 20; |
| 6993 index = path.indexOf("/webproperties/", pathOffset); | 7316 index = path.indexOf("/webproperties/", pathOffset); |
| 6994 unittest.expect(index >= 0, unittest.isTrue); | 7317 unittest.expect(index >= 0, unittest.isTrue); |
| 6995 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7318 subPart = |
| 7319 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6996 pathOffset = index; | 7320 pathOffset = index; |
| 6997 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 7321 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 6998 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 7322 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7323 unittest.equals("/webproperties/")); |
| 6999 pathOffset += 15; | 7324 pathOffset += 15; |
| 7000 index = path.indexOf("/profiles/", pathOffset); | 7325 index = path.indexOf("/profiles/", pathOffset); |
| 7001 unittest.expect(index >= 0, unittest.isTrue); | 7326 unittest.expect(index >= 0, unittest.isTrue); |
| 7002 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7327 subPart = |
| 7328 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7003 pathOffset = index; | 7329 pathOffset = index; |
| 7004 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 7330 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7005 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 7331 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7332 unittest.equals("/profiles/")); |
| 7006 pathOffset += 10; | 7333 pathOffset += 10; |
| 7007 index = path.indexOf("/goals", pathOffset); | 7334 index = path.indexOf("/goals", pathOffset); |
| 7008 unittest.expect(index >= 0, unittest.isTrue); | 7335 unittest.expect(index >= 0, unittest.isTrue); |
| 7009 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7336 subPart = |
| 7337 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7010 pathOffset = index; | 7338 pathOffset = index; |
| 7011 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 7339 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7012 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/goals")); | 7340 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 7341 unittest.equals("/goals")); |
| 7013 pathOffset += 6; | 7342 pathOffset += 6; |
| 7014 | 7343 |
| 7015 var query = (req.url).query; | 7344 var query = (req.url).query; |
| 7016 var queryOffset = 0; | 7345 var queryOffset = 0; |
| 7017 var queryMap = {}; | 7346 var queryMap = {}; |
| 7018 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7347 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7019 parseBool(n) { | 7348 parseBool(n) { |
| 7020 if (n == "true") return true; | 7349 if (n == "true") return true; |
| 7021 if (n == "false") return false; | 7350 if (n == "false") return false; |
| 7022 if (n == null) return null; | 7351 if (n == null) return null; |
| 7023 throw new core.ArgumentError("Invalid boolean: $n"); | 7352 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7024 } | 7353 } |
| 7354 |
| 7025 if (query.length > 0) { | 7355 if (query.length > 0) { |
| 7026 for (var part in query.split("&")) { | 7356 for (var part in query.split("&")) { |
| 7027 var keyvalue = part.split("="); | 7357 var keyvalue = part.split("="); |
| 7028 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7358 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7359 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7029 } | 7360 } |
| 7030 } | 7361 } |
| 7031 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 7362 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 7032 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 7363 unittest.equals(arg_max_results)); |
| 7033 | 7364 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 7365 unittest.equals(arg_start_index)); |
| 7034 | 7366 |
| 7035 var h = { | 7367 var h = { |
| 7036 "content-type" : "application/json; charset=utf-8", | 7368 "content-type": "application/json; charset=utf-8", |
| 7037 }; | 7369 }; |
| 7038 var resp = convert.JSON.encode(buildGoals()); | 7370 var resp = convert.JSON.encode(buildGoals()); |
| 7039 return new async.Future.value(stringResponse(200, h, resp)); | 7371 return new async.Future.value(stringResponse(200, h, resp)); |
| 7040 }), true); | 7372 }), true); |
| 7041 res.list(arg_accountId, arg_webPropertyId, arg_profileId, max_results: arg
_max_results, start_index: arg_start_index).then(unittest.expectAsync1(((api.Goa
ls response) { | 7373 res |
| 7374 .list(arg_accountId, arg_webPropertyId, arg_profileId, |
| 7375 max_results: arg_max_results, start_index: arg_start_index) |
| 7376 .then(unittest.expectAsync1(((api.Goals response) { |
| 7042 checkGoals(response); | 7377 checkGoals(response); |
| 7043 }))); | 7378 }))); |
| 7044 }); | 7379 }); |
| 7045 | 7380 |
| 7046 unittest.test("method--patch", () { | 7381 unittest.test("method--patch", () { |
| 7047 | |
| 7048 var mock = new HttpServerMock(); | 7382 var mock = new HttpServerMock(); |
| 7049 api.ManagementGoalsResourceApi res = new api.AnalyticsApi(mock).management
.goals; | 7383 api.ManagementGoalsResourceApi res = |
| 7384 new api.AnalyticsApi(mock).management.goals; |
| 7050 var arg_request = buildGoal(); | 7385 var arg_request = buildGoal(); |
| 7051 var arg_accountId = "foo"; | 7386 var arg_accountId = "foo"; |
| 7052 var arg_webPropertyId = "foo"; | 7387 var arg_webPropertyId = "foo"; |
| 7053 var arg_profileId = "foo"; | 7388 var arg_profileId = "foo"; |
| 7054 var arg_goalId = "foo"; | 7389 var arg_goalId = "foo"; |
| 7055 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7390 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7056 var obj = new api.Goal.fromJson(json); | 7391 var obj = new api.Goal.fromJson(json); |
| 7057 checkGoal(obj); | 7392 checkGoal(obj); |
| 7058 | 7393 |
| 7059 var path = (req.url).path; | 7394 var path = (req.url).path; |
| 7060 var pathOffset = 0; | 7395 var pathOffset = 0; |
| 7061 var index; | 7396 var index; |
| 7062 var subPart; | 7397 var subPart; |
| 7063 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7398 unittest.expect( |
| 7399 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7064 pathOffset += 1; | 7400 pathOffset += 1; |
| 7065 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 7401 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 7402 unittest.equals("analytics/v3/")); |
| 7066 pathOffset += 13; | 7403 pathOffset += 13; |
| 7067 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 7404 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7405 unittest.equals("management/accounts/")); |
| 7068 pathOffset += 20; | 7406 pathOffset += 20; |
| 7069 index = path.indexOf("/webproperties/", pathOffset); | 7407 index = path.indexOf("/webproperties/", pathOffset); |
| 7070 unittest.expect(index >= 0, unittest.isTrue); | 7408 unittest.expect(index >= 0, unittest.isTrue); |
| 7071 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7409 subPart = |
| 7410 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7072 pathOffset = index; | 7411 pathOffset = index; |
| 7073 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 7412 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7074 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 7413 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7414 unittest.equals("/webproperties/")); |
| 7075 pathOffset += 15; | 7415 pathOffset += 15; |
| 7076 index = path.indexOf("/profiles/", pathOffset); | 7416 index = path.indexOf("/profiles/", pathOffset); |
| 7077 unittest.expect(index >= 0, unittest.isTrue); | 7417 unittest.expect(index >= 0, unittest.isTrue); |
| 7078 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7418 subPart = |
| 7419 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7079 pathOffset = index; | 7420 pathOffset = index; |
| 7080 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 7421 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7081 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 7422 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7423 unittest.equals("/profiles/")); |
| 7082 pathOffset += 10; | 7424 pathOffset += 10; |
| 7083 index = path.indexOf("/goals/", pathOffset); | 7425 index = path.indexOf("/goals/", pathOffset); |
| 7084 unittest.expect(index >= 0, unittest.isTrue); | 7426 unittest.expect(index >= 0, unittest.isTrue); |
| 7085 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7427 subPart = |
| 7428 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7086 pathOffset = index; | 7429 pathOffset = index; |
| 7087 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 7430 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7088 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/goals/")); | 7431 unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 7432 unittest.equals("/goals/")); |
| 7089 pathOffset += 7; | 7433 pathOffset += 7; |
| 7090 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 7434 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 7091 pathOffset = path.length; | 7435 pathOffset = path.length; |
| 7092 unittest.expect(subPart, unittest.equals("$arg_goalId")); | 7436 unittest.expect(subPart, unittest.equals("$arg_goalId")); |
| 7093 | 7437 |
| 7094 var query = (req.url).query; | 7438 var query = (req.url).query; |
| 7095 var queryOffset = 0; | 7439 var queryOffset = 0; |
| 7096 var queryMap = {}; | 7440 var queryMap = {}; |
| 7097 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7441 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7098 parseBool(n) { | 7442 parseBool(n) { |
| 7099 if (n == "true") return true; | 7443 if (n == "true") return true; |
| 7100 if (n == "false") return false; | 7444 if (n == "false") return false; |
| 7101 if (n == null) return null; | 7445 if (n == null) return null; |
| 7102 throw new core.ArgumentError("Invalid boolean: $n"); | 7446 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7103 } | 7447 } |
| 7448 |
| 7104 if (query.length > 0) { | 7449 if (query.length > 0) { |
| 7105 for (var part in query.split("&")) { | 7450 for (var part in query.split("&")) { |
| 7106 var keyvalue = part.split("="); | 7451 var keyvalue = part.split("="); |
| 7107 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7452 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7453 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7108 } | 7454 } |
| 7109 } | 7455 } |
| 7110 | 7456 |
| 7111 | |
| 7112 var h = { | 7457 var h = { |
| 7113 "content-type" : "application/json; charset=utf-8", | 7458 "content-type": "application/json; charset=utf-8", |
| 7114 }; | 7459 }; |
| 7115 var resp = convert.JSON.encode(buildGoal()); | 7460 var resp = convert.JSON.encode(buildGoal()); |
| 7116 return new async.Future.value(stringResponse(200, h, resp)); | 7461 return new async.Future.value(stringResponse(200, h, resp)); |
| 7117 }), true); | 7462 }), true); |
| 7118 res.patch(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, ar
g_goalId).then(unittest.expectAsync1(((api.Goal response) { | 7463 res |
| 7464 .patch(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, |
| 7465 arg_goalId) |
| 7466 .then(unittest.expectAsync1(((api.Goal response) { |
| 7119 checkGoal(response); | 7467 checkGoal(response); |
| 7120 }))); | 7468 }))); |
| 7121 }); | 7469 }); |
| 7122 | 7470 |
| 7123 unittest.test("method--update", () { | 7471 unittest.test("method--update", () { |
| 7124 | |
| 7125 var mock = new HttpServerMock(); | 7472 var mock = new HttpServerMock(); |
| 7126 api.ManagementGoalsResourceApi res = new api.AnalyticsApi(mock).management
.goals; | 7473 api.ManagementGoalsResourceApi res = |
| 7474 new api.AnalyticsApi(mock).management.goals; |
| 7127 var arg_request = buildGoal(); | 7475 var arg_request = buildGoal(); |
| 7128 var arg_accountId = "foo"; | 7476 var arg_accountId = "foo"; |
| 7129 var arg_webPropertyId = "foo"; | 7477 var arg_webPropertyId = "foo"; |
| 7130 var arg_profileId = "foo"; | 7478 var arg_profileId = "foo"; |
| 7131 var arg_goalId = "foo"; | 7479 var arg_goalId = "foo"; |
| 7132 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7480 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7133 var obj = new api.Goal.fromJson(json); | 7481 var obj = new api.Goal.fromJson(json); |
| 7134 checkGoal(obj); | 7482 checkGoal(obj); |
| 7135 | 7483 |
| 7136 var path = (req.url).path; | 7484 var path = (req.url).path; |
| 7137 var pathOffset = 0; | 7485 var pathOffset = 0; |
| 7138 var index; | 7486 var index; |
| 7139 var subPart; | 7487 var subPart; |
| 7140 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7488 unittest.expect( |
| 7489 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7141 pathOffset += 1; | 7490 pathOffset += 1; |
| 7142 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 7491 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 7492 unittest.equals("analytics/v3/")); |
| 7143 pathOffset += 13; | 7493 pathOffset += 13; |
| 7144 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 7494 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7495 unittest.equals("management/accounts/")); |
| 7145 pathOffset += 20; | 7496 pathOffset += 20; |
| 7146 index = path.indexOf("/webproperties/", pathOffset); | 7497 index = path.indexOf("/webproperties/", pathOffset); |
| 7147 unittest.expect(index >= 0, unittest.isTrue); | 7498 unittest.expect(index >= 0, unittest.isTrue); |
| 7148 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7499 subPart = |
| 7500 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7149 pathOffset = index; | 7501 pathOffset = index; |
| 7150 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 7502 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7151 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 7503 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7504 unittest.equals("/webproperties/")); |
| 7152 pathOffset += 15; | 7505 pathOffset += 15; |
| 7153 index = path.indexOf("/profiles/", pathOffset); | 7506 index = path.indexOf("/profiles/", pathOffset); |
| 7154 unittest.expect(index >= 0, unittest.isTrue); | 7507 unittest.expect(index >= 0, unittest.isTrue); |
| 7155 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7508 subPart = |
| 7509 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7156 pathOffset = index; | 7510 pathOffset = index; |
| 7157 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 7511 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7158 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 7512 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7513 unittest.equals("/profiles/")); |
| 7159 pathOffset += 10; | 7514 pathOffset += 10; |
| 7160 index = path.indexOf("/goals/", pathOffset); | 7515 index = path.indexOf("/goals/", pathOffset); |
| 7161 unittest.expect(index >= 0, unittest.isTrue); | 7516 unittest.expect(index >= 0, unittest.isTrue); |
| 7162 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7517 subPart = |
| 7518 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7163 pathOffset = index; | 7519 pathOffset = index; |
| 7164 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 7520 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7165 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/goals/")); | 7521 unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 7522 unittest.equals("/goals/")); |
| 7166 pathOffset += 7; | 7523 pathOffset += 7; |
| 7167 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 7524 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 7168 pathOffset = path.length; | 7525 pathOffset = path.length; |
| 7169 unittest.expect(subPart, unittest.equals("$arg_goalId")); | 7526 unittest.expect(subPart, unittest.equals("$arg_goalId")); |
| 7170 | 7527 |
| 7171 var query = (req.url).query; | 7528 var query = (req.url).query; |
| 7172 var queryOffset = 0; | 7529 var queryOffset = 0; |
| 7173 var queryMap = {}; | 7530 var queryMap = {}; |
| 7174 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7531 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7175 parseBool(n) { | 7532 parseBool(n) { |
| 7176 if (n == "true") return true; | 7533 if (n == "true") return true; |
| 7177 if (n == "false") return false; | 7534 if (n == "false") return false; |
| 7178 if (n == null) return null; | 7535 if (n == null) return null; |
| 7179 throw new core.ArgumentError("Invalid boolean: $n"); | 7536 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7180 } | 7537 } |
| 7538 |
| 7181 if (query.length > 0) { | 7539 if (query.length > 0) { |
| 7182 for (var part in query.split("&")) { | 7540 for (var part in query.split("&")) { |
| 7183 var keyvalue = part.split("="); | 7541 var keyvalue = part.split("="); |
| 7184 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7542 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7543 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7185 } | 7544 } |
| 7186 } | 7545 } |
| 7187 | 7546 |
| 7188 | |
| 7189 var h = { | 7547 var h = { |
| 7190 "content-type" : "application/json; charset=utf-8", | 7548 "content-type": "application/json; charset=utf-8", |
| 7191 }; | 7549 }; |
| 7192 var resp = convert.JSON.encode(buildGoal()); | 7550 var resp = convert.JSON.encode(buildGoal()); |
| 7193 return new async.Future.value(stringResponse(200, h, resp)); | 7551 return new async.Future.value(stringResponse(200, h, resp)); |
| 7194 }), true); | 7552 }), true); |
| 7195 res.update(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, a
rg_goalId).then(unittest.expectAsync1(((api.Goal response) { | 7553 res |
| 7554 .update(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, |
| 7555 arg_goalId) |
| 7556 .then(unittest.expectAsync1(((api.Goal response) { |
| 7196 checkGoal(response); | 7557 checkGoal(response); |
| 7197 }))); | 7558 }))); |
| 7198 }); | 7559 }); |
| 7199 | |
| 7200 }); | 7560 }); |
| 7201 | 7561 |
| 7202 | |
| 7203 unittest.group("resource-ManagementProfileFilterLinksResourceApi", () { | 7562 unittest.group("resource-ManagementProfileFilterLinksResourceApi", () { |
| 7204 unittest.test("method--delete", () { | 7563 unittest.test("method--delete", () { |
| 7205 | |
| 7206 var mock = new HttpServerMock(); | 7564 var mock = new HttpServerMock(); |
| 7207 api.ManagementProfileFilterLinksResourceApi res = new api.AnalyticsApi(moc
k).management.profileFilterLinks; | 7565 api.ManagementProfileFilterLinksResourceApi res = |
| 7566 new api.AnalyticsApi(mock).management.profileFilterLinks; |
| 7208 var arg_accountId = "foo"; | 7567 var arg_accountId = "foo"; |
| 7209 var arg_webPropertyId = "foo"; | 7568 var arg_webPropertyId = "foo"; |
| 7210 var arg_profileId = "foo"; | 7569 var arg_profileId = "foo"; |
| 7211 var arg_linkId = "foo"; | 7570 var arg_linkId = "foo"; |
| 7212 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7571 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7213 var path = (req.url).path; | 7572 var path = (req.url).path; |
| 7214 var pathOffset = 0; | 7573 var pathOffset = 0; |
| 7215 var index; | 7574 var index; |
| 7216 var subPart; | 7575 var subPart; |
| 7217 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7576 unittest.expect( |
| 7577 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7218 pathOffset += 1; | 7578 pathOffset += 1; |
| 7219 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 7579 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 7580 unittest.equals("analytics/v3/")); |
| 7220 pathOffset += 13; | 7581 pathOffset += 13; |
| 7221 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 7582 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7583 unittest.equals("management/accounts/")); |
| 7222 pathOffset += 20; | 7584 pathOffset += 20; |
| 7223 index = path.indexOf("/webproperties/", pathOffset); | 7585 index = path.indexOf("/webproperties/", pathOffset); |
| 7224 unittest.expect(index >= 0, unittest.isTrue); | 7586 unittest.expect(index >= 0, unittest.isTrue); |
| 7225 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7587 subPart = |
| 7588 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7226 pathOffset = index; | 7589 pathOffset = index; |
| 7227 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 7590 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7228 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 7591 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7592 unittest.equals("/webproperties/")); |
| 7229 pathOffset += 15; | 7593 pathOffset += 15; |
| 7230 index = path.indexOf("/profiles/", pathOffset); | 7594 index = path.indexOf("/profiles/", pathOffset); |
| 7231 unittest.expect(index >= 0, unittest.isTrue); | 7595 unittest.expect(index >= 0, unittest.isTrue); |
| 7232 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7596 subPart = |
| 7597 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7233 pathOffset = index; | 7598 pathOffset = index; |
| 7234 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 7599 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7235 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 7600 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7601 unittest.equals("/profiles/")); |
| 7236 pathOffset += 10; | 7602 pathOffset += 10; |
| 7237 index = path.indexOf("/profileFilterLinks/", pathOffset); | 7603 index = path.indexOf("/profileFilterLinks/", pathOffset); |
| 7238 unittest.expect(index >= 0, unittest.isTrue); | 7604 unittest.expect(index >= 0, unittest.isTrue); |
| 7239 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7605 subPart = |
| 7606 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7240 pathOffset = index; | 7607 pathOffset = index; |
| 7241 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 7608 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7242 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/profileFilterLinks/")); | 7609 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7610 unittest.equals("/profileFilterLinks/")); |
| 7243 pathOffset += 20; | 7611 pathOffset += 20; |
| 7244 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 7612 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 7245 pathOffset = path.length; | 7613 pathOffset = path.length; |
| 7246 unittest.expect(subPart, unittest.equals("$arg_linkId")); | 7614 unittest.expect(subPart, unittest.equals("$arg_linkId")); |
| 7247 | 7615 |
| 7248 var query = (req.url).query; | 7616 var query = (req.url).query; |
| 7249 var queryOffset = 0; | 7617 var queryOffset = 0; |
| 7250 var queryMap = {}; | 7618 var queryMap = {}; |
| 7251 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7619 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7252 parseBool(n) { | 7620 parseBool(n) { |
| 7253 if (n == "true") return true; | 7621 if (n == "true") return true; |
| 7254 if (n == "false") return false; | 7622 if (n == "false") return false; |
| 7255 if (n == null) return null; | 7623 if (n == null) return null; |
| 7256 throw new core.ArgumentError("Invalid boolean: $n"); | 7624 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7257 } | 7625 } |
| 7626 |
| 7258 if (query.length > 0) { | 7627 if (query.length > 0) { |
| 7259 for (var part in query.split("&")) { | 7628 for (var part in query.split("&")) { |
| 7260 var keyvalue = part.split("="); | 7629 var keyvalue = part.split("="); |
| 7261 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7630 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7631 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7262 } | 7632 } |
| 7263 } | 7633 } |
| 7264 | 7634 |
| 7265 | |
| 7266 var h = { | 7635 var h = { |
| 7267 "content-type" : "application/json; charset=utf-8", | 7636 "content-type": "application/json; charset=utf-8", |
| 7268 }; | 7637 }; |
| 7269 var resp = ""; | 7638 var resp = ""; |
| 7270 return new async.Future.value(stringResponse(200, h, resp)); | 7639 return new async.Future.value(stringResponse(200, h, resp)); |
| 7271 }), true); | 7640 }), true); |
| 7272 res.delete(arg_accountId, arg_webPropertyId, arg_profileId, arg_linkId).th
en(unittest.expectAsync1((_) {})); | 7641 res |
| 7642 .delete(arg_accountId, arg_webPropertyId, arg_profileId, arg_linkId) |
| 7643 .then(unittest.expectAsync1((_) {})); |
| 7273 }); | 7644 }); |
| 7274 | 7645 |
| 7275 unittest.test("method--get", () { | 7646 unittest.test("method--get", () { |
| 7276 | |
| 7277 var mock = new HttpServerMock(); | 7647 var mock = new HttpServerMock(); |
| 7278 api.ManagementProfileFilterLinksResourceApi res = new api.AnalyticsApi(moc
k).management.profileFilterLinks; | 7648 api.ManagementProfileFilterLinksResourceApi res = |
| 7649 new api.AnalyticsApi(mock).management.profileFilterLinks; |
| 7279 var arg_accountId = "foo"; | 7650 var arg_accountId = "foo"; |
| 7280 var arg_webPropertyId = "foo"; | 7651 var arg_webPropertyId = "foo"; |
| 7281 var arg_profileId = "foo"; | 7652 var arg_profileId = "foo"; |
| 7282 var arg_linkId = "foo"; | 7653 var arg_linkId = "foo"; |
| 7283 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7654 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7284 var path = (req.url).path; | 7655 var path = (req.url).path; |
| 7285 var pathOffset = 0; | 7656 var pathOffset = 0; |
| 7286 var index; | 7657 var index; |
| 7287 var subPart; | 7658 var subPart; |
| 7288 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7659 unittest.expect( |
| 7660 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7289 pathOffset += 1; | 7661 pathOffset += 1; |
| 7290 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 7662 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 7663 unittest.equals("analytics/v3/")); |
| 7291 pathOffset += 13; | 7664 pathOffset += 13; |
| 7292 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 7665 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7666 unittest.equals("management/accounts/")); |
| 7293 pathOffset += 20; | 7667 pathOffset += 20; |
| 7294 index = path.indexOf("/webproperties/", pathOffset); | 7668 index = path.indexOf("/webproperties/", pathOffset); |
| 7295 unittest.expect(index >= 0, unittest.isTrue); | 7669 unittest.expect(index >= 0, unittest.isTrue); |
| 7296 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7670 subPart = |
| 7671 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7297 pathOffset = index; | 7672 pathOffset = index; |
| 7298 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 7673 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7299 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 7674 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7675 unittest.equals("/webproperties/")); |
| 7300 pathOffset += 15; | 7676 pathOffset += 15; |
| 7301 index = path.indexOf("/profiles/", pathOffset); | 7677 index = path.indexOf("/profiles/", pathOffset); |
| 7302 unittest.expect(index >= 0, unittest.isTrue); | 7678 unittest.expect(index >= 0, unittest.isTrue); |
| 7303 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7679 subPart = |
| 7680 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7304 pathOffset = index; | 7681 pathOffset = index; |
| 7305 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 7682 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7306 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 7683 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7684 unittest.equals("/profiles/")); |
| 7307 pathOffset += 10; | 7685 pathOffset += 10; |
| 7308 index = path.indexOf("/profileFilterLinks/", pathOffset); | 7686 index = path.indexOf("/profileFilterLinks/", pathOffset); |
| 7309 unittest.expect(index >= 0, unittest.isTrue); | 7687 unittest.expect(index >= 0, unittest.isTrue); |
| 7310 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7688 subPart = |
| 7689 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7311 pathOffset = index; | 7690 pathOffset = index; |
| 7312 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 7691 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7313 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/profileFilterLinks/")); | 7692 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7693 unittest.equals("/profileFilterLinks/")); |
| 7314 pathOffset += 20; | 7694 pathOffset += 20; |
| 7315 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 7695 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 7316 pathOffset = path.length; | 7696 pathOffset = path.length; |
| 7317 unittest.expect(subPart, unittest.equals("$arg_linkId")); | 7697 unittest.expect(subPart, unittest.equals("$arg_linkId")); |
| 7318 | 7698 |
| 7319 var query = (req.url).query; | 7699 var query = (req.url).query; |
| 7320 var queryOffset = 0; | 7700 var queryOffset = 0; |
| 7321 var queryMap = {}; | 7701 var queryMap = {}; |
| 7322 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7702 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7323 parseBool(n) { | 7703 parseBool(n) { |
| 7324 if (n == "true") return true; | 7704 if (n == "true") return true; |
| 7325 if (n == "false") return false; | 7705 if (n == "false") return false; |
| 7326 if (n == null) return null; | 7706 if (n == null) return null; |
| 7327 throw new core.ArgumentError("Invalid boolean: $n"); | 7707 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7328 } | 7708 } |
| 7709 |
| 7329 if (query.length > 0) { | 7710 if (query.length > 0) { |
| 7330 for (var part in query.split("&")) { | 7711 for (var part in query.split("&")) { |
| 7331 var keyvalue = part.split("="); | 7712 var keyvalue = part.split("="); |
| 7332 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7713 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7714 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7333 } | 7715 } |
| 7334 } | 7716 } |
| 7335 | 7717 |
| 7336 | |
| 7337 var h = { | 7718 var h = { |
| 7338 "content-type" : "application/json; charset=utf-8", | 7719 "content-type": "application/json; charset=utf-8", |
| 7339 }; | 7720 }; |
| 7340 var resp = convert.JSON.encode(buildProfileFilterLink()); | 7721 var resp = convert.JSON.encode(buildProfileFilterLink()); |
| 7341 return new async.Future.value(stringResponse(200, h, resp)); | 7722 return new async.Future.value(stringResponse(200, h, resp)); |
| 7342 }), true); | 7723 }), true); |
| 7343 res.get(arg_accountId, arg_webPropertyId, arg_profileId, arg_linkId).then(
unittest.expectAsync1(((api.ProfileFilterLink response) { | 7724 res |
| 7725 .get(arg_accountId, arg_webPropertyId, arg_profileId, arg_linkId) |
| 7726 .then(unittest.expectAsync1(((api.ProfileFilterLink response) { |
| 7344 checkProfileFilterLink(response); | 7727 checkProfileFilterLink(response); |
| 7345 }))); | 7728 }))); |
| 7346 }); | 7729 }); |
| 7347 | 7730 |
| 7348 unittest.test("method--insert", () { | 7731 unittest.test("method--insert", () { |
| 7349 | |
| 7350 var mock = new HttpServerMock(); | 7732 var mock = new HttpServerMock(); |
| 7351 api.ManagementProfileFilterLinksResourceApi res = new api.AnalyticsApi(moc
k).management.profileFilterLinks; | 7733 api.ManagementProfileFilterLinksResourceApi res = |
| 7734 new api.AnalyticsApi(mock).management.profileFilterLinks; |
| 7352 var arg_request = buildProfileFilterLink(); | 7735 var arg_request = buildProfileFilterLink(); |
| 7353 var arg_accountId = "foo"; | 7736 var arg_accountId = "foo"; |
| 7354 var arg_webPropertyId = "foo"; | 7737 var arg_webPropertyId = "foo"; |
| 7355 var arg_profileId = "foo"; | 7738 var arg_profileId = "foo"; |
| 7356 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7739 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7357 var obj = new api.ProfileFilterLink.fromJson(json); | 7740 var obj = new api.ProfileFilterLink.fromJson(json); |
| 7358 checkProfileFilterLink(obj); | 7741 checkProfileFilterLink(obj); |
| 7359 | 7742 |
| 7360 var path = (req.url).path; | 7743 var path = (req.url).path; |
| 7361 var pathOffset = 0; | 7744 var pathOffset = 0; |
| 7362 var index; | 7745 var index; |
| 7363 var subPart; | 7746 var subPart; |
| 7364 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7747 unittest.expect( |
| 7748 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7365 pathOffset += 1; | 7749 pathOffset += 1; |
| 7366 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 7750 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 7751 unittest.equals("analytics/v3/")); |
| 7367 pathOffset += 13; | 7752 pathOffset += 13; |
| 7368 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 7753 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7754 unittest.equals("management/accounts/")); |
| 7369 pathOffset += 20; | 7755 pathOffset += 20; |
| 7370 index = path.indexOf("/webproperties/", pathOffset); | 7756 index = path.indexOf("/webproperties/", pathOffset); |
| 7371 unittest.expect(index >= 0, unittest.isTrue); | 7757 unittest.expect(index >= 0, unittest.isTrue); |
| 7372 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7758 subPart = |
| 7759 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7373 pathOffset = index; | 7760 pathOffset = index; |
| 7374 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 7761 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7375 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 7762 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7763 unittest.equals("/webproperties/")); |
| 7376 pathOffset += 15; | 7764 pathOffset += 15; |
| 7377 index = path.indexOf("/profiles/", pathOffset); | 7765 index = path.indexOf("/profiles/", pathOffset); |
| 7378 unittest.expect(index >= 0, unittest.isTrue); | 7766 unittest.expect(index >= 0, unittest.isTrue); |
| 7379 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7767 subPart = |
| 7768 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7380 pathOffset = index; | 7769 pathOffset = index; |
| 7381 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 7770 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7382 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 7771 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7772 unittest.equals("/profiles/")); |
| 7383 pathOffset += 10; | 7773 pathOffset += 10; |
| 7384 index = path.indexOf("/profileFilterLinks", pathOffset); | 7774 index = path.indexOf("/profileFilterLinks", pathOffset); |
| 7385 unittest.expect(index >= 0, unittest.isTrue); | 7775 unittest.expect(index >= 0, unittest.isTrue); |
| 7386 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7776 subPart = |
| 7777 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7387 pathOffset = index; | 7778 pathOffset = index; |
| 7388 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 7779 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7389 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/profileFilterLinks")); | 7780 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 7781 unittest.equals("/profileFilterLinks")); |
| 7390 pathOffset += 19; | 7782 pathOffset += 19; |
| 7391 | 7783 |
| 7392 var query = (req.url).query; | 7784 var query = (req.url).query; |
| 7393 var queryOffset = 0; | 7785 var queryOffset = 0; |
| 7394 var queryMap = {}; | 7786 var queryMap = {}; |
| 7395 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7787 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7396 parseBool(n) { | 7788 parseBool(n) { |
| 7397 if (n == "true") return true; | 7789 if (n == "true") return true; |
| 7398 if (n == "false") return false; | 7790 if (n == "false") return false; |
| 7399 if (n == null) return null; | 7791 if (n == null) return null; |
| 7400 throw new core.ArgumentError("Invalid boolean: $n"); | 7792 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7401 } | 7793 } |
| 7794 |
| 7402 if (query.length > 0) { | 7795 if (query.length > 0) { |
| 7403 for (var part in query.split("&")) { | 7796 for (var part in query.split("&")) { |
| 7404 var keyvalue = part.split("="); | 7797 var keyvalue = part.split("="); |
| 7405 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7798 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7799 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7406 } | 7800 } |
| 7407 } | 7801 } |
| 7408 | 7802 |
| 7409 | |
| 7410 var h = { | 7803 var h = { |
| 7411 "content-type" : "application/json; charset=utf-8", | 7804 "content-type": "application/json; charset=utf-8", |
| 7412 }; | 7805 }; |
| 7413 var resp = convert.JSON.encode(buildProfileFilterLink()); | 7806 var resp = convert.JSON.encode(buildProfileFilterLink()); |
| 7414 return new async.Future.value(stringResponse(200, h, resp)); | 7807 return new async.Future.value(stringResponse(200, h, resp)); |
| 7415 }), true); | 7808 }), true); |
| 7416 res.insert(arg_request, arg_accountId, arg_webPropertyId, arg_profileId).t
hen(unittest.expectAsync1(((api.ProfileFilterLink response) { | 7809 res |
| 7810 .insert(arg_request, arg_accountId, arg_webPropertyId, arg_profileId) |
| 7811 .then(unittest.expectAsync1(((api.ProfileFilterLink response) { |
| 7417 checkProfileFilterLink(response); | 7812 checkProfileFilterLink(response); |
| 7418 }))); | 7813 }))); |
| 7419 }); | 7814 }); |
| 7420 | 7815 |
| 7421 unittest.test("method--list", () { | 7816 unittest.test("method--list", () { |
| 7422 | |
| 7423 var mock = new HttpServerMock(); | 7817 var mock = new HttpServerMock(); |
| 7424 api.ManagementProfileFilterLinksResourceApi res = new api.AnalyticsApi(moc
k).management.profileFilterLinks; | 7818 api.ManagementProfileFilterLinksResourceApi res = |
| 7819 new api.AnalyticsApi(mock).management.profileFilterLinks; |
| 7425 var arg_accountId = "foo"; | 7820 var arg_accountId = "foo"; |
| 7426 var arg_webPropertyId = "foo"; | 7821 var arg_webPropertyId = "foo"; |
| 7427 var arg_profileId = "foo"; | 7822 var arg_profileId = "foo"; |
| 7428 var arg_max_results = 42; | 7823 var arg_max_results = 42; |
| 7429 var arg_start_index = 42; | 7824 var arg_start_index = 42; |
| 7430 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7825 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7431 var path = (req.url).path; | 7826 var path = (req.url).path; |
| 7432 var pathOffset = 0; | 7827 var pathOffset = 0; |
| 7433 var index; | 7828 var index; |
| 7434 var subPart; | 7829 var subPart; |
| 7435 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7830 unittest.expect( |
| 7831 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7436 pathOffset += 1; | 7832 pathOffset += 1; |
| 7437 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 7833 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 7834 unittest.equals("analytics/v3/")); |
| 7438 pathOffset += 13; | 7835 pathOffset += 13; |
| 7439 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 7836 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7837 unittest.equals("management/accounts/")); |
| 7440 pathOffset += 20; | 7838 pathOffset += 20; |
| 7441 index = path.indexOf("/webproperties/", pathOffset); | 7839 index = path.indexOf("/webproperties/", pathOffset); |
| 7442 unittest.expect(index >= 0, unittest.isTrue); | 7840 unittest.expect(index >= 0, unittest.isTrue); |
| 7443 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7841 subPart = |
| 7842 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7444 pathOffset = index; | 7843 pathOffset = index; |
| 7445 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 7844 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7446 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 7845 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7846 unittest.equals("/webproperties/")); |
| 7447 pathOffset += 15; | 7847 pathOffset += 15; |
| 7448 index = path.indexOf("/profiles/", pathOffset); | 7848 index = path.indexOf("/profiles/", pathOffset); |
| 7449 unittest.expect(index >= 0, unittest.isTrue); | 7849 unittest.expect(index >= 0, unittest.isTrue); |
| 7450 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7850 subPart = |
| 7851 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7451 pathOffset = index; | 7852 pathOffset = index; |
| 7452 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 7853 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7453 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 7854 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7855 unittest.equals("/profiles/")); |
| 7454 pathOffset += 10; | 7856 pathOffset += 10; |
| 7455 index = path.indexOf("/profileFilterLinks", pathOffset); | 7857 index = path.indexOf("/profileFilterLinks", pathOffset); |
| 7456 unittest.expect(index >= 0, unittest.isTrue); | 7858 unittest.expect(index >= 0, unittest.isTrue); |
| 7457 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7859 subPart = |
| 7860 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7458 pathOffset = index; | 7861 pathOffset = index; |
| 7459 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 7862 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7460 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/profileFilterLinks")); | 7863 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 7864 unittest.equals("/profileFilterLinks")); |
| 7461 pathOffset += 19; | 7865 pathOffset += 19; |
| 7462 | 7866 |
| 7463 var query = (req.url).query; | 7867 var query = (req.url).query; |
| 7464 var queryOffset = 0; | 7868 var queryOffset = 0; |
| 7465 var queryMap = {}; | 7869 var queryMap = {}; |
| 7466 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7870 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7467 parseBool(n) { | 7871 parseBool(n) { |
| 7468 if (n == "true") return true; | 7872 if (n == "true") return true; |
| 7469 if (n == "false") return false; | 7873 if (n == "false") return false; |
| 7470 if (n == null) return null; | 7874 if (n == null) return null; |
| 7471 throw new core.ArgumentError("Invalid boolean: $n"); | 7875 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7472 } | 7876 } |
| 7877 |
| 7473 if (query.length > 0) { | 7878 if (query.length > 0) { |
| 7474 for (var part in query.split("&")) { | 7879 for (var part in query.split("&")) { |
| 7475 var keyvalue = part.split("="); | 7880 var keyvalue = part.split("="); |
| 7476 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7881 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7882 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7477 } | 7883 } |
| 7478 } | 7884 } |
| 7479 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 7885 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 7480 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 7886 unittest.equals(arg_max_results)); |
| 7481 | 7887 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 7888 unittest.equals(arg_start_index)); |
| 7482 | 7889 |
| 7483 var h = { | 7890 var h = { |
| 7484 "content-type" : "application/json; charset=utf-8", | 7891 "content-type": "application/json; charset=utf-8", |
| 7485 }; | 7892 }; |
| 7486 var resp = convert.JSON.encode(buildProfileFilterLinks()); | 7893 var resp = convert.JSON.encode(buildProfileFilterLinks()); |
| 7487 return new async.Future.value(stringResponse(200, h, resp)); | 7894 return new async.Future.value(stringResponse(200, h, resp)); |
| 7488 }), true); | 7895 }), true); |
| 7489 res.list(arg_accountId, arg_webPropertyId, arg_profileId, max_results: arg
_max_results, start_index: arg_start_index).then(unittest.expectAsync1(((api.Pro
fileFilterLinks response) { | 7896 res |
| 7897 .list(arg_accountId, arg_webPropertyId, arg_profileId, |
| 7898 max_results: arg_max_results, start_index: arg_start_index) |
| 7899 .then(unittest.expectAsync1(((api.ProfileFilterLinks response) { |
| 7490 checkProfileFilterLinks(response); | 7900 checkProfileFilterLinks(response); |
| 7491 }))); | 7901 }))); |
| 7492 }); | 7902 }); |
| 7493 | 7903 |
| 7494 unittest.test("method--patch", () { | 7904 unittest.test("method--patch", () { |
| 7495 | |
| 7496 var mock = new HttpServerMock(); | 7905 var mock = new HttpServerMock(); |
| 7497 api.ManagementProfileFilterLinksResourceApi res = new api.AnalyticsApi(moc
k).management.profileFilterLinks; | 7906 api.ManagementProfileFilterLinksResourceApi res = |
| 7907 new api.AnalyticsApi(mock).management.profileFilterLinks; |
| 7498 var arg_request = buildProfileFilterLink(); | 7908 var arg_request = buildProfileFilterLink(); |
| 7499 var arg_accountId = "foo"; | 7909 var arg_accountId = "foo"; |
| 7500 var arg_webPropertyId = "foo"; | 7910 var arg_webPropertyId = "foo"; |
| 7501 var arg_profileId = "foo"; | 7911 var arg_profileId = "foo"; |
| 7502 var arg_linkId = "foo"; | 7912 var arg_linkId = "foo"; |
| 7503 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7913 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7504 var obj = new api.ProfileFilterLink.fromJson(json); | 7914 var obj = new api.ProfileFilterLink.fromJson(json); |
| 7505 checkProfileFilterLink(obj); | 7915 checkProfileFilterLink(obj); |
| 7506 | 7916 |
| 7507 var path = (req.url).path; | 7917 var path = (req.url).path; |
| 7508 var pathOffset = 0; | 7918 var pathOffset = 0; |
| 7509 var index; | 7919 var index; |
| 7510 var subPart; | 7920 var subPart; |
| 7511 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7921 unittest.expect( |
| 7922 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7512 pathOffset += 1; | 7923 pathOffset += 1; |
| 7513 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 7924 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 7925 unittest.equals("analytics/v3/")); |
| 7514 pathOffset += 13; | 7926 pathOffset += 13; |
| 7515 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 7927 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7928 unittest.equals("management/accounts/")); |
| 7516 pathOffset += 20; | 7929 pathOffset += 20; |
| 7517 index = path.indexOf("/webproperties/", pathOffset); | 7930 index = path.indexOf("/webproperties/", pathOffset); |
| 7518 unittest.expect(index >= 0, unittest.isTrue); | 7931 unittest.expect(index >= 0, unittest.isTrue); |
| 7519 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7932 subPart = |
| 7933 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7520 pathOffset = index; | 7934 pathOffset = index; |
| 7521 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 7935 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7522 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 7936 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7937 unittest.equals("/webproperties/")); |
| 7523 pathOffset += 15; | 7938 pathOffset += 15; |
| 7524 index = path.indexOf("/profiles/", pathOffset); | 7939 index = path.indexOf("/profiles/", pathOffset); |
| 7525 unittest.expect(index >= 0, unittest.isTrue); | 7940 unittest.expect(index >= 0, unittest.isTrue); |
| 7526 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7941 subPart = |
| 7942 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7527 pathOffset = index; | 7943 pathOffset = index; |
| 7528 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 7944 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7529 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 7945 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7946 unittest.equals("/profiles/")); |
| 7530 pathOffset += 10; | 7947 pathOffset += 10; |
| 7531 index = path.indexOf("/profileFilterLinks/", pathOffset); | 7948 index = path.indexOf("/profileFilterLinks/", pathOffset); |
| 7532 unittest.expect(index >= 0, unittest.isTrue); | 7949 unittest.expect(index >= 0, unittest.isTrue); |
| 7533 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 7950 subPart = |
| 7951 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7534 pathOffset = index; | 7952 pathOffset = index; |
| 7535 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 7953 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7536 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/profileFilterLinks/")); | 7954 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7955 unittest.equals("/profileFilterLinks/")); |
| 7537 pathOffset += 20; | 7956 pathOffset += 20; |
| 7538 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 7957 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 7539 pathOffset = path.length; | 7958 pathOffset = path.length; |
| 7540 unittest.expect(subPart, unittest.equals("$arg_linkId")); | 7959 unittest.expect(subPart, unittest.equals("$arg_linkId")); |
| 7541 | 7960 |
| 7542 var query = (req.url).query; | 7961 var query = (req.url).query; |
| 7543 var queryOffset = 0; | 7962 var queryOffset = 0; |
| 7544 var queryMap = {}; | 7963 var queryMap = {}; |
| 7545 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7964 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7546 parseBool(n) { | 7965 parseBool(n) { |
| 7547 if (n == "true") return true; | 7966 if (n == "true") return true; |
| 7548 if (n == "false") return false; | 7967 if (n == "false") return false; |
| 7549 if (n == null) return null; | 7968 if (n == null) return null; |
| 7550 throw new core.ArgumentError("Invalid boolean: $n"); | 7969 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7551 } | 7970 } |
| 7971 |
| 7552 if (query.length > 0) { | 7972 if (query.length > 0) { |
| 7553 for (var part in query.split("&")) { | 7973 for (var part in query.split("&")) { |
| 7554 var keyvalue = part.split("="); | 7974 var keyvalue = part.split("="); |
| 7555 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7975 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7976 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7556 } | 7977 } |
| 7557 } | 7978 } |
| 7558 | 7979 |
| 7559 | |
| 7560 var h = { | 7980 var h = { |
| 7561 "content-type" : "application/json; charset=utf-8", | 7981 "content-type": "application/json; charset=utf-8", |
| 7562 }; | 7982 }; |
| 7563 var resp = convert.JSON.encode(buildProfileFilterLink()); | 7983 var resp = convert.JSON.encode(buildProfileFilterLink()); |
| 7564 return new async.Future.value(stringResponse(200, h, resp)); | 7984 return new async.Future.value(stringResponse(200, h, resp)); |
| 7565 }), true); | 7985 }), true); |
| 7566 res.patch(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, ar
g_linkId).then(unittest.expectAsync1(((api.ProfileFilterLink response) { | 7986 res |
| 7987 .patch(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, |
| 7988 arg_linkId) |
| 7989 .then(unittest.expectAsync1(((api.ProfileFilterLink response) { |
| 7567 checkProfileFilterLink(response); | 7990 checkProfileFilterLink(response); |
| 7568 }))); | 7991 }))); |
| 7569 }); | 7992 }); |
| 7570 | 7993 |
| 7571 unittest.test("method--update", () { | 7994 unittest.test("method--update", () { |
| 7572 | |
| 7573 var mock = new HttpServerMock(); | 7995 var mock = new HttpServerMock(); |
| 7574 api.ManagementProfileFilterLinksResourceApi res = new api.AnalyticsApi(moc
k).management.profileFilterLinks; | 7996 api.ManagementProfileFilterLinksResourceApi res = |
| 7997 new api.AnalyticsApi(mock).management.profileFilterLinks; |
| 7575 var arg_request = buildProfileFilterLink(); | 7998 var arg_request = buildProfileFilterLink(); |
| 7576 var arg_accountId = "foo"; | 7999 var arg_accountId = "foo"; |
| 7577 var arg_webPropertyId = "foo"; | 8000 var arg_webPropertyId = "foo"; |
| 7578 var arg_profileId = "foo"; | 8001 var arg_profileId = "foo"; |
| 7579 var arg_linkId = "foo"; | 8002 var arg_linkId = "foo"; |
| 7580 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8003 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7581 var obj = new api.ProfileFilterLink.fromJson(json); | 8004 var obj = new api.ProfileFilterLink.fromJson(json); |
| 7582 checkProfileFilterLink(obj); | 8005 checkProfileFilterLink(obj); |
| 7583 | 8006 |
| 7584 var path = (req.url).path; | 8007 var path = (req.url).path; |
| 7585 var pathOffset = 0; | 8008 var pathOffset = 0; |
| 7586 var index; | 8009 var index; |
| 7587 var subPart; | 8010 var subPart; |
| 7588 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8011 unittest.expect( |
| 8012 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7589 pathOffset += 1; | 8013 pathOffset += 1; |
| 7590 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8014 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8015 unittest.equals("analytics/v3/")); |
| 7591 pathOffset += 13; | 8016 pathOffset += 13; |
| 7592 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8017 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8018 unittest.equals("management/accounts/")); |
| 7593 pathOffset += 20; | 8019 pathOffset += 20; |
| 7594 index = path.indexOf("/webproperties/", pathOffset); | 8020 index = path.indexOf("/webproperties/", pathOffset); |
| 7595 unittest.expect(index >= 0, unittest.isTrue); | 8021 unittest.expect(index >= 0, unittest.isTrue); |
| 7596 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8022 subPart = |
| 8023 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7597 pathOffset = index; | 8024 pathOffset = index; |
| 7598 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8025 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7599 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8026 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8027 unittest.equals("/webproperties/")); |
| 7600 pathOffset += 15; | 8028 pathOffset += 15; |
| 7601 index = path.indexOf("/profiles/", pathOffset); | 8029 index = path.indexOf("/profiles/", pathOffset); |
| 7602 unittest.expect(index >= 0, unittest.isTrue); | 8030 unittest.expect(index >= 0, unittest.isTrue); |
| 7603 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8031 subPart = |
| 8032 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7604 pathOffset = index; | 8033 pathOffset = index; |
| 7605 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 8034 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7606 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 8035 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 8036 unittest.equals("/profiles/")); |
| 7607 pathOffset += 10; | 8037 pathOffset += 10; |
| 7608 index = path.indexOf("/profileFilterLinks/", pathOffset); | 8038 index = path.indexOf("/profileFilterLinks/", pathOffset); |
| 7609 unittest.expect(index >= 0, unittest.isTrue); | 8039 unittest.expect(index >= 0, unittest.isTrue); |
| 7610 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8040 subPart = |
| 8041 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7611 pathOffset = index; | 8042 pathOffset = index; |
| 7612 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 8043 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7613 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/profileFilterLinks/")); | 8044 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8045 unittest.equals("/profileFilterLinks/")); |
| 7614 pathOffset += 20; | 8046 pathOffset += 20; |
| 7615 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 8047 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 7616 pathOffset = path.length; | 8048 pathOffset = path.length; |
| 7617 unittest.expect(subPart, unittest.equals("$arg_linkId")); | 8049 unittest.expect(subPart, unittest.equals("$arg_linkId")); |
| 7618 | 8050 |
| 7619 var query = (req.url).query; | 8051 var query = (req.url).query; |
| 7620 var queryOffset = 0; | 8052 var queryOffset = 0; |
| 7621 var queryMap = {}; | 8053 var queryMap = {}; |
| 7622 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8054 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7623 parseBool(n) { | 8055 parseBool(n) { |
| 7624 if (n == "true") return true; | 8056 if (n == "true") return true; |
| 7625 if (n == "false") return false; | 8057 if (n == "false") return false; |
| 7626 if (n == null) return null; | 8058 if (n == null) return null; |
| 7627 throw new core.ArgumentError("Invalid boolean: $n"); | 8059 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7628 } | 8060 } |
| 8061 |
| 7629 if (query.length > 0) { | 8062 if (query.length > 0) { |
| 7630 for (var part in query.split("&")) { | 8063 for (var part in query.split("&")) { |
| 7631 var keyvalue = part.split("="); | 8064 var keyvalue = part.split("="); |
| 7632 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8065 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8066 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7633 } | 8067 } |
| 7634 } | 8068 } |
| 7635 | 8069 |
| 7636 | |
| 7637 var h = { | 8070 var h = { |
| 7638 "content-type" : "application/json; charset=utf-8", | 8071 "content-type": "application/json; charset=utf-8", |
| 7639 }; | 8072 }; |
| 7640 var resp = convert.JSON.encode(buildProfileFilterLink()); | 8073 var resp = convert.JSON.encode(buildProfileFilterLink()); |
| 7641 return new async.Future.value(stringResponse(200, h, resp)); | 8074 return new async.Future.value(stringResponse(200, h, resp)); |
| 7642 }), true); | 8075 }), true); |
| 7643 res.update(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, a
rg_linkId).then(unittest.expectAsync1(((api.ProfileFilterLink response) { | 8076 res |
| 8077 .update(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, |
| 8078 arg_linkId) |
| 8079 .then(unittest.expectAsync1(((api.ProfileFilterLink response) { |
| 7644 checkProfileFilterLink(response); | 8080 checkProfileFilterLink(response); |
| 7645 }))); | 8081 }))); |
| 7646 }); | 8082 }); |
| 7647 | |
| 7648 }); | 8083 }); |
| 7649 | 8084 |
| 7650 | |
| 7651 unittest.group("resource-ManagementProfileUserLinksResourceApi", () { | 8085 unittest.group("resource-ManagementProfileUserLinksResourceApi", () { |
| 7652 unittest.test("method--delete", () { | 8086 unittest.test("method--delete", () { |
| 7653 | |
| 7654 var mock = new HttpServerMock(); | 8087 var mock = new HttpServerMock(); |
| 7655 api.ManagementProfileUserLinksResourceApi res = new api.AnalyticsApi(mock)
.management.profileUserLinks; | 8088 api.ManagementProfileUserLinksResourceApi res = |
| 8089 new api.AnalyticsApi(mock).management.profileUserLinks; |
| 7656 var arg_accountId = "foo"; | 8090 var arg_accountId = "foo"; |
| 7657 var arg_webPropertyId = "foo"; | 8091 var arg_webPropertyId = "foo"; |
| 7658 var arg_profileId = "foo"; | 8092 var arg_profileId = "foo"; |
| 7659 var arg_linkId = "foo"; | 8093 var arg_linkId = "foo"; |
| 7660 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8094 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7661 var path = (req.url).path; | 8095 var path = (req.url).path; |
| 7662 var pathOffset = 0; | 8096 var pathOffset = 0; |
| 7663 var index; | 8097 var index; |
| 7664 var subPart; | 8098 var subPart; |
| 7665 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8099 unittest.expect( |
| 8100 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7666 pathOffset += 1; | 8101 pathOffset += 1; |
| 7667 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8102 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8103 unittest.equals("analytics/v3/")); |
| 7668 pathOffset += 13; | 8104 pathOffset += 13; |
| 7669 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8105 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8106 unittest.equals("management/accounts/")); |
| 7670 pathOffset += 20; | 8107 pathOffset += 20; |
| 7671 index = path.indexOf("/webproperties/", pathOffset); | 8108 index = path.indexOf("/webproperties/", pathOffset); |
| 7672 unittest.expect(index >= 0, unittest.isTrue); | 8109 unittest.expect(index >= 0, unittest.isTrue); |
| 7673 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8110 subPart = |
| 8111 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7674 pathOffset = index; | 8112 pathOffset = index; |
| 7675 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8113 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7676 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8114 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8115 unittest.equals("/webproperties/")); |
| 7677 pathOffset += 15; | 8116 pathOffset += 15; |
| 7678 index = path.indexOf("/profiles/", pathOffset); | 8117 index = path.indexOf("/profiles/", pathOffset); |
| 7679 unittest.expect(index >= 0, unittest.isTrue); | 8118 unittest.expect(index >= 0, unittest.isTrue); |
| 7680 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8119 subPart = |
| 8120 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7681 pathOffset = index; | 8121 pathOffset = index; |
| 7682 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 8122 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7683 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 8123 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 8124 unittest.equals("/profiles/")); |
| 7684 pathOffset += 10; | 8125 pathOffset += 10; |
| 7685 index = path.indexOf("/entityUserLinks/", pathOffset); | 8126 index = path.indexOf("/entityUserLinks/", pathOffset); |
| 7686 unittest.expect(index >= 0, unittest.isTrue); | 8127 unittest.expect(index >= 0, unittest.isTrue); |
| 7687 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8128 subPart = |
| 8129 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7688 pathOffset = index; | 8130 pathOffset = index; |
| 7689 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 8131 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7690 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/entityUserLinks/")); | 8132 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 8133 unittest.equals("/entityUserLinks/")); |
| 7691 pathOffset += 17; | 8134 pathOffset += 17; |
| 7692 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 8135 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 7693 pathOffset = path.length; | 8136 pathOffset = path.length; |
| 7694 unittest.expect(subPart, unittest.equals("$arg_linkId")); | 8137 unittest.expect(subPart, unittest.equals("$arg_linkId")); |
| 7695 | 8138 |
| 7696 var query = (req.url).query; | 8139 var query = (req.url).query; |
| 7697 var queryOffset = 0; | 8140 var queryOffset = 0; |
| 7698 var queryMap = {}; | 8141 var queryMap = {}; |
| 7699 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8142 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7700 parseBool(n) { | 8143 parseBool(n) { |
| 7701 if (n == "true") return true; | 8144 if (n == "true") return true; |
| 7702 if (n == "false") return false; | 8145 if (n == "false") return false; |
| 7703 if (n == null) return null; | 8146 if (n == null) return null; |
| 7704 throw new core.ArgumentError("Invalid boolean: $n"); | 8147 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7705 } | 8148 } |
| 8149 |
| 7706 if (query.length > 0) { | 8150 if (query.length > 0) { |
| 7707 for (var part in query.split("&")) { | 8151 for (var part in query.split("&")) { |
| 7708 var keyvalue = part.split("="); | 8152 var keyvalue = part.split("="); |
| 7709 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8153 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8154 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7710 } | 8155 } |
| 7711 } | 8156 } |
| 7712 | 8157 |
| 7713 | |
| 7714 var h = { | 8158 var h = { |
| 7715 "content-type" : "application/json; charset=utf-8", | 8159 "content-type": "application/json; charset=utf-8", |
| 7716 }; | 8160 }; |
| 7717 var resp = ""; | 8161 var resp = ""; |
| 7718 return new async.Future.value(stringResponse(200, h, resp)); | 8162 return new async.Future.value(stringResponse(200, h, resp)); |
| 7719 }), true); | 8163 }), true); |
| 7720 res.delete(arg_accountId, arg_webPropertyId, arg_profileId, arg_linkId).th
en(unittest.expectAsync1((_) {})); | 8164 res |
| 8165 .delete(arg_accountId, arg_webPropertyId, arg_profileId, arg_linkId) |
| 8166 .then(unittest.expectAsync1((_) {})); |
| 7721 }); | 8167 }); |
| 7722 | 8168 |
| 7723 unittest.test("method--insert", () { | 8169 unittest.test("method--insert", () { |
| 7724 | |
| 7725 var mock = new HttpServerMock(); | 8170 var mock = new HttpServerMock(); |
| 7726 api.ManagementProfileUserLinksResourceApi res = new api.AnalyticsApi(mock)
.management.profileUserLinks; | 8171 api.ManagementProfileUserLinksResourceApi res = |
| 8172 new api.AnalyticsApi(mock).management.profileUserLinks; |
| 7727 var arg_request = buildEntityUserLink(); | 8173 var arg_request = buildEntityUserLink(); |
| 7728 var arg_accountId = "foo"; | 8174 var arg_accountId = "foo"; |
| 7729 var arg_webPropertyId = "foo"; | 8175 var arg_webPropertyId = "foo"; |
| 7730 var arg_profileId = "foo"; | 8176 var arg_profileId = "foo"; |
| 7731 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8177 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7732 var obj = new api.EntityUserLink.fromJson(json); | 8178 var obj = new api.EntityUserLink.fromJson(json); |
| 7733 checkEntityUserLink(obj); | 8179 checkEntityUserLink(obj); |
| 7734 | 8180 |
| 7735 var path = (req.url).path; | 8181 var path = (req.url).path; |
| 7736 var pathOffset = 0; | 8182 var pathOffset = 0; |
| 7737 var index; | 8183 var index; |
| 7738 var subPart; | 8184 var subPart; |
| 7739 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8185 unittest.expect( |
| 8186 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7740 pathOffset += 1; | 8187 pathOffset += 1; |
| 7741 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8188 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8189 unittest.equals("analytics/v3/")); |
| 7742 pathOffset += 13; | 8190 pathOffset += 13; |
| 7743 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8191 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8192 unittest.equals("management/accounts/")); |
| 7744 pathOffset += 20; | 8193 pathOffset += 20; |
| 7745 index = path.indexOf("/webproperties/", pathOffset); | 8194 index = path.indexOf("/webproperties/", pathOffset); |
| 7746 unittest.expect(index >= 0, unittest.isTrue); | 8195 unittest.expect(index >= 0, unittest.isTrue); |
| 7747 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8196 subPart = |
| 8197 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7748 pathOffset = index; | 8198 pathOffset = index; |
| 7749 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8199 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7750 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8200 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8201 unittest.equals("/webproperties/")); |
| 7751 pathOffset += 15; | 8202 pathOffset += 15; |
| 7752 index = path.indexOf("/profiles/", pathOffset); | 8203 index = path.indexOf("/profiles/", pathOffset); |
| 7753 unittest.expect(index >= 0, unittest.isTrue); | 8204 unittest.expect(index >= 0, unittest.isTrue); |
| 7754 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8205 subPart = |
| 8206 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7755 pathOffset = index; | 8207 pathOffset = index; |
| 7756 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 8208 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7757 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 8209 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 8210 unittest.equals("/profiles/")); |
| 7758 pathOffset += 10; | 8211 pathOffset += 10; |
| 7759 index = path.indexOf("/entityUserLinks", pathOffset); | 8212 index = path.indexOf("/entityUserLinks", pathOffset); |
| 7760 unittest.expect(index >= 0, unittest.isTrue); | 8213 unittest.expect(index >= 0, unittest.isTrue); |
| 7761 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8214 subPart = |
| 8215 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7762 pathOffset = index; | 8216 pathOffset = index; |
| 7763 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 8217 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7764 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/entityUserLinks")); | 8218 unittest.expect(path.substring(pathOffset, pathOffset + 16), |
| 8219 unittest.equals("/entityUserLinks")); |
| 7765 pathOffset += 16; | 8220 pathOffset += 16; |
| 7766 | 8221 |
| 7767 var query = (req.url).query; | 8222 var query = (req.url).query; |
| 7768 var queryOffset = 0; | 8223 var queryOffset = 0; |
| 7769 var queryMap = {}; | 8224 var queryMap = {}; |
| 7770 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8225 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7771 parseBool(n) { | 8226 parseBool(n) { |
| 7772 if (n == "true") return true; | 8227 if (n == "true") return true; |
| 7773 if (n == "false") return false; | 8228 if (n == "false") return false; |
| 7774 if (n == null) return null; | 8229 if (n == null) return null; |
| 7775 throw new core.ArgumentError("Invalid boolean: $n"); | 8230 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7776 } | 8231 } |
| 8232 |
| 7777 if (query.length > 0) { | 8233 if (query.length > 0) { |
| 7778 for (var part in query.split("&")) { | 8234 for (var part in query.split("&")) { |
| 7779 var keyvalue = part.split("="); | 8235 var keyvalue = part.split("="); |
| 7780 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8236 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8237 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7781 } | 8238 } |
| 7782 } | 8239 } |
| 7783 | 8240 |
| 7784 | |
| 7785 var h = { | 8241 var h = { |
| 7786 "content-type" : "application/json; charset=utf-8", | 8242 "content-type": "application/json; charset=utf-8", |
| 7787 }; | 8243 }; |
| 7788 var resp = convert.JSON.encode(buildEntityUserLink()); | 8244 var resp = convert.JSON.encode(buildEntityUserLink()); |
| 7789 return new async.Future.value(stringResponse(200, h, resp)); | 8245 return new async.Future.value(stringResponse(200, h, resp)); |
| 7790 }), true); | 8246 }), true); |
| 7791 res.insert(arg_request, arg_accountId, arg_webPropertyId, arg_profileId).t
hen(unittest.expectAsync1(((api.EntityUserLink response) { | 8247 res |
| 8248 .insert(arg_request, arg_accountId, arg_webPropertyId, arg_profileId) |
| 8249 .then(unittest.expectAsync1(((api.EntityUserLink response) { |
| 7792 checkEntityUserLink(response); | 8250 checkEntityUserLink(response); |
| 7793 }))); | 8251 }))); |
| 7794 }); | 8252 }); |
| 7795 | 8253 |
| 7796 unittest.test("method--list", () { | 8254 unittest.test("method--list", () { |
| 7797 | |
| 7798 var mock = new HttpServerMock(); | 8255 var mock = new HttpServerMock(); |
| 7799 api.ManagementProfileUserLinksResourceApi res = new api.AnalyticsApi(mock)
.management.profileUserLinks; | 8256 api.ManagementProfileUserLinksResourceApi res = |
| 8257 new api.AnalyticsApi(mock).management.profileUserLinks; |
| 7800 var arg_accountId = "foo"; | 8258 var arg_accountId = "foo"; |
| 7801 var arg_webPropertyId = "foo"; | 8259 var arg_webPropertyId = "foo"; |
| 7802 var arg_profileId = "foo"; | 8260 var arg_profileId = "foo"; |
| 7803 var arg_max_results = 42; | 8261 var arg_max_results = 42; |
| 7804 var arg_start_index = 42; | 8262 var arg_start_index = 42; |
| 7805 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8263 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7806 var path = (req.url).path; | 8264 var path = (req.url).path; |
| 7807 var pathOffset = 0; | 8265 var pathOffset = 0; |
| 7808 var index; | 8266 var index; |
| 7809 var subPart; | 8267 var subPart; |
| 7810 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8268 unittest.expect( |
| 8269 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7811 pathOffset += 1; | 8270 pathOffset += 1; |
| 7812 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8271 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8272 unittest.equals("analytics/v3/")); |
| 7813 pathOffset += 13; | 8273 pathOffset += 13; |
| 7814 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8274 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8275 unittest.equals("management/accounts/")); |
| 7815 pathOffset += 20; | 8276 pathOffset += 20; |
| 7816 index = path.indexOf("/webproperties/", pathOffset); | 8277 index = path.indexOf("/webproperties/", pathOffset); |
| 7817 unittest.expect(index >= 0, unittest.isTrue); | 8278 unittest.expect(index >= 0, unittest.isTrue); |
| 7818 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8279 subPart = |
| 8280 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7819 pathOffset = index; | 8281 pathOffset = index; |
| 7820 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8282 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7821 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8283 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8284 unittest.equals("/webproperties/")); |
| 7822 pathOffset += 15; | 8285 pathOffset += 15; |
| 7823 index = path.indexOf("/profiles/", pathOffset); | 8286 index = path.indexOf("/profiles/", pathOffset); |
| 7824 unittest.expect(index >= 0, unittest.isTrue); | 8287 unittest.expect(index >= 0, unittest.isTrue); |
| 7825 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8288 subPart = |
| 8289 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7826 pathOffset = index; | 8290 pathOffset = index; |
| 7827 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 8291 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7828 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 8292 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 8293 unittest.equals("/profiles/")); |
| 7829 pathOffset += 10; | 8294 pathOffset += 10; |
| 7830 index = path.indexOf("/entityUserLinks", pathOffset); | 8295 index = path.indexOf("/entityUserLinks", pathOffset); |
| 7831 unittest.expect(index >= 0, unittest.isTrue); | 8296 unittest.expect(index >= 0, unittest.isTrue); |
| 7832 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8297 subPart = |
| 8298 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7833 pathOffset = index; | 8299 pathOffset = index; |
| 7834 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 8300 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7835 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/entityUserLinks")); | 8301 unittest.expect(path.substring(pathOffset, pathOffset + 16), |
| 8302 unittest.equals("/entityUserLinks")); |
| 7836 pathOffset += 16; | 8303 pathOffset += 16; |
| 7837 | 8304 |
| 7838 var query = (req.url).query; | 8305 var query = (req.url).query; |
| 7839 var queryOffset = 0; | 8306 var queryOffset = 0; |
| 7840 var queryMap = {}; | 8307 var queryMap = {}; |
| 7841 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8308 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7842 parseBool(n) { | 8309 parseBool(n) { |
| 7843 if (n == "true") return true; | 8310 if (n == "true") return true; |
| 7844 if (n == "false") return false; | 8311 if (n == "false") return false; |
| 7845 if (n == null) return null; | 8312 if (n == null) return null; |
| 7846 throw new core.ArgumentError("Invalid boolean: $n"); | 8313 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7847 } | 8314 } |
| 8315 |
| 7848 if (query.length > 0) { | 8316 if (query.length > 0) { |
| 7849 for (var part in query.split("&")) { | 8317 for (var part in query.split("&")) { |
| 7850 var keyvalue = part.split("="); | 8318 var keyvalue = part.split("="); |
| 7851 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8319 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8320 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7852 } | 8321 } |
| 7853 } | 8322 } |
| 7854 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 8323 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 7855 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 8324 unittest.equals(arg_max_results)); |
| 7856 | 8325 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 8326 unittest.equals(arg_start_index)); |
| 7857 | 8327 |
| 7858 var h = { | 8328 var h = { |
| 7859 "content-type" : "application/json; charset=utf-8", | 8329 "content-type": "application/json; charset=utf-8", |
| 7860 }; | 8330 }; |
| 7861 var resp = convert.JSON.encode(buildEntityUserLinks()); | 8331 var resp = convert.JSON.encode(buildEntityUserLinks()); |
| 7862 return new async.Future.value(stringResponse(200, h, resp)); | 8332 return new async.Future.value(stringResponse(200, h, resp)); |
| 7863 }), true); | 8333 }), true); |
| 7864 res.list(arg_accountId, arg_webPropertyId, arg_profileId, max_results: arg
_max_results, start_index: arg_start_index).then(unittest.expectAsync1(((api.Ent
ityUserLinks response) { | 8334 res |
| 8335 .list(arg_accountId, arg_webPropertyId, arg_profileId, |
| 8336 max_results: arg_max_results, start_index: arg_start_index) |
| 8337 .then(unittest.expectAsync1(((api.EntityUserLinks response) { |
| 7865 checkEntityUserLinks(response); | 8338 checkEntityUserLinks(response); |
| 7866 }))); | 8339 }))); |
| 7867 }); | 8340 }); |
| 7868 | 8341 |
| 7869 unittest.test("method--update", () { | 8342 unittest.test("method--update", () { |
| 7870 | |
| 7871 var mock = new HttpServerMock(); | 8343 var mock = new HttpServerMock(); |
| 7872 api.ManagementProfileUserLinksResourceApi res = new api.AnalyticsApi(mock)
.management.profileUserLinks; | 8344 api.ManagementProfileUserLinksResourceApi res = |
| 8345 new api.AnalyticsApi(mock).management.profileUserLinks; |
| 7873 var arg_request = buildEntityUserLink(); | 8346 var arg_request = buildEntityUserLink(); |
| 7874 var arg_accountId = "foo"; | 8347 var arg_accountId = "foo"; |
| 7875 var arg_webPropertyId = "foo"; | 8348 var arg_webPropertyId = "foo"; |
| 7876 var arg_profileId = "foo"; | 8349 var arg_profileId = "foo"; |
| 7877 var arg_linkId = "foo"; | 8350 var arg_linkId = "foo"; |
| 7878 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8351 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7879 var obj = new api.EntityUserLink.fromJson(json); | 8352 var obj = new api.EntityUserLink.fromJson(json); |
| 7880 checkEntityUserLink(obj); | 8353 checkEntityUserLink(obj); |
| 7881 | 8354 |
| 7882 var path = (req.url).path; | 8355 var path = (req.url).path; |
| 7883 var pathOffset = 0; | 8356 var pathOffset = 0; |
| 7884 var index; | 8357 var index; |
| 7885 var subPart; | 8358 var subPart; |
| 7886 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8359 unittest.expect( |
| 8360 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7887 pathOffset += 1; | 8361 pathOffset += 1; |
| 7888 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8362 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8363 unittest.equals("analytics/v3/")); |
| 7889 pathOffset += 13; | 8364 pathOffset += 13; |
| 7890 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8365 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8366 unittest.equals("management/accounts/")); |
| 7891 pathOffset += 20; | 8367 pathOffset += 20; |
| 7892 index = path.indexOf("/webproperties/", pathOffset); | 8368 index = path.indexOf("/webproperties/", pathOffset); |
| 7893 unittest.expect(index >= 0, unittest.isTrue); | 8369 unittest.expect(index >= 0, unittest.isTrue); |
| 7894 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8370 subPart = |
| 8371 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7895 pathOffset = index; | 8372 pathOffset = index; |
| 7896 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8373 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7897 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8374 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8375 unittest.equals("/webproperties/")); |
| 7898 pathOffset += 15; | 8376 pathOffset += 15; |
| 7899 index = path.indexOf("/profiles/", pathOffset); | 8377 index = path.indexOf("/profiles/", pathOffset); |
| 7900 unittest.expect(index >= 0, unittest.isTrue); | 8378 unittest.expect(index >= 0, unittest.isTrue); |
| 7901 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8379 subPart = |
| 8380 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7902 pathOffset = index; | 8381 pathOffset = index; |
| 7903 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 8382 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7904 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 8383 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 8384 unittest.equals("/profiles/")); |
| 7905 pathOffset += 10; | 8385 pathOffset += 10; |
| 7906 index = path.indexOf("/entityUserLinks/", pathOffset); | 8386 index = path.indexOf("/entityUserLinks/", pathOffset); |
| 7907 unittest.expect(index >= 0, unittest.isTrue); | 8387 unittest.expect(index >= 0, unittest.isTrue); |
| 7908 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8388 subPart = |
| 8389 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7909 pathOffset = index; | 8390 pathOffset = index; |
| 7910 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 8391 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7911 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/entityUserLinks/")); | 8392 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 8393 unittest.equals("/entityUserLinks/")); |
| 7912 pathOffset += 17; | 8394 pathOffset += 17; |
| 7913 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 8395 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 7914 pathOffset = path.length; | 8396 pathOffset = path.length; |
| 7915 unittest.expect(subPart, unittest.equals("$arg_linkId")); | 8397 unittest.expect(subPart, unittest.equals("$arg_linkId")); |
| 7916 | 8398 |
| 7917 var query = (req.url).query; | 8399 var query = (req.url).query; |
| 7918 var queryOffset = 0; | 8400 var queryOffset = 0; |
| 7919 var queryMap = {}; | 8401 var queryMap = {}; |
| 7920 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8402 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7921 parseBool(n) { | 8403 parseBool(n) { |
| 7922 if (n == "true") return true; | 8404 if (n == "true") return true; |
| 7923 if (n == "false") return false; | 8405 if (n == "false") return false; |
| 7924 if (n == null) return null; | 8406 if (n == null) return null; |
| 7925 throw new core.ArgumentError("Invalid boolean: $n"); | 8407 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7926 } | 8408 } |
| 8409 |
| 7927 if (query.length > 0) { | 8410 if (query.length > 0) { |
| 7928 for (var part in query.split("&")) { | 8411 for (var part in query.split("&")) { |
| 7929 var keyvalue = part.split("="); | 8412 var keyvalue = part.split("="); |
| 7930 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8413 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8414 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7931 } | 8415 } |
| 7932 } | 8416 } |
| 7933 | 8417 |
| 7934 | |
| 7935 var h = { | 8418 var h = { |
| 7936 "content-type" : "application/json; charset=utf-8", | 8419 "content-type": "application/json; charset=utf-8", |
| 7937 }; | 8420 }; |
| 7938 var resp = convert.JSON.encode(buildEntityUserLink()); | 8421 var resp = convert.JSON.encode(buildEntityUserLink()); |
| 7939 return new async.Future.value(stringResponse(200, h, resp)); | 8422 return new async.Future.value(stringResponse(200, h, resp)); |
| 7940 }), true); | 8423 }), true); |
| 7941 res.update(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, a
rg_linkId).then(unittest.expectAsync1(((api.EntityUserLink response) { | 8424 res |
| 8425 .update(arg_request, arg_accountId, arg_webPropertyId, arg_profileId, |
| 8426 arg_linkId) |
| 8427 .then(unittest.expectAsync1(((api.EntityUserLink response) { |
| 7942 checkEntityUserLink(response); | 8428 checkEntityUserLink(response); |
| 7943 }))); | 8429 }))); |
| 7944 }); | 8430 }); |
| 7945 | |
| 7946 }); | 8431 }); |
| 7947 | 8432 |
| 7948 | |
| 7949 unittest.group("resource-ManagementProfilesResourceApi", () { | 8433 unittest.group("resource-ManagementProfilesResourceApi", () { |
| 7950 unittest.test("method--delete", () { | 8434 unittest.test("method--delete", () { |
| 7951 | |
| 7952 var mock = new HttpServerMock(); | 8435 var mock = new HttpServerMock(); |
| 7953 api.ManagementProfilesResourceApi res = new api.AnalyticsApi(mock).managem
ent.profiles; | 8436 api.ManagementProfilesResourceApi res = |
| 8437 new api.AnalyticsApi(mock).management.profiles; |
| 7954 var arg_accountId = "foo"; | 8438 var arg_accountId = "foo"; |
| 7955 var arg_webPropertyId = "foo"; | 8439 var arg_webPropertyId = "foo"; |
| 7956 var arg_profileId = "foo"; | 8440 var arg_profileId = "foo"; |
| 7957 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8441 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7958 var path = (req.url).path; | 8442 var path = (req.url).path; |
| 7959 var pathOffset = 0; | 8443 var pathOffset = 0; |
| 7960 var index; | 8444 var index; |
| 7961 var subPart; | 8445 var subPart; |
| 7962 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8446 unittest.expect( |
| 8447 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7963 pathOffset += 1; | 8448 pathOffset += 1; |
| 7964 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8449 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8450 unittest.equals("analytics/v3/")); |
| 7965 pathOffset += 13; | 8451 pathOffset += 13; |
| 7966 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8452 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8453 unittest.equals("management/accounts/")); |
| 7967 pathOffset += 20; | 8454 pathOffset += 20; |
| 7968 index = path.indexOf("/webproperties/", pathOffset); | 8455 index = path.indexOf("/webproperties/", pathOffset); |
| 7969 unittest.expect(index >= 0, unittest.isTrue); | 8456 unittest.expect(index >= 0, unittest.isTrue); |
| 7970 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8457 subPart = |
| 8458 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7971 pathOffset = index; | 8459 pathOffset = index; |
| 7972 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8460 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 7973 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8461 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8462 unittest.equals("/webproperties/")); |
| 7974 pathOffset += 15; | 8463 pathOffset += 15; |
| 7975 index = path.indexOf("/profiles/", pathOffset); | 8464 index = path.indexOf("/profiles/", pathOffset); |
| 7976 unittest.expect(index >= 0, unittest.isTrue); | 8465 unittest.expect(index >= 0, unittest.isTrue); |
| 7977 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8466 subPart = |
| 8467 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7978 pathOffset = index; | 8468 pathOffset = index; |
| 7979 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 8469 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 7980 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 8470 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 8471 unittest.equals("/profiles/")); |
| 7981 pathOffset += 10; | 8472 pathOffset += 10; |
| 7982 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 8473 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 7983 pathOffset = path.length; | 8474 pathOffset = path.length; |
| 7984 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 8475 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 7985 | 8476 |
| 7986 var query = (req.url).query; | 8477 var query = (req.url).query; |
| 7987 var queryOffset = 0; | 8478 var queryOffset = 0; |
| 7988 var queryMap = {}; | 8479 var queryMap = {}; |
| 7989 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8480 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7990 parseBool(n) { | 8481 parseBool(n) { |
| 7991 if (n == "true") return true; | 8482 if (n == "true") return true; |
| 7992 if (n == "false") return false; | 8483 if (n == "false") return false; |
| 7993 if (n == null) return null; | 8484 if (n == null) return null; |
| 7994 throw new core.ArgumentError("Invalid boolean: $n"); | 8485 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7995 } | 8486 } |
| 8487 |
| 7996 if (query.length > 0) { | 8488 if (query.length > 0) { |
| 7997 for (var part in query.split("&")) { | 8489 for (var part in query.split("&")) { |
| 7998 var keyvalue = part.split("="); | 8490 var keyvalue = part.split("="); |
| 7999 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8491 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8492 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8000 } | 8493 } |
| 8001 } | 8494 } |
| 8002 | 8495 |
| 8003 | |
| 8004 var h = { | 8496 var h = { |
| 8005 "content-type" : "application/json; charset=utf-8", | 8497 "content-type": "application/json; charset=utf-8", |
| 8006 }; | 8498 }; |
| 8007 var resp = ""; | 8499 var resp = ""; |
| 8008 return new async.Future.value(stringResponse(200, h, resp)); | 8500 return new async.Future.value(stringResponse(200, h, resp)); |
| 8009 }), true); | 8501 }), true); |
| 8010 res.delete(arg_accountId, arg_webPropertyId, arg_profileId).then(unittest.
expectAsync1((_) {})); | 8502 res |
| 8503 .delete(arg_accountId, arg_webPropertyId, arg_profileId) |
| 8504 .then(unittest.expectAsync1((_) {})); |
| 8011 }); | 8505 }); |
| 8012 | 8506 |
| 8013 unittest.test("method--get", () { | 8507 unittest.test("method--get", () { |
| 8014 | |
| 8015 var mock = new HttpServerMock(); | 8508 var mock = new HttpServerMock(); |
| 8016 api.ManagementProfilesResourceApi res = new api.AnalyticsApi(mock).managem
ent.profiles; | 8509 api.ManagementProfilesResourceApi res = |
| 8510 new api.AnalyticsApi(mock).management.profiles; |
| 8017 var arg_accountId = "foo"; | 8511 var arg_accountId = "foo"; |
| 8018 var arg_webPropertyId = "foo"; | 8512 var arg_webPropertyId = "foo"; |
| 8019 var arg_profileId = "foo"; | 8513 var arg_profileId = "foo"; |
| 8020 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8514 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8021 var path = (req.url).path; | 8515 var path = (req.url).path; |
| 8022 var pathOffset = 0; | 8516 var pathOffset = 0; |
| 8023 var index; | 8517 var index; |
| 8024 var subPart; | 8518 var subPart; |
| 8025 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8519 unittest.expect( |
| 8520 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8026 pathOffset += 1; | 8521 pathOffset += 1; |
| 8027 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8522 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8523 unittest.equals("analytics/v3/")); |
| 8028 pathOffset += 13; | 8524 pathOffset += 13; |
| 8029 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8525 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8526 unittest.equals("management/accounts/")); |
| 8030 pathOffset += 20; | 8527 pathOffset += 20; |
| 8031 index = path.indexOf("/webproperties/", pathOffset); | 8528 index = path.indexOf("/webproperties/", pathOffset); |
| 8032 unittest.expect(index >= 0, unittest.isTrue); | 8529 unittest.expect(index >= 0, unittest.isTrue); |
| 8033 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8530 subPart = |
| 8531 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8034 pathOffset = index; | 8532 pathOffset = index; |
| 8035 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8533 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8036 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8534 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8535 unittest.equals("/webproperties/")); |
| 8037 pathOffset += 15; | 8536 pathOffset += 15; |
| 8038 index = path.indexOf("/profiles/", pathOffset); | 8537 index = path.indexOf("/profiles/", pathOffset); |
| 8039 unittest.expect(index >= 0, unittest.isTrue); | 8538 unittest.expect(index >= 0, unittest.isTrue); |
| 8040 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8539 subPart = |
| 8540 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8041 pathOffset = index; | 8541 pathOffset = index; |
| 8042 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 8542 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8043 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 8543 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 8544 unittest.equals("/profiles/")); |
| 8044 pathOffset += 10; | 8545 pathOffset += 10; |
| 8045 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 8546 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 8046 pathOffset = path.length; | 8547 pathOffset = path.length; |
| 8047 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 8548 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 8048 | 8549 |
| 8049 var query = (req.url).query; | 8550 var query = (req.url).query; |
| 8050 var queryOffset = 0; | 8551 var queryOffset = 0; |
| 8051 var queryMap = {}; | 8552 var queryMap = {}; |
| 8052 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8553 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8053 parseBool(n) { | 8554 parseBool(n) { |
| 8054 if (n == "true") return true; | 8555 if (n == "true") return true; |
| 8055 if (n == "false") return false; | 8556 if (n == "false") return false; |
| 8056 if (n == null) return null; | 8557 if (n == null) return null; |
| 8057 throw new core.ArgumentError("Invalid boolean: $n"); | 8558 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8058 } | 8559 } |
| 8560 |
| 8059 if (query.length > 0) { | 8561 if (query.length > 0) { |
| 8060 for (var part in query.split("&")) { | 8562 for (var part in query.split("&")) { |
| 8061 var keyvalue = part.split("="); | 8563 var keyvalue = part.split("="); |
| 8062 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8564 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8565 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8063 } | 8566 } |
| 8064 } | 8567 } |
| 8065 | 8568 |
| 8066 | |
| 8067 var h = { | 8569 var h = { |
| 8068 "content-type" : "application/json; charset=utf-8", | 8570 "content-type": "application/json; charset=utf-8", |
| 8069 }; | 8571 }; |
| 8070 var resp = convert.JSON.encode(buildProfile()); | 8572 var resp = convert.JSON.encode(buildProfile()); |
| 8071 return new async.Future.value(stringResponse(200, h, resp)); | 8573 return new async.Future.value(stringResponse(200, h, resp)); |
| 8072 }), true); | 8574 }), true); |
| 8073 res.get(arg_accountId, arg_webPropertyId, arg_profileId).then(unittest.exp
ectAsync1(((api.Profile response) { | 8575 res |
| 8576 .get(arg_accountId, arg_webPropertyId, arg_profileId) |
| 8577 .then(unittest.expectAsync1(((api.Profile response) { |
| 8074 checkProfile(response); | 8578 checkProfile(response); |
| 8075 }))); | 8579 }))); |
| 8076 }); | 8580 }); |
| 8077 | 8581 |
| 8078 unittest.test("method--insert", () { | 8582 unittest.test("method--insert", () { |
| 8079 | |
| 8080 var mock = new HttpServerMock(); | 8583 var mock = new HttpServerMock(); |
| 8081 api.ManagementProfilesResourceApi res = new api.AnalyticsApi(mock).managem
ent.profiles; | 8584 api.ManagementProfilesResourceApi res = |
| 8585 new api.AnalyticsApi(mock).management.profiles; |
| 8082 var arg_request = buildProfile(); | 8586 var arg_request = buildProfile(); |
| 8083 var arg_accountId = "foo"; | 8587 var arg_accountId = "foo"; |
| 8084 var arg_webPropertyId = "foo"; | 8588 var arg_webPropertyId = "foo"; |
| 8085 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8589 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8086 var obj = new api.Profile.fromJson(json); | 8590 var obj = new api.Profile.fromJson(json); |
| 8087 checkProfile(obj); | 8591 checkProfile(obj); |
| 8088 | 8592 |
| 8089 var path = (req.url).path; | 8593 var path = (req.url).path; |
| 8090 var pathOffset = 0; | 8594 var pathOffset = 0; |
| 8091 var index; | 8595 var index; |
| 8092 var subPart; | 8596 var subPart; |
| 8093 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8597 unittest.expect( |
| 8598 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8094 pathOffset += 1; | 8599 pathOffset += 1; |
| 8095 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8600 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8601 unittest.equals("analytics/v3/")); |
| 8096 pathOffset += 13; | 8602 pathOffset += 13; |
| 8097 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8603 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8604 unittest.equals("management/accounts/")); |
| 8098 pathOffset += 20; | 8605 pathOffset += 20; |
| 8099 index = path.indexOf("/webproperties/", pathOffset); | 8606 index = path.indexOf("/webproperties/", pathOffset); |
| 8100 unittest.expect(index >= 0, unittest.isTrue); | 8607 unittest.expect(index >= 0, unittest.isTrue); |
| 8101 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8608 subPart = |
| 8609 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8102 pathOffset = index; | 8610 pathOffset = index; |
| 8103 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8611 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8104 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8612 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8613 unittest.equals("/webproperties/")); |
| 8105 pathOffset += 15; | 8614 pathOffset += 15; |
| 8106 index = path.indexOf("/profiles", pathOffset); | 8615 index = path.indexOf("/profiles", pathOffset); |
| 8107 unittest.expect(index >= 0, unittest.isTrue); | 8616 unittest.expect(index >= 0, unittest.isTrue); |
| 8108 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8617 subPart = |
| 8618 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8109 pathOffset = index; | 8619 pathOffset = index; |
| 8110 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 8620 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8111 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/profiles")); | 8621 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 8622 unittest.equals("/profiles")); |
| 8112 pathOffset += 9; | 8623 pathOffset += 9; |
| 8113 | 8624 |
| 8114 var query = (req.url).query; | 8625 var query = (req.url).query; |
| 8115 var queryOffset = 0; | 8626 var queryOffset = 0; |
| 8116 var queryMap = {}; | 8627 var queryMap = {}; |
| 8117 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8628 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8118 parseBool(n) { | 8629 parseBool(n) { |
| 8119 if (n == "true") return true; | 8630 if (n == "true") return true; |
| 8120 if (n == "false") return false; | 8631 if (n == "false") return false; |
| 8121 if (n == null) return null; | 8632 if (n == null) return null; |
| 8122 throw new core.ArgumentError("Invalid boolean: $n"); | 8633 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8123 } | 8634 } |
| 8635 |
| 8124 if (query.length > 0) { | 8636 if (query.length > 0) { |
| 8125 for (var part in query.split("&")) { | 8637 for (var part in query.split("&")) { |
| 8126 var keyvalue = part.split("="); | 8638 var keyvalue = part.split("="); |
| 8127 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8639 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8640 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8128 } | 8641 } |
| 8129 } | 8642 } |
| 8130 | 8643 |
| 8131 | |
| 8132 var h = { | 8644 var h = { |
| 8133 "content-type" : "application/json; charset=utf-8", | 8645 "content-type": "application/json; charset=utf-8", |
| 8134 }; | 8646 }; |
| 8135 var resp = convert.JSON.encode(buildProfile()); | 8647 var resp = convert.JSON.encode(buildProfile()); |
| 8136 return new async.Future.value(stringResponse(200, h, resp)); | 8648 return new async.Future.value(stringResponse(200, h, resp)); |
| 8137 }), true); | 8649 }), true); |
| 8138 res.insert(arg_request, arg_accountId, arg_webPropertyId).then(unittest.ex
pectAsync1(((api.Profile response) { | 8650 res |
| 8651 .insert(arg_request, arg_accountId, arg_webPropertyId) |
| 8652 .then(unittest.expectAsync1(((api.Profile response) { |
| 8139 checkProfile(response); | 8653 checkProfile(response); |
| 8140 }))); | 8654 }))); |
| 8141 }); | 8655 }); |
| 8142 | 8656 |
| 8143 unittest.test("method--list", () { | 8657 unittest.test("method--list", () { |
| 8144 | |
| 8145 var mock = new HttpServerMock(); | 8658 var mock = new HttpServerMock(); |
| 8146 api.ManagementProfilesResourceApi res = new api.AnalyticsApi(mock).managem
ent.profiles; | 8659 api.ManagementProfilesResourceApi res = |
| 8660 new api.AnalyticsApi(mock).management.profiles; |
| 8147 var arg_accountId = "foo"; | 8661 var arg_accountId = "foo"; |
| 8148 var arg_webPropertyId = "foo"; | 8662 var arg_webPropertyId = "foo"; |
| 8149 var arg_max_results = 42; | 8663 var arg_max_results = 42; |
| 8150 var arg_start_index = 42; | 8664 var arg_start_index = 42; |
| 8151 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8665 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8152 var path = (req.url).path; | 8666 var path = (req.url).path; |
| 8153 var pathOffset = 0; | 8667 var pathOffset = 0; |
| 8154 var index; | 8668 var index; |
| 8155 var subPart; | 8669 var subPart; |
| 8156 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8670 unittest.expect( |
| 8671 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8157 pathOffset += 1; | 8672 pathOffset += 1; |
| 8158 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8673 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8674 unittest.equals("analytics/v3/")); |
| 8159 pathOffset += 13; | 8675 pathOffset += 13; |
| 8160 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8676 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8677 unittest.equals("management/accounts/")); |
| 8161 pathOffset += 20; | 8678 pathOffset += 20; |
| 8162 index = path.indexOf("/webproperties/", pathOffset); | 8679 index = path.indexOf("/webproperties/", pathOffset); |
| 8163 unittest.expect(index >= 0, unittest.isTrue); | 8680 unittest.expect(index >= 0, unittest.isTrue); |
| 8164 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8681 subPart = |
| 8682 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8165 pathOffset = index; | 8683 pathOffset = index; |
| 8166 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8684 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8167 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8685 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8686 unittest.equals("/webproperties/")); |
| 8168 pathOffset += 15; | 8687 pathOffset += 15; |
| 8169 index = path.indexOf("/profiles", pathOffset); | 8688 index = path.indexOf("/profiles", pathOffset); |
| 8170 unittest.expect(index >= 0, unittest.isTrue); | 8689 unittest.expect(index >= 0, unittest.isTrue); |
| 8171 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8690 subPart = |
| 8691 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8172 pathOffset = index; | 8692 pathOffset = index; |
| 8173 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 8693 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8174 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/profiles")); | 8694 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 8695 unittest.equals("/profiles")); |
| 8175 pathOffset += 9; | 8696 pathOffset += 9; |
| 8176 | 8697 |
| 8177 var query = (req.url).query; | 8698 var query = (req.url).query; |
| 8178 var queryOffset = 0; | 8699 var queryOffset = 0; |
| 8179 var queryMap = {}; | 8700 var queryMap = {}; |
| 8180 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8701 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8181 parseBool(n) { | 8702 parseBool(n) { |
| 8182 if (n == "true") return true; | 8703 if (n == "true") return true; |
| 8183 if (n == "false") return false; | 8704 if (n == "false") return false; |
| 8184 if (n == null) return null; | 8705 if (n == null) return null; |
| 8185 throw new core.ArgumentError("Invalid boolean: $n"); | 8706 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8186 } | 8707 } |
| 8708 |
| 8187 if (query.length > 0) { | 8709 if (query.length > 0) { |
| 8188 for (var part in query.split("&")) { | 8710 for (var part in query.split("&")) { |
| 8189 var keyvalue = part.split("="); | 8711 var keyvalue = part.split("="); |
| 8190 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8712 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8713 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8191 } | 8714 } |
| 8192 } | 8715 } |
| 8193 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 8716 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 8194 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 8717 unittest.equals(arg_max_results)); |
| 8195 | 8718 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 8719 unittest.equals(arg_start_index)); |
| 8196 | 8720 |
| 8197 var h = { | 8721 var h = { |
| 8198 "content-type" : "application/json; charset=utf-8", | 8722 "content-type": "application/json; charset=utf-8", |
| 8199 }; | 8723 }; |
| 8200 var resp = convert.JSON.encode(buildProfiles()); | 8724 var resp = convert.JSON.encode(buildProfiles()); |
| 8201 return new async.Future.value(stringResponse(200, h, resp)); | 8725 return new async.Future.value(stringResponse(200, h, resp)); |
| 8202 }), true); | 8726 }), true); |
| 8203 res.list(arg_accountId, arg_webPropertyId, max_results: arg_max_results, s
tart_index: arg_start_index).then(unittest.expectAsync1(((api.Profiles response)
{ | 8727 res |
| 8728 .list(arg_accountId, arg_webPropertyId, |
| 8729 max_results: arg_max_results, start_index: arg_start_index) |
| 8730 .then(unittest.expectAsync1(((api.Profiles response) { |
| 8204 checkProfiles(response); | 8731 checkProfiles(response); |
| 8205 }))); | 8732 }))); |
| 8206 }); | 8733 }); |
| 8207 | 8734 |
| 8208 unittest.test("method--patch", () { | 8735 unittest.test("method--patch", () { |
| 8209 | |
| 8210 var mock = new HttpServerMock(); | 8736 var mock = new HttpServerMock(); |
| 8211 api.ManagementProfilesResourceApi res = new api.AnalyticsApi(mock).managem
ent.profiles; | 8737 api.ManagementProfilesResourceApi res = |
| 8738 new api.AnalyticsApi(mock).management.profiles; |
| 8212 var arg_request = buildProfile(); | 8739 var arg_request = buildProfile(); |
| 8213 var arg_accountId = "foo"; | 8740 var arg_accountId = "foo"; |
| 8214 var arg_webPropertyId = "foo"; | 8741 var arg_webPropertyId = "foo"; |
| 8215 var arg_profileId = "foo"; | 8742 var arg_profileId = "foo"; |
| 8216 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8743 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8217 var obj = new api.Profile.fromJson(json); | 8744 var obj = new api.Profile.fromJson(json); |
| 8218 checkProfile(obj); | 8745 checkProfile(obj); |
| 8219 | 8746 |
| 8220 var path = (req.url).path; | 8747 var path = (req.url).path; |
| 8221 var pathOffset = 0; | 8748 var pathOffset = 0; |
| 8222 var index; | 8749 var index; |
| 8223 var subPart; | 8750 var subPart; |
| 8224 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8751 unittest.expect( |
| 8752 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8225 pathOffset += 1; | 8753 pathOffset += 1; |
| 8226 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8754 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8755 unittest.equals("analytics/v3/")); |
| 8227 pathOffset += 13; | 8756 pathOffset += 13; |
| 8228 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8757 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8758 unittest.equals("management/accounts/")); |
| 8229 pathOffset += 20; | 8759 pathOffset += 20; |
| 8230 index = path.indexOf("/webproperties/", pathOffset); | 8760 index = path.indexOf("/webproperties/", pathOffset); |
| 8231 unittest.expect(index >= 0, unittest.isTrue); | 8761 unittest.expect(index >= 0, unittest.isTrue); |
| 8232 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8762 subPart = |
| 8763 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8233 pathOffset = index; | 8764 pathOffset = index; |
| 8234 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8765 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8235 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8766 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8767 unittest.equals("/webproperties/")); |
| 8236 pathOffset += 15; | 8768 pathOffset += 15; |
| 8237 index = path.indexOf("/profiles/", pathOffset); | 8769 index = path.indexOf("/profiles/", pathOffset); |
| 8238 unittest.expect(index >= 0, unittest.isTrue); | 8770 unittest.expect(index >= 0, unittest.isTrue); |
| 8239 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8771 subPart = |
| 8772 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8240 pathOffset = index; | 8773 pathOffset = index; |
| 8241 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 8774 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8242 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 8775 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 8776 unittest.equals("/profiles/")); |
| 8243 pathOffset += 10; | 8777 pathOffset += 10; |
| 8244 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 8778 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 8245 pathOffset = path.length; | 8779 pathOffset = path.length; |
| 8246 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 8780 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 8247 | 8781 |
| 8248 var query = (req.url).query; | 8782 var query = (req.url).query; |
| 8249 var queryOffset = 0; | 8783 var queryOffset = 0; |
| 8250 var queryMap = {}; | 8784 var queryMap = {}; |
| 8251 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8785 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8252 parseBool(n) { | 8786 parseBool(n) { |
| 8253 if (n == "true") return true; | 8787 if (n == "true") return true; |
| 8254 if (n == "false") return false; | 8788 if (n == "false") return false; |
| 8255 if (n == null) return null; | 8789 if (n == null) return null; |
| 8256 throw new core.ArgumentError("Invalid boolean: $n"); | 8790 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8257 } | 8791 } |
| 8792 |
| 8258 if (query.length > 0) { | 8793 if (query.length > 0) { |
| 8259 for (var part in query.split("&")) { | 8794 for (var part in query.split("&")) { |
| 8260 var keyvalue = part.split("="); | 8795 var keyvalue = part.split("="); |
| 8261 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8796 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8797 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8262 } | 8798 } |
| 8263 } | 8799 } |
| 8264 | 8800 |
| 8265 | |
| 8266 var h = { | 8801 var h = { |
| 8267 "content-type" : "application/json; charset=utf-8", | 8802 "content-type": "application/json; charset=utf-8", |
| 8268 }; | 8803 }; |
| 8269 var resp = convert.JSON.encode(buildProfile()); | 8804 var resp = convert.JSON.encode(buildProfile()); |
| 8270 return new async.Future.value(stringResponse(200, h, resp)); | 8805 return new async.Future.value(stringResponse(200, h, resp)); |
| 8271 }), true); | 8806 }), true); |
| 8272 res.patch(arg_request, arg_accountId, arg_webPropertyId, arg_profileId).th
en(unittest.expectAsync1(((api.Profile response) { | 8807 res |
| 8808 .patch(arg_request, arg_accountId, arg_webPropertyId, arg_profileId) |
| 8809 .then(unittest.expectAsync1(((api.Profile response) { |
| 8273 checkProfile(response); | 8810 checkProfile(response); |
| 8274 }))); | 8811 }))); |
| 8275 }); | 8812 }); |
| 8276 | 8813 |
| 8277 unittest.test("method--update", () { | 8814 unittest.test("method--update", () { |
| 8278 | |
| 8279 var mock = new HttpServerMock(); | 8815 var mock = new HttpServerMock(); |
| 8280 api.ManagementProfilesResourceApi res = new api.AnalyticsApi(mock).managem
ent.profiles; | 8816 api.ManagementProfilesResourceApi res = |
| 8817 new api.AnalyticsApi(mock).management.profiles; |
| 8281 var arg_request = buildProfile(); | 8818 var arg_request = buildProfile(); |
| 8282 var arg_accountId = "foo"; | 8819 var arg_accountId = "foo"; |
| 8283 var arg_webPropertyId = "foo"; | 8820 var arg_webPropertyId = "foo"; |
| 8284 var arg_profileId = "foo"; | 8821 var arg_profileId = "foo"; |
| 8285 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8822 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8286 var obj = new api.Profile.fromJson(json); | 8823 var obj = new api.Profile.fromJson(json); |
| 8287 checkProfile(obj); | 8824 checkProfile(obj); |
| 8288 | 8825 |
| 8289 var path = (req.url).path; | 8826 var path = (req.url).path; |
| 8290 var pathOffset = 0; | 8827 var pathOffset = 0; |
| 8291 var index; | 8828 var index; |
| 8292 var subPart; | 8829 var subPart; |
| 8293 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8830 unittest.expect( |
| 8831 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8294 pathOffset += 1; | 8832 pathOffset += 1; |
| 8295 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8833 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8834 unittest.equals("analytics/v3/")); |
| 8296 pathOffset += 13; | 8835 pathOffset += 13; |
| 8297 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8836 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8837 unittest.equals("management/accounts/")); |
| 8298 pathOffset += 20; | 8838 pathOffset += 20; |
| 8299 index = path.indexOf("/webproperties/", pathOffset); | 8839 index = path.indexOf("/webproperties/", pathOffset); |
| 8300 unittest.expect(index >= 0, unittest.isTrue); | 8840 unittest.expect(index >= 0, unittest.isTrue); |
| 8301 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8841 subPart = |
| 8842 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8302 pathOffset = index; | 8843 pathOffset = index; |
| 8303 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8844 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8304 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8845 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8846 unittest.equals("/webproperties/")); |
| 8305 pathOffset += 15; | 8847 pathOffset += 15; |
| 8306 index = path.indexOf("/profiles/", pathOffset); | 8848 index = path.indexOf("/profiles/", pathOffset); |
| 8307 unittest.expect(index >= 0, unittest.isTrue); | 8849 unittest.expect(index >= 0, unittest.isTrue); |
| 8308 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8850 subPart = |
| 8851 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8309 pathOffset = index; | 8852 pathOffset = index; |
| 8310 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 8853 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8311 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 8854 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 8855 unittest.equals("/profiles/")); |
| 8312 pathOffset += 10; | 8856 pathOffset += 10; |
| 8313 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 8857 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 8314 pathOffset = path.length; | 8858 pathOffset = path.length; |
| 8315 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 8859 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 8316 | 8860 |
| 8317 var query = (req.url).query; | 8861 var query = (req.url).query; |
| 8318 var queryOffset = 0; | 8862 var queryOffset = 0; |
| 8319 var queryMap = {}; | 8863 var queryMap = {}; |
| 8320 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8864 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8321 parseBool(n) { | 8865 parseBool(n) { |
| 8322 if (n == "true") return true; | 8866 if (n == "true") return true; |
| 8323 if (n == "false") return false; | 8867 if (n == "false") return false; |
| 8324 if (n == null) return null; | 8868 if (n == null) return null; |
| 8325 throw new core.ArgumentError("Invalid boolean: $n"); | 8869 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8326 } | 8870 } |
| 8871 |
| 8327 if (query.length > 0) { | 8872 if (query.length > 0) { |
| 8328 for (var part in query.split("&")) { | 8873 for (var part in query.split("&")) { |
| 8329 var keyvalue = part.split("="); | 8874 var keyvalue = part.split("="); |
| 8330 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8875 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8876 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8331 } | 8877 } |
| 8332 } | 8878 } |
| 8333 | 8879 |
| 8334 | |
| 8335 var h = { | 8880 var h = { |
| 8336 "content-type" : "application/json; charset=utf-8", | 8881 "content-type": "application/json; charset=utf-8", |
| 8337 }; | 8882 }; |
| 8338 var resp = convert.JSON.encode(buildProfile()); | 8883 var resp = convert.JSON.encode(buildProfile()); |
| 8339 return new async.Future.value(stringResponse(200, h, resp)); | 8884 return new async.Future.value(stringResponse(200, h, resp)); |
| 8340 }), true); | 8885 }), true); |
| 8341 res.update(arg_request, arg_accountId, arg_webPropertyId, arg_profileId).t
hen(unittest.expectAsync1(((api.Profile response) { | 8886 res |
| 8887 .update(arg_request, arg_accountId, arg_webPropertyId, arg_profileId) |
| 8888 .then(unittest.expectAsync1(((api.Profile response) { |
| 8342 checkProfile(response); | 8889 checkProfile(response); |
| 8343 }))); | 8890 }))); |
| 8344 }); | 8891 }); |
| 8345 | |
| 8346 }); | 8892 }); |
| 8347 | 8893 |
| 8348 | |
| 8349 unittest.group("resource-ManagementRemarketingAudienceResourceApi", () { | 8894 unittest.group("resource-ManagementRemarketingAudienceResourceApi", () { |
| 8350 unittest.test("method--delete", () { | 8895 unittest.test("method--delete", () { |
| 8351 | |
| 8352 var mock = new HttpServerMock(); | 8896 var mock = new HttpServerMock(); |
| 8353 api.ManagementRemarketingAudienceResourceApi res = new api.AnalyticsApi(mo
ck).management.remarketingAudience; | 8897 api.ManagementRemarketingAudienceResourceApi res = |
| 8898 new api.AnalyticsApi(mock).management.remarketingAudience; |
| 8354 var arg_accountId = "foo"; | 8899 var arg_accountId = "foo"; |
| 8355 var arg_webPropertyId = "foo"; | 8900 var arg_webPropertyId = "foo"; |
| 8356 var arg_remarketingAudienceId = "foo"; | 8901 var arg_remarketingAudienceId = "foo"; |
| 8357 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8902 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8358 var path = (req.url).path; | 8903 var path = (req.url).path; |
| 8359 var pathOffset = 0; | 8904 var pathOffset = 0; |
| 8360 var index; | 8905 var index; |
| 8361 var subPart; | 8906 var subPart; |
| 8362 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8907 unittest.expect( |
| 8908 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8363 pathOffset += 1; | 8909 pathOffset += 1; |
| 8364 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8910 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8911 unittest.equals("analytics/v3/")); |
| 8365 pathOffset += 13; | 8912 pathOffset += 13; |
| 8366 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8913 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8914 unittest.equals("management/accounts/")); |
| 8367 pathOffset += 20; | 8915 pathOffset += 20; |
| 8368 index = path.indexOf("/webproperties/", pathOffset); | 8916 index = path.indexOf("/webproperties/", pathOffset); |
| 8369 unittest.expect(index >= 0, unittest.isTrue); | 8917 unittest.expect(index >= 0, unittest.isTrue); |
| 8370 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8918 subPart = |
| 8919 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8371 pathOffset = index; | 8920 pathOffset = index; |
| 8372 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8921 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8373 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8922 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8923 unittest.equals("/webproperties/")); |
| 8374 pathOffset += 15; | 8924 pathOffset += 15; |
| 8375 index = path.indexOf("/remarketingAudiences/", pathOffset); | 8925 index = path.indexOf("/remarketingAudiences/", pathOffset); |
| 8376 unittest.expect(index >= 0, unittest.isTrue); | 8926 unittest.expect(index >= 0, unittest.isTrue); |
| 8377 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8927 subPart = |
| 8928 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8378 pathOffset = index; | 8929 pathOffset = index; |
| 8379 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 8930 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8380 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/remarketingAudiences/")); | 8931 unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 8932 unittest.equals("/remarketingAudiences/")); |
| 8381 pathOffset += 22; | 8933 pathOffset += 22; |
| 8382 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 8934 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 8383 pathOffset = path.length; | 8935 pathOffset = path.length; |
| 8384 unittest.expect(subPart, unittest.equals("$arg_remarketingAudienceId")); | 8936 unittest.expect(subPart, unittest.equals("$arg_remarketingAudienceId")); |
| 8385 | 8937 |
| 8386 var query = (req.url).query; | 8938 var query = (req.url).query; |
| 8387 var queryOffset = 0; | 8939 var queryOffset = 0; |
| 8388 var queryMap = {}; | 8940 var queryMap = {}; |
| 8389 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8941 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8390 parseBool(n) { | 8942 parseBool(n) { |
| 8391 if (n == "true") return true; | 8943 if (n == "true") return true; |
| 8392 if (n == "false") return false; | 8944 if (n == "false") return false; |
| 8393 if (n == null) return null; | 8945 if (n == null) return null; |
| 8394 throw new core.ArgumentError("Invalid boolean: $n"); | 8946 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8395 } | 8947 } |
| 8948 |
| 8396 if (query.length > 0) { | 8949 if (query.length > 0) { |
| 8397 for (var part in query.split("&")) { | 8950 for (var part in query.split("&")) { |
| 8398 var keyvalue = part.split("="); | 8951 var keyvalue = part.split("="); |
| 8399 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8952 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8953 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8400 } | 8954 } |
| 8401 } | 8955 } |
| 8402 | 8956 |
| 8403 | |
| 8404 var h = { | 8957 var h = { |
| 8405 "content-type" : "application/json; charset=utf-8", | 8958 "content-type": "application/json; charset=utf-8", |
| 8406 }; | 8959 }; |
| 8407 var resp = ""; | 8960 var resp = ""; |
| 8408 return new async.Future.value(stringResponse(200, h, resp)); | 8961 return new async.Future.value(stringResponse(200, h, resp)); |
| 8409 }), true); | 8962 }), true); |
| 8410 res.delete(arg_accountId, arg_webPropertyId, arg_remarketingAudienceId).th
en(unittest.expectAsync1((_) {})); | 8963 res |
| 8964 .delete(arg_accountId, arg_webPropertyId, arg_remarketingAudienceId) |
| 8965 .then(unittest.expectAsync1((_) {})); |
| 8411 }); | 8966 }); |
| 8412 | 8967 |
| 8413 unittest.test("method--get", () { | 8968 unittest.test("method--get", () { |
| 8414 | |
| 8415 var mock = new HttpServerMock(); | 8969 var mock = new HttpServerMock(); |
| 8416 api.ManagementRemarketingAudienceResourceApi res = new api.AnalyticsApi(mo
ck).management.remarketingAudience; | 8970 api.ManagementRemarketingAudienceResourceApi res = |
| 8971 new api.AnalyticsApi(mock).management.remarketingAudience; |
| 8417 var arg_accountId = "foo"; | 8972 var arg_accountId = "foo"; |
| 8418 var arg_webPropertyId = "foo"; | 8973 var arg_webPropertyId = "foo"; |
| 8419 var arg_remarketingAudienceId = "foo"; | 8974 var arg_remarketingAudienceId = "foo"; |
| 8420 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8975 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8421 var path = (req.url).path; | 8976 var path = (req.url).path; |
| 8422 var pathOffset = 0; | 8977 var pathOffset = 0; |
| 8423 var index; | 8978 var index; |
| 8424 var subPart; | 8979 var subPart; |
| 8425 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8980 unittest.expect( |
| 8981 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8426 pathOffset += 1; | 8982 pathOffset += 1; |
| 8427 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 8983 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8984 unittest.equals("analytics/v3/")); |
| 8428 pathOffset += 13; | 8985 pathOffset += 13; |
| 8429 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 8986 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 8987 unittest.equals("management/accounts/")); |
| 8430 pathOffset += 20; | 8988 pathOffset += 20; |
| 8431 index = path.indexOf("/webproperties/", pathOffset); | 8989 index = path.indexOf("/webproperties/", pathOffset); |
| 8432 unittest.expect(index >= 0, unittest.isTrue); | 8990 unittest.expect(index >= 0, unittest.isTrue); |
| 8433 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 8991 subPart = |
| 8992 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8434 pathOffset = index; | 8993 pathOffset = index; |
| 8435 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 8994 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8436 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 8995 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8996 unittest.equals("/webproperties/")); |
| 8437 pathOffset += 15; | 8997 pathOffset += 15; |
| 8438 index = path.indexOf("/remarketingAudiences/", pathOffset); | 8998 index = path.indexOf("/remarketingAudiences/", pathOffset); |
| 8439 unittest.expect(index >= 0, unittest.isTrue); | 8999 unittest.expect(index >= 0, unittest.isTrue); |
| 8440 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9000 subPart = |
| 9001 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8441 pathOffset = index; | 9002 pathOffset = index; |
| 8442 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 9003 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8443 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/remarketingAudiences/")); | 9004 unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 9005 unittest.equals("/remarketingAudiences/")); |
| 8444 pathOffset += 22; | 9006 pathOffset += 22; |
| 8445 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 9007 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 8446 pathOffset = path.length; | 9008 pathOffset = path.length; |
| 8447 unittest.expect(subPart, unittest.equals("$arg_remarketingAudienceId")); | 9009 unittest.expect(subPart, unittest.equals("$arg_remarketingAudienceId")); |
| 8448 | 9010 |
| 8449 var query = (req.url).query; | 9011 var query = (req.url).query; |
| 8450 var queryOffset = 0; | 9012 var queryOffset = 0; |
| 8451 var queryMap = {}; | 9013 var queryMap = {}; |
| 8452 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9014 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8453 parseBool(n) { | 9015 parseBool(n) { |
| 8454 if (n == "true") return true; | 9016 if (n == "true") return true; |
| 8455 if (n == "false") return false; | 9017 if (n == "false") return false; |
| 8456 if (n == null) return null; | 9018 if (n == null) return null; |
| 8457 throw new core.ArgumentError("Invalid boolean: $n"); | 9019 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8458 } | 9020 } |
| 9021 |
| 8459 if (query.length > 0) { | 9022 if (query.length > 0) { |
| 8460 for (var part in query.split("&")) { | 9023 for (var part in query.split("&")) { |
| 8461 var keyvalue = part.split("="); | 9024 var keyvalue = part.split("="); |
| 8462 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9025 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9026 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8463 } | 9027 } |
| 8464 } | 9028 } |
| 8465 | 9029 |
| 8466 | |
| 8467 var h = { | 9030 var h = { |
| 8468 "content-type" : "application/json; charset=utf-8", | 9031 "content-type": "application/json; charset=utf-8", |
| 8469 }; | 9032 }; |
| 8470 var resp = convert.JSON.encode(buildRemarketingAudience()); | 9033 var resp = convert.JSON.encode(buildRemarketingAudience()); |
| 8471 return new async.Future.value(stringResponse(200, h, resp)); | 9034 return new async.Future.value(stringResponse(200, h, resp)); |
| 8472 }), true); | 9035 }), true); |
| 8473 res.get(arg_accountId, arg_webPropertyId, arg_remarketingAudienceId).then(
unittest.expectAsync1(((api.RemarketingAudience response) { | 9036 res |
| 9037 .get(arg_accountId, arg_webPropertyId, arg_remarketingAudienceId) |
| 9038 .then(unittest.expectAsync1(((api.RemarketingAudience response) { |
| 8474 checkRemarketingAudience(response); | 9039 checkRemarketingAudience(response); |
| 8475 }))); | 9040 }))); |
| 8476 }); | 9041 }); |
| 8477 | 9042 |
| 8478 unittest.test("method--insert", () { | 9043 unittest.test("method--insert", () { |
| 8479 | |
| 8480 var mock = new HttpServerMock(); | 9044 var mock = new HttpServerMock(); |
| 8481 api.ManagementRemarketingAudienceResourceApi res = new api.AnalyticsApi(mo
ck).management.remarketingAudience; | 9045 api.ManagementRemarketingAudienceResourceApi res = |
| 9046 new api.AnalyticsApi(mock).management.remarketingAudience; |
| 8482 var arg_request = buildRemarketingAudience(); | 9047 var arg_request = buildRemarketingAudience(); |
| 8483 var arg_accountId = "foo"; | 9048 var arg_accountId = "foo"; |
| 8484 var arg_webPropertyId = "foo"; | 9049 var arg_webPropertyId = "foo"; |
| 8485 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9050 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8486 var obj = new api.RemarketingAudience.fromJson(json); | 9051 var obj = new api.RemarketingAudience.fromJson(json); |
| 8487 checkRemarketingAudience(obj); | 9052 checkRemarketingAudience(obj); |
| 8488 | 9053 |
| 8489 var path = (req.url).path; | 9054 var path = (req.url).path; |
| 8490 var pathOffset = 0; | 9055 var pathOffset = 0; |
| 8491 var index; | 9056 var index; |
| 8492 var subPart; | 9057 var subPart; |
| 8493 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9058 unittest.expect( |
| 9059 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8494 pathOffset += 1; | 9060 pathOffset += 1; |
| 8495 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 9061 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9062 unittest.equals("analytics/v3/")); |
| 8496 pathOffset += 13; | 9063 pathOffset += 13; |
| 8497 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 9064 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 9065 unittest.equals("management/accounts/")); |
| 8498 pathOffset += 20; | 9066 pathOffset += 20; |
| 8499 index = path.indexOf("/webproperties/", pathOffset); | 9067 index = path.indexOf("/webproperties/", pathOffset); |
| 8500 unittest.expect(index >= 0, unittest.isTrue); | 9068 unittest.expect(index >= 0, unittest.isTrue); |
| 8501 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9069 subPart = |
| 9070 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8502 pathOffset = index; | 9071 pathOffset = index; |
| 8503 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 9072 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8504 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 9073 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 9074 unittest.equals("/webproperties/")); |
| 8505 pathOffset += 15; | 9075 pathOffset += 15; |
| 8506 index = path.indexOf("/remarketingAudiences", pathOffset); | 9076 index = path.indexOf("/remarketingAudiences", pathOffset); |
| 8507 unittest.expect(index >= 0, unittest.isTrue); | 9077 unittest.expect(index >= 0, unittest.isTrue); |
| 8508 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9078 subPart = |
| 9079 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8509 pathOffset = index; | 9080 pathOffset = index; |
| 8510 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 9081 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8511 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/remarketingAudiences")); | 9082 unittest.expect(path.substring(pathOffset, pathOffset + 21), |
| 9083 unittest.equals("/remarketingAudiences")); |
| 8512 pathOffset += 21; | 9084 pathOffset += 21; |
| 8513 | 9085 |
| 8514 var query = (req.url).query; | 9086 var query = (req.url).query; |
| 8515 var queryOffset = 0; | 9087 var queryOffset = 0; |
| 8516 var queryMap = {}; | 9088 var queryMap = {}; |
| 8517 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9089 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8518 parseBool(n) { | 9090 parseBool(n) { |
| 8519 if (n == "true") return true; | 9091 if (n == "true") return true; |
| 8520 if (n == "false") return false; | 9092 if (n == "false") return false; |
| 8521 if (n == null) return null; | 9093 if (n == null) return null; |
| 8522 throw new core.ArgumentError("Invalid boolean: $n"); | 9094 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8523 } | 9095 } |
| 9096 |
| 8524 if (query.length > 0) { | 9097 if (query.length > 0) { |
| 8525 for (var part in query.split("&")) { | 9098 for (var part in query.split("&")) { |
| 8526 var keyvalue = part.split("="); | 9099 var keyvalue = part.split("="); |
| 8527 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9100 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9101 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8528 } | 9102 } |
| 8529 } | 9103 } |
| 8530 | 9104 |
| 8531 | |
| 8532 var h = { | 9105 var h = { |
| 8533 "content-type" : "application/json; charset=utf-8", | 9106 "content-type": "application/json; charset=utf-8", |
| 8534 }; | 9107 }; |
| 8535 var resp = convert.JSON.encode(buildRemarketingAudience()); | 9108 var resp = convert.JSON.encode(buildRemarketingAudience()); |
| 8536 return new async.Future.value(stringResponse(200, h, resp)); | 9109 return new async.Future.value(stringResponse(200, h, resp)); |
| 8537 }), true); | 9110 }), true); |
| 8538 res.insert(arg_request, arg_accountId, arg_webPropertyId).then(unittest.ex
pectAsync1(((api.RemarketingAudience response) { | 9111 res |
| 9112 .insert(arg_request, arg_accountId, arg_webPropertyId) |
| 9113 .then(unittest.expectAsync1(((api.RemarketingAudience response) { |
| 8539 checkRemarketingAudience(response); | 9114 checkRemarketingAudience(response); |
| 8540 }))); | 9115 }))); |
| 8541 }); | 9116 }); |
| 8542 | 9117 |
| 8543 unittest.test("method--list", () { | 9118 unittest.test("method--list", () { |
| 8544 | |
| 8545 var mock = new HttpServerMock(); | 9119 var mock = new HttpServerMock(); |
| 8546 api.ManagementRemarketingAudienceResourceApi res = new api.AnalyticsApi(mo
ck).management.remarketingAudience; | 9120 api.ManagementRemarketingAudienceResourceApi res = |
| 9121 new api.AnalyticsApi(mock).management.remarketingAudience; |
| 8547 var arg_accountId = "foo"; | 9122 var arg_accountId = "foo"; |
| 8548 var arg_webPropertyId = "foo"; | 9123 var arg_webPropertyId = "foo"; |
| 8549 var arg_max_results = 42; | 9124 var arg_max_results = 42; |
| 8550 var arg_start_index = 42; | 9125 var arg_start_index = 42; |
| 8551 var arg_type = "foo"; | 9126 var arg_type = "foo"; |
| 8552 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9127 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8553 var path = (req.url).path; | 9128 var path = (req.url).path; |
| 8554 var pathOffset = 0; | 9129 var pathOffset = 0; |
| 8555 var index; | 9130 var index; |
| 8556 var subPart; | 9131 var subPart; |
| 8557 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9132 unittest.expect( |
| 9133 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8558 pathOffset += 1; | 9134 pathOffset += 1; |
| 8559 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 9135 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9136 unittest.equals("analytics/v3/")); |
| 8560 pathOffset += 13; | 9137 pathOffset += 13; |
| 8561 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 9138 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 9139 unittest.equals("management/accounts/")); |
| 8562 pathOffset += 20; | 9140 pathOffset += 20; |
| 8563 index = path.indexOf("/webproperties/", pathOffset); | 9141 index = path.indexOf("/webproperties/", pathOffset); |
| 8564 unittest.expect(index >= 0, unittest.isTrue); | 9142 unittest.expect(index >= 0, unittest.isTrue); |
| 8565 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9143 subPart = |
| 9144 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8566 pathOffset = index; | 9145 pathOffset = index; |
| 8567 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 9146 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8568 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 9147 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 9148 unittest.equals("/webproperties/")); |
| 8569 pathOffset += 15; | 9149 pathOffset += 15; |
| 8570 index = path.indexOf("/remarketingAudiences", pathOffset); | 9150 index = path.indexOf("/remarketingAudiences", pathOffset); |
| 8571 unittest.expect(index >= 0, unittest.isTrue); | 9151 unittest.expect(index >= 0, unittest.isTrue); |
| 8572 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9152 subPart = |
| 9153 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8573 pathOffset = index; | 9154 pathOffset = index; |
| 8574 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 9155 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8575 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/remarketingAudiences")); | 9156 unittest.expect(path.substring(pathOffset, pathOffset + 21), |
| 9157 unittest.equals("/remarketingAudiences")); |
| 8576 pathOffset += 21; | 9158 pathOffset += 21; |
| 8577 | 9159 |
| 8578 var query = (req.url).query; | 9160 var query = (req.url).query; |
| 8579 var queryOffset = 0; | 9161 var queryOffset = 0; |
| 8580 var queryMap = {}; | 9162 var queryMap = {}; |
| 8581 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9163 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8582 parseBool(n) { | 9164 parseBool(n) { |
| 8583 if (n == "true") return true; | 9165 if (n == "true") return true; |
| 8584 if (n == "false") return false; | 9166 if (n == "false") return false; |
| 8585 if (n == null) return null; | 9167 if (n == null) return null; |
| 8586 throw new core.ArgumentError("Invalid boolean: $n"); | 9168 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8587 } | 9169 } |
| 9170 |
| 8588 if (query.length > 0) { | 9171 if (query.length > 0) { |
| 8589 for (var part in query.split("&")) { | 9172 for (var part in query.split("&")) { |
| 8590 var keyvalue = part.split("="); | 9173 var keyvalue = part.split("="); |
| 8591 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9174 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9175 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8592 } | 9176 } |
| 8593 } | 9177 } |
| 8594 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 9178 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 8595 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 9179 unittest.equals(arg_max_results)); |
| 9180 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 9181 unittest.equals(arg_start_index)); |
| 8596 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); | 9182 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); |
| 8597 | 9183 |
| 8598 | |
| 8599 var h = { | 9184 var h = { |
| 8600 "content-type" : "application/json; charset=utf-8", | 9185 "content-type": "application/json; charset=utf-8", |
| 8601 }; | 9186 }; |
| 8602 var resp = convert.JSON.encode(buildRemarketingAudiences()); | 9187 var resp = convert.JSON.encode(buildRemarketingAudiences()); |
| 8603 return new async.Future.value(stringResponse(200, h, resp)); | 9188 return new async.Future.value(stringResponse(200, h, resp)); |
| 8604 }), true); | 9189 }), true); |
| 8605 res.list(arg_accountId, arg_webPropertyId, max_results: arg_max_results, s
tart_index: arg_start_index, type: arg_type).then(unittest.expectAsync1(((api.Re
marketingAudiences response) { | 9190 res |
| 9191 .list(arg_accountId, arg_webPropertyId, |
| 9192 max_results: arg_max_results, |
| 9193 start_index: arg_start_index, |
| 9194 type: arg_type) |
| 9195 .then(unittest.expectAsync1(((api.RemarketingAudiences response) { |
| 8606 checkRemarketingAudiences(response); | 9196 checkRemarketingAudiences(response); |
| 8607 }))); | 9197 }))); |
| 8608 }); | 9198 }); |
| 8609 | 9199 |
| 8610 unittest.test("method--patch", () { | 9200 unittest.test("method--patch", () { |
| 8611 | |
| 8612 var mock = new HttpServerMock(); | 9201 var mock = new HttpServerMock(); |
| 8613 api.ManagementRemarketingAudienceResourceApi res = new api.AnalyticsApi(mo
ck).management.remarketingAudience; | 9202 api.ManagementRemarketingAudienceResourceApi res = |
| 9203 new api.AnalyticsApi(mock).management.remarketingAudience; |
| 8614 var arg_request = buildRemarketingAudience(); | 9204 var arg_request = buildRemarketingAudience(); |
| 8615 var arg_accountId = "foo"; | 9205 var arg_accountId = "foo"; |
| 8616 var arg_webPropertyId = "foo"; | 9206 var arg_webPropertyId = "foo"; |
| 8617 var arg_remarketingAudienceId = "foo"; | 9207 var arg_remarketingAudienceId = "foo"; |
| 8618 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9208 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8619 var obj = new api.RemarketingAudience.fromJson(json); | 9209 var obj = new api.RemarketingAudience.fromJson(json); |
| 8620 checkRemarketingAudience(obj); | 9210 checkRemarketingAudience(obj); |
| 8621 | 9211 |
| 8622 var path = (req.url).path; | 9212 var path = (req.url).path; |
| 8623 var pathOffset = 0; | 9213 var pathOffset = 0; |
| 8624 var index; | 9214 var index; |
| 8625 var subPart; | 9215 var subPart; |
| 8626 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9216 unittest.expect( |
| 9217 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8627 pathOffset += 1; | 9218 pathOffset += 1; |
| 8628 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 9219 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9220 unittest.equals("analytics/v3/")); |
| 8629 pathOffset += 13; | 9221 pathOffset += 13; |
| 8630 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 9222 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 9223 unittest.equals("management/accounts/")); |
| 8631 pathOffset += 20; | 9224 pathOffset += 20; |
| 8632 index = path.indexOf("/webproperties/", pathOffset); | 9225 index = path.indexOf("/webproperties/", pathOffset); |
| 8633 unittest.expect(index >= 0, unittest.isTrue); | 9226 unittest.expect(index >= 0, unittest.isTrue); |
| 8634 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9227 subPart = |
| 9228 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8635 pathOffset = index; | 9229 pathOffset = index; |
| 8636 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 9230 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8637 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 9231 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 9232 unittest.equals("/webproperties/")); |
| 8638 pathOffset += 15; | 9233 pathOffset += 15; |
| 8639 index = path.indexOf("/remarketingAudiences/", pathOffset); | 9234 index = path.indexOf("/remarketingAudiences/", pathOffset); |
| 8640 unittest.expect(index >= 0, unittest.isTrue); | 9235 unittest.expect(index >= 0, unittest.isTrue); |
| 8641 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9236 subPart = |
| 9237 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8642 pathOffset = index; | 9238 pathOffset = index; |
| 8643 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 9239 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8644 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/remarketingAudiences/")); | 9240 unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 9241 unittest.equals("/remarketingAudiences/")); |
| 8645 pathOffset += 22; | 9242 pathOffset += 22; |
| 8646 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 9243 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 8647 pathOffset = path.length; | 9244 pathOffset = path.length; |
| 8648 unittest.expect(subPart, unittest.equals("$arg_remarketingAudienceId")); | 9245 unittest.expect(subPart, unittest.equals("$arg_remarketingAudienceId")); |
| 8649 | 9246 |
| 8650 var query = (req.url).query; | 9247 var query = (req.url).query; |
| 8651 var queryOffset = 0; | 9248 var queryOffset = 0; |
| 8652 var queryMap = {}; | 9249 var queryMap = {}; |
| 8653 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9250 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8654 parseBool(n) { | 9251 parseBool(n) { |
| 8655 if (n == "true") return true; | 9252 if (n == "true") return true; |
| 8656 if (n == "false") return false; | 9253 if (n == "false") return false; |
| 8657 if (n == null) return null; | 9254 if (n == null) return null; |
| 8658 throw new core.ArgumentError("Invalid boolean: $n"); | 9255 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8659 } | 9256 } |
| 9257 |
| 8660 if (query.length > 0) { | 9258 if (query.length > 0) { |
| 8661 for (var part in query.split("&")) { | 9259 for (var part in query.split("&")) { |
| 8662 var keyvalue = part.split("="); | 9260 var keyvalue = part.split("="); |
| 8663 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9261 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9262 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8664 } | 9263 } |
| 8665 } | 9264 } |
| 8666 | 9265 |
| 8667 | |
| 8668 var h = { | 9266 var h = { |
| 8669 "content-type" : "application/json; charset=utf-8", | 9267 "content-type": "application/json; charset=utf-8", |
| 8670 }; | 9268 }; |
| 8671 var resp = convert.JSON.encode(buildRemarketingAudience()); | 9269 var resp = convert.JSON.encode(buildRemarketingAudience()); |
| 8672 return new async.Future.value(stringResponse(200, h, resp)); | 9270 return new async.Future.value(stringResponse(200, h, resp)); |
| 8673 }), true); | 9271 }), true); |
| 8674 res.patch(arg_request, arg_accountId, arg_webPropertyId, arg_remarketingAu
dienceId).then(unittest.expectAsync1(((api.RemarketingAudience response) { | 9272 res |
| 9273 .patch(arg_request, arg_accountId, arg_webPropertyId, |
| 9274 arg_remarketingAudienceId) |
| 9275 .then(unittest.expectAsync1(((api.RemarketingAudience response) { |
| 8675 checkRemarketingAudience(response); | 9276 checkRemarketingAudience(response); |
| 8676 }))); | 9277 }))); |
| 8677 }); | 9278 }); |
| 8678 | 9279 |
| 8679 unittest.test("method--update", () { | 9280 unittest.test("method--update", () { |
| 8680 | |
| 8681 var mock = new HttpServerMock(); | 9281 var mock = new HttpServerMock(); |
| 8682 api.ManagementRemarketingAudienceResourceApi res = new api.AnalyticsApi(mo
ck).management.remarketingAudience; | 9282 api.ManagementRemarketingAudienceResourceApi res = |
| 9283 new api.AnalyticsApi(mock).management.remarketingAudience; |
| 8683 var arg_request = buildRemarketingAudience(); | 9284 var arg_request = buildRemarketingAudience(); |
| 8684 var arg_accountId = "foo"; | 9285 var arg_accountId = "foo"; |
| 8685 var arg_webPropertyId = "foo"; | 9286 var arg_webPropertyId = "foo"; |
| 8686 var arg_remarketingAudienceId = "foo"; | 9287 var arg_remarketingAudienceId = "foo"; |
| 8687 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9288 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8688 var obj = new api.RemarketingAudience.fromJson(json); | 9289 var obj = new api.RemarketingAudience.fromJson(json); |
| 8689 checkRemarketingAudience(obj); | 9290 checkRemarketingAudience(obj); |
| 8690 | 9291 |
| 8691 var path = (req.url).path; | 9292 var path = (req.url).path; |
| 8692 var pathOffset = 0; | 9293 var pathOffset = 0; |
| 8693 var index; | 9294 var index; |
| 8694 var subPart; | 9295 var subPart; |
| 8695 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9296 unittest.expect( |
| 9297 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8696 pathOffset += 1; | 9298 pathOffset += 1; |
| 8697 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 9299 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9300 unittest.equals("analytics/v3/")); |
| 8698 pathOffset += 13; | 9301 pathOffset += 13; |
| 8699 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 9302 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 9303 unittest.equals("management/accounts/")); |
| 8700 pathOffset += 20; | 9304 pathOffset += 20; |
| 8701 index = path.indexOf("/webproperties/", pathOffset); | 9305 index = path.indexOf("/webproperties/", pathOffset); |
| 8702 unittest.expect(index >= 0, unittest.isTrue); | 9306 unittest.expect(index >= 0, unittest.isTrue); |
| 8703 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9307 subPart = |
| 9308 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8704 pathOffset = index; | 9309 pathOffset = index; |
| 8705 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 9310 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8706 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 9311 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 9312 unittest.equals("/webproperties/")); |
| 8707 pathOffset += 15; | 9313 pathOffset += 15; |
| 8708 index = path.indexOf("/remarketingAudiences/", pathOffset); | 9314 index = path.indexOf("/remarketingAudiences/", pathOffset); |
| 8709 unittest.expect(index >= 0, unittest.isTrue); | 9315 unittest.expect(index >= 0, unittest.isTrue); |
| 8710 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9316 subPart = |
| 9317 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8711 pathOffset = index; | 9318 pathOffset = index; |
| 8712 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 9319 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8713 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/remarketingAudiences/")); | 9320 unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 9321 unittest.equals("/remarketingAudiences/")); |
| 8714 pathOffset += 22; | 9322 pathOffset += 22; |
| 8715 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 9323 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 8716 pathOffset = path.length; | 9324 pathOffset = path.length; |
| 8717 unittest.expect(subPart, unittest.equals("$arg_remarketingAudienceId")); | 9325 unittest.expect(subPart, unittest.equals("$arg_remarketingAudienceId")); |
| 8718 | 9326 |
| 8719 var query = (req.url).query; | 9327 var query = (req.url).query; |
| 8720 var queryOffset = 0; | 9328 var queryOffset = 0; |
| 8721 var queryMap = {}; | 9329 var queryMap = {}; |
| 8722 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9330 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8723 parseBool(n) { | 9331 parseBool(n) { |
| 8724 if (n == "true") return true; | 9332 if (n == "true") return true; |
| 8725 if (n == "false") return false; | 9333 if (n == "false") return false; |
| 8726 if (n == null) return null; | 9334 if (n == null) return null; |
| 8727 throw new core.ArgumentError("Invalid boolean: $n"); | 9335 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8728 } | 9336 } |
| 9337 |
| 8729 if (query.length > 0) { | 9338 if (query.length > 0) { |
| 8730 for (var part in query.split("&")) { | 9339 for (var part in query.split("&")) { |
| 8731 var keyvalue = part.split("="); | 9340 var keyvalue = part.split("="); |
| 8732 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9341 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9342 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8733 } | 9343 } |
| 8734 } | 9344 } |
| 8735 | 9345 |
| 8736 | |
| 8737 var h = { | 9346 var h = { |
| 8738 "content-type" : "application/json; charset=utf-8", | 9347 "content-type": "application/json; charset=utf-8", |
| 8739 }; | 9348 }; |
| 8740 var resp = convert.JSON.encode(buildRemarketingAudience()); | 9349 var resp = convert.JSON.encode(buildRemarketingAudience()); |
| 8741 return new async.Future.value(stringResponse(200, h, resp)); | 9350 return new async.Future.value(stringResponse(200, h, resp)); |
| 8742 }), true); | 9351 }), true); |
| 8743 res.update(arg_request, arg_accountId, arg_webPropertyId, arg_remarketingA
udienceId).then(unittest.expectAsync1(((api.RemarketingAudience response) { | 9352 res |
| 9353 .update(arg_request, arg_accountId, arg_webPropertyId, |
| 9354 arg_remarketingAudienceId) |
| 9355 .then(unittest.expectAsync1(((api.RemarketingAudience response) { |
| 8744 checkRemarketingAudience(response); | 9356 checkRemarketingAudience(response); |
| 8745 }))); | 9357 }))); |
| 8746 }); | 9358 }); |
| 8747 | |
| 8748 }); | 9359 }); |
| 8749 | 9360 |
| 8750 | |
| 8751 unittest.group("resource-ManagementSegmentsResourceApi", () { | 9361 unittest.group("resource-ManagementSegmentsResourceApi", () { |
| 8752 unittest.test("method--list", () { | 9362 unittest.test("method--list", () { |
| 8753 | |
| 8754 var mock = new HttpServerMock(); | 9363 var mock = new HttpServerMock(); |
| 8755 api.ManagementSegmentsResourceApi res = new api.AnalyticsApi(mock).managem
ent.segments; | 9364 api.ManagementSegmentsResourceApi res = |
| 9365 new api.AnalyticsApi(mock).management.segments; |
| 8756 var arg_max_results = 42; | 9366 var arg_max_results = 42; |
| 8757 var arg_start_index = 42; | 9367 var arg_start_index = 42; |
| 8758 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9368 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8759 var path = (req.url).path; | 9369 var path = (req.url).path; |
| 8760 var pathOffset = 0; | 9370 var pathOffset = 0; |
| 8761 var index; | 9371 var index; |
| 8762 var subPart; | 9372 var subPart; |
| 8763 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9373 unittest.expect( |
| 9374 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8764 pathOffset += 1; | 9375 pathOffset += 1; |
| 8765 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 9376 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9377 unittest.equals("analytics/v3/")); |
| 8766 pathOffset += 13; | 9378 pathOffset += 13; |
| 8767 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("management/segments")); | 9379 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 9380 unittest.equals("management/segments")); |
| 8768 pathOffset += 19; | 9381 pathOffset += 19; |
| 8769 | 9382 |
| 8770 var query = (req.url).query; | 9383 var query = (req.url).query; |
| 8771 var queryOffset = 0; | 9384 var queryOffset = 0; |
| 8772 var queryMap = {}; | 9385 var queryMap = {}; |
| 8773 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9386 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8774 parseBool(n) { | 9387 parseBool(n) { |
| 8775 if (n == "true") return true; | 9388 if (n == "true") return true; |
| 8776 if (n == "false") return false; | 9389 if (n == "false") return false; |
| 8777 if (n == null) return null; | 9390 if (n == null) return null; |
| 8778 throw new core.ArgumentError("Invalid boolean: $n"); | 9391 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8779 } | 9392 } |
| 9393 |
| 8780 if (query.length > 0) { | 9394 if (query.length > 0) { |
| 8781 for (var part in query.split("&")) { | 9395 for (var part in query.split("&")) { |
| 8782 var keyvalue = part.split("="); | 9396 var keyvalue = part.split("="); |
| 8783 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9397 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9398 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8784 } | 9399 } |
| 8785 } | 9400 } |
| 8786 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 9401 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 8787 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 9402 unittest.equals(arg_max_results)); |
| 8788 | 9403 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 9404 unittest.equals(arg_start_index)); |
| 8789 | 9405 |
| 8790 var h = { | 9406 var h = { |
| 8791 "content-type" : "application/json; charset=utf-8", | 9407 "content-type": "application/json; charset=utf-8", |
| 8792 }; | 9408 }; |
| 8793 var resp = convert.JSON.encode(buildSegments()); | 9409 var resp = convert.JSON.encode(buildSegments()); |
| 8794 return new async.Future.value(stringResponse(200, h, resp)); | 9410 return new async.Future.value(stringResponse(200, h, resp)); |
| 8795 }), true); | 9411 }), true); |
| 8796 res.list(max_results: arg_max_results, start_index: arg_start_index).then(
unittest.expectAsync1(((api.Segments response) { | 9412 res |
| 9413 .list(max_results: arg_max_results, start_index: arg_start_index) |
| 9414 .then(unittest.expectAsync1(((api.Segments response) { |
| 8797 checkSegments(response); | 9415 checkSegments(response); |
| 8798 }))); | 9416 }))); |
| 8799 }); | 9417 }); |
| 8800 | |
| 8801 }); | 9418 }); |
| 8802 | 9419 |
| 8803 | |
| 8804 unittest.group("resource-ManagementUnsampledReportsResourceApi", () { | 9420 unittest.group("resource-ManagementUnsampledReportsResourceApi", () { |
| 8805 unittest.test("method--delete", () { | 9421 unittest.test("method--delete", () { |
| 8806 | |
| 8807 var mock = new HttpServerMock(); | 9422 var mock = new HttpServerMock(); |
| 8808 api.ManagementUnsampledReportsResourceApi res = new api.AnalyticsApi(mock)
.management.unsampledReports; | 9423 api.ManagementUnsampledReportsResourceApi res = |
| 9424 new api.AnalyticsApi(mock).management.unsampledReports; |
| 8809 var arg_accountId = "foo"; | 9425 var arg_accountId = "foo"; |
| 8810 var arg_webPropertyId = "foo"; | 9426 var arg_webPropertyId = "foo"; |
| 8811 var arg_profileId = "foo"; | 9427 var arg_profileId = "foo"; |
| 8812 var arg_unsampledReportId = "foo"; | 9428 var arg_unsampledReportId = "foo"; |
| 8813 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9429 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8814 var path = (req.url).path; | 9430 var path = (req.url).path; |
| 8815 var pathOffset = 0; | 9431 var pathOffset = 0; |
| 8816 var index; | 9432 var index; |
| 8817 var subPart; | 9433 var subPart; |
| 8818 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9434 unittest.expect( |
| 9435 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8819 pathOffset += 1; | 9436 pathOffset += 1; |
| 8820 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 9437 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9438 unittest.equals("analytics/v3/")); |
| 8821 pathOffset += 13; | 9439 pathOffset += 13; |
| 8822 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 9440 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 9441 unittest.equals("management/accounts/")); |
| 8823 pathOffset += 20; | 9442 pathOffset += 20; |
| 8824 index = path.indexOf("/webproperties/", pathOffset); | 9443 index = path.indexOf("/webproperties/", pathOffset); |
| 8825 unittest.expect(index >= 0, unittest.isTrue); | 9444 unittest.expect(index >= 0, unittest.isTrue); |
| 8826 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9445 subPart = |
| 9446 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8827 pathOffset = index; | 9447 pathOffset = index; |
| 8828 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 9448 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8829 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 9449 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 9450 unittest.equals("/webproperties/")); |
| 8830 pathOffset += 15; | 9451 pathOffset += 15; |
| 8831 index = path.indexOf("/profiles/", pathOffset); | 9452 index = path.indexOf("/profiles/", pathOffset); |
| 8832 unittest.expect(index >= 0, unittest.isTrue); | 9453 unittest.expect(index >= 0, unittest.isTrue); |
| 8833 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9454 subPart = |
| 9455 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8834 pathOffset = index; | 9456 pathOffset = index; |
| 8835 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 9457 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8836 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 9458 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 9459 unittest.equals("/profiles/")); |
| 8837 pathOffset += 10; | 9460 pathOffset += 10; |
| 8838 index = path.indexOf("/unsampledReports/", pathOffset); | 9461 index = path.indexOf("/unsampledReports/", pathOffset); |
| 8839 unittest.expect(index >= 0, unittest.isTrue); | 9462 unittest.expect(index >= 0, unittest.isTrue); |
| 8840 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9463 subPart = |
| 9464 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8841 pathOffset = index; | 9465 pathOffset = index; |
| 8842 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 9466 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 8843 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/unsampledReports/")); | 9467 unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 9468 unittest.equals("/unsampledReports/")); |
| 8844 pathOffset += 18; | 9469 pathOffset += 18; |
| 8845 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 9470 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 8846 pathOffset = path.length; | 9471 pathOffset = path.length; |
| 8847 unittest.expect(subPart, unittest.equals("$arg_unsampledReportId")); | 9472 unittest.expect(subPart, unittest.equals("$arg_unsampledReportId")); |
| 8848 | 9473 |
| 8849 var query = (req.url).query; | 9474 var query = (req.url).query; |
| 8850 var queryOffset = 0; | 9475 var queryOffset = 0; |
| 8851 var queryMap = {}; | 9476 var queryMap = {}; |
| 8852 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9477 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8853 parseBool(n) { | 9478 parseBool(n) { |
| 8854 if (n == "true") return true; | 9479 if (n == "true") return true; |
| 8855 if (n == "false") return false; | 9480 if (n == "false") return false; |
| 8856 if (n == null) return null; | 9481 if (n == null) return null; |
| 8857 throw new core.ArgumentError("Invalid boolean: $n"); | 9482 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8858 } | 9483 } |
| 9484 |
| 8859 if (query.length > 0) { | 9485 if (query.length > 0) { |
| 8860 for (var part in query.split("&")) { | 9486 for (var part in query.split("&")) { |
| 8861 var keyvalue = part.split("="); | 9487 var keyvalue = part.split("="); |
| 8862 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9488 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9489 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8863 } | 9490 } |
| 8864 } | 9491 } |
| 8865 | 9492 |
| 8866 | |
| 8867 var h = { | 9493 var h = { |
| 8868 "content-type" : "application/json; charset=utf-8", | 9494 "content-type": "application/json; charset=utf-8", |
| 8869 }; | 9495 }; |
| 8870 var resp = ""; | 9496 var resp = ""; |
| 8871 return new async.Future.value(stringResponse(200, h, resp)); | 9497 return new async.Future.value(stringResponse(200, h, resp)); |
| 8872 }), true); | 9498 }), true); |
| 8873 res.delete(arg_accountId, arg_webPropertyId, arg_profileId, arg_unsampledR
eportId).then(unittest.expectAsync1((_) {})); | 9499 res |
| 9500 .delete(arg_accountId, arg_webPropertyId, arg_profileId, |
| 9501 arg_unsampledReportId) |
| 9502 .then(unittest.expectAsync1((_) {})); |
| 8874 }); | 9503 }); |
| 8875 | 9504 |
| 8876 unittest.test("method--get", () { | 9505 unittest.test("method--get", () { |
| 8877 | |
| 8878 var mock = new HttpServerMock(); | 9506 var mock = new HttpServerMock(); |
| 8879 api.ManagementUnsampledReportsResourceApi res = new api.AnalyticsApi(mock)
.management.unsampledReports; | 9507 api.ManagementUnsampledReportsResourceApi res = |
| 9508 new api.AnalyticsApi(mock).management.unsampledReports; |
| 8880 var arg_accountId = "foo"; | 9509 var arg_accountId = "foo"; |
| 8881 var arg_webPropertyId = "foo"; | 9510 var arg_webPropertyId = "foo"; |
| 8882 var arg_profileId = "foo"; | 9511 var arg_profileId = "foo"; |
| 8883 var arg_unsampledReportId = "foo"; | 9512 var arg_unsampledReportId = "foo"; |
| 8884 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9513 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8885 var path = (req.url).path; | 9514 var path = (req.url).path; |
| 8886 var pathOffset = 0; | 9515 var pathOffset = 0; |
| 8887 var index; | 9516 var index; |
| 8888 var subPart; | 9517 var subPart; |
| 8889 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9518 unittest.expect( |
| 9519 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8890 pathOffset += 1; | 9520 pathOffset += 1; |
| 8891 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 9521 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9522 unittest.equals("analytics/v3/")); |
| 8892 pathOffset += 13; | 9523 pathOffset += 13; |
| 8893 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 9524 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 9525 unittest.equals("management/accounts/")); |
| 8894 pathOffset += 20; | 9526 pathOffset += 20; |
| 8895 index = path.indexOf("/webproperties/", pathOffset); | 9527 index = path.indexOf("/webproperties/", pathOffset); |
| 8896 unittest.expect(index >= 0, unittest.isTrue); | 9528 unittest.expect(index >= 0, unittest.isTrue); |
| 8897 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9529 subPart = |
| 9530 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8898 pathOffset = index; | 9531 pathOffset = index; |
| 8899 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 9532 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8900 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 9533 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 9534 unittest.equals("/webproperties/")); |
| 8901 pathOffset += 15; | 9535 pathOffset += 15; |
| 8902 index = path.indexOf("/profiles/", pathOffset); | 9536 index = path.indexOf("/profiles/", pathOffset); |
| 8903 unittest.expect(index >= 0, unittest.isTrue); | 9537 unittest.expect(index >= 0, unittest.isTrue); |
| 8904 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9538 subPart = |
| 9539 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8905 pathOffset = index; | 9540 pathOffset = index; |
| 8906 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 9541 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8907 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 9542 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 9543 unittest.equals("/profiles/")); |
| 8908 pathOffset += 10; | 9544 pathOffset += 10; |
| 8909 index = path.indexOf("/unsampledReports/", pathOffset); | 9545 index = path.indexOf("/unsampledReports/", pathOffset); |
| 8910 unittest.expect(index >= 0, unittest.isTrue); | 9546 unittest.expect(index >= 0, unittest.isTrue); |
| 8911 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9547 subPart = |
| 9548 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8912 pathOffset = index; | 9549 pathOffset = index; |
| 8913 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 9550 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 8914 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/unsampledReports/")); | 9551 unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 9552 unittest.equals("/unsampledReports/")); |
| 8915 pathOffset += 18; | 9553 pathOffset += 18; |
| 8916 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 9554 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 8917 pathOffset = path.length; | 9555 pathOffset = path.length; |
| 8918 unittest.expect(subPart, unittest.equals("$arg_unsampledReportId")); | 9556 unittest.expect(subPart, unittest.equals("$arg_unsampledReportId")); |
| 8919 | 9557 |
| 8920 var query = (req.url).query; | 9558 var query = (req.url).query; |
| 8921 var queryOffset = 0; | 9559 var queryOffset = 0; |
| 8922 var queryMap = {}; | 9560 var queryMap = {}; |
| 8923 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9561 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8924 parseBool(n) { | 9562 parseBool(n) { |
| 8925 if (n == "true") return true; | 9563 if (n == "true") return true; |
| 8926 if (n == "false") return false; | 9564 if (n == "false") return false; |
| 8927 if (n == null) return null; | 9565 if (n == null) return null; |
| 8928 throw new core.ArgumentError("Invalid boolean: $n"); | 9566 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8929 } | 9567 } |
| 9568 |
| 8930 if (query.length > 0) { | 9569 if (query.length > 0) { |
| 8931 for (var part in query.split("&")) { | 9570 for (var part in query.split("&")) { |
| 8932 var keyvalue = part.split("="); | 9571 var keyvalue = part.split("="); |
| 8933 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9572 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9573 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8934 } | 9574 } |
| 8935 } | 9575 } |
| 8936 | 9576 |
| 8937 | |
| 8938 var h = { | 9577 var h = { |
| 8939 "content-type" : "application/json; charset=utf-8", | 9578 "content-type": "application/json; charset=utf-8", |
| 8940 }; | 9579 }; |
| 8941 var resp = convert.JSON.encode(buildUnsampledReport()); | 9580 var resp = convert.JSON.encode(buildUnsampledReport()); |
| 8942 return new async.Future.value(stringResponse(200, h, resp)); | 9581 return new async.Future.value(stringResponse(200, h, resp)); |
| 8943 }), true); | 9582 }), true); |
| 8944 res.get(arg_accountId, arg_webPropertyId, arg_profileId, arg_unsampledRepo
rtId).then(unittest.expectAsync1(((api.UnsampledReport response) { | 9583 res |
| 9584 .get(arg_accountId, arg_webPropertyId, arg_profileId, |
| 9585 arg_unsampledReportId) |
| 9586 .then(unittest.expectAsync1(((api.UnsampledReport response) { |
| 8945 checkUnsampledReport(response); | 9587 checkUnsampledReport(response); |
| 8946 }))); | 9588 }))); |
| 8947 }); | 9589 }); |
| 8948 | 9590 |
| 8949 unittest.test("method--insert", () { | 9591 unittest.test("method--insert", () { |
| 8950 | |
| 8951 var mock = new HttpServerMock(); | 9592 var mock = new HttpServerMock(); |
| 8952 api.ManagementUnsampledReportsResourceApi res = new api.AnalyticsApi(mock)
.management.unsampledReports; | 9593 api.ManagementUnsampledReportsResourceApi res = |
| 9594 new api.AnalyticsApi(mock).management.unsampledReports; |
| 8953 var arg_request = buildUnsampledReport(); | 9595 var arg_request = buildUnsampledReport(); |
| 8954 var arg_accountId = "foo"; | 9596 var arg_accountId = "foo"; |
| 8955 var arg_webPropertyId = "foo"; | 9597 var arg_webPropertyId = "foo"; |
| 8956 var arg_profileId = "foo"; | 9598 var arg_profileId = "foo"; |
| 8957 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9599 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8958 var obj = new api.UnsampledReport.fromJson(json); | 9600 var obj = new api.UnsampledReport.fromJson(json); |
| 8959 checkUnsampledReport(obj); | 9601 checkUnsampledReport(obj); |
| 8960 | 9602 |
| 8961 var path = (req.url).path; | 9603 var path = (req.url).path; |
| 8962 var pathOffset = 0; | 9604 var pathOffset = 0; |
| 8963 var index; | 9605 var index; |
| 8964 var subPart; | 9606 var subPart; |
| 8965 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9607 unittest.expect( |
| 9608 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8966 pathOffset += 1; | 9609 pathOffset += 1; |
| 8967 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 9610 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9611 unittest.equals("analytics/v3/")); |
| 8968 pathOffset += 13; | 9612 pathOffset += 13; |
| 8969 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 9613 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 9614 unittest.equals("management/accounts/")); |
| 8970 pathOffset += 20; | 9615 pathOffset += 20; |
| 8971 index = path.indexOf("/webproperties/", pathOffset); | 9616 index = path.indexOf("/webproperties/", pathOffset); |
| 8972 unittest.expect(index >= 0, unittest.isTrue); | 9617 unittest.expect(index >= 0, unittest.isTrue); |
| 8973 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9618 subPart = |
| 9619 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8974 pathOffset = index; | 9620 pathOffset = index; |
| 8975 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 9621 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 8976 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 9622 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 9623 unittest.equals("/webproperties/")); |
| 8977 pathOffset += 15; | 9624 pathOffset += 15; |
| 8978 index = path.indexOf("/profiles/", pathOffset); | 9625 index = path.indexOf("/profiles/", pathOffset); |
| 8979 unittest.expect(index >= 0, unittest.isTrue); | 9626 unittest.expect(index >= 0, unittest.isTrue); |
| 8980 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9627 subPart = |
| 9628 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8981 pathOffset = index; | 9629 pathOffset = index; |
| 8982 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 9630 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 8983 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 9631 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 9632 unittest.equals("/profiles/")); |
| 8984 pathOffset += 10; | 9633 pathOffset += 10; |
| 8985 index = path.indexOf("/unsampledReports", pathOffset); | 9634 index = path.indexOf("/unsampledReports", pathOffset); |
| 8986 unittest.expect(index >= 0, unittest.isTrue); | 9635 unittest.expect(index >= 0, unittest.isTrue); |
| 8987 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9636 subPart = |
| 9637 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 8988 pathOffset = index; | 9638 pathOffset = index; |
| 8989 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 9639 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 8990 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/unsampledReports")); | 9640 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 9641 unittest.equals("/unsampledReports")); |
| 8991 pathOffset += 17; | 9642 pathOffset += 17; |
| 8992 | 9643 |
| 8993 var query = (req.url).query; | 9644 var query = (req.url).query; |
| 8994 var queryOffset = 0; | 9645 var queryOffset = 0; |
| 8995 var queryMap = {}; | 9646 var queryMap = {}; |
| 8996 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9647 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8997 parseBool(n) { | 9648 parseBool(n) { |
| 8998 if (n == "true") return true; | 9649 if (n == "true") return true; |
| 8999 if (n == "false") return false; | 9650 if (n == "false") return false; |
| 9000 if (n == null) return null; | 9651 if (n == null) return null; |
| 9001 throw new core.ArgumentError("Invalid boolean: $n"); | 9652 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9002 } | 9653 } |
| 9654 |
| 9003 if (query.length > 0) { | 9655 if (query.length > 0) { |
| 9004 for (var part in query.split("&")) { | 9656 for (var part in query.split("&")) { |
| 9005 var keyvalue = part.split("="); | 9657 var keyvalue = part.split("="); |
| 9006 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9658 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9659 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9007 } | 9660 } |
| 9008 } | 9661 } |
| 9009 | 9662 |
| 9010 | |
| 9011 var h = { | 9663 var h = { |
| 9012 "content-type" : "application/json; charset=utf-8", | 9664 "content-type": "application/json; charset=utf-8", |
| 9013 }; | 9665 }; |
| 9014 var resp = convert.JSON.encode(buildUnsampledReport()); | 9666 var resp = convert.JSON.encode(buildUnsampledReport()); |
| 9015 return new async.Future.value(stringResponse(200, h, resp)); | 9667 return new async.Future.value(stringResponse(200, h, resp)); |
| 9016 }), true); | 9668 }), true); |
| 9017 res.insert(arg_request, arg_accountId, arg_webPropertyId, arg_profileId).t
hen(unittest.expectAsync1(((api.UnsampledReport response) { | 9669 res |
| 9670 .insert(arg_request, arg_accountId, arg_webPropertyId, arg_profileId) |
| 9671 .then(unittest.expectAsync1(((api.UnsampledReport response) { |
| 9018 checkUnsampledReport(response); | 9672 checkUnsampledReport(response); |
| 9019 }))); | 9673 }))); |
| 9020 }); | 9674 }); |
| 9021 | 9675 |
| 9022 unittest.test("method--list", () { | 9676 unittest.test("method--list", () { |
| 9023 | |
| 9024 var mock = new HttpServerMock(); | 9677 var mock = new HttpServerMock(); |
| 9025 api.ManagementUnsampledReportsResourceApi res = new api.AnalyticsApi(mock)
.management.unsampledReports; | 9678 api.ManagementUnsampledReportsResourceApi res = |
| 9679 new api.AnalyticsApi(mock).management.unsampledReports; |
| 9026 var arg_accountId = "foo"; | 9680 var arg_accountId = "foo"; |
| 9027 var arg_webPropertyId = "foo"; | 9681 var arg_webPropertyId = "foo"; |
| 9028 var arg_profileId = "foo"; | 9682 var arg_profileId = "foo"; |
| 9029 var arg_max_results = 42; | 9683 var arg_max_results = 42; |
| 9030 var arg_start_index = 42; | 9684 var arg_start_index = 42; |
| 9031 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9685 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9032 var path = (req.url).path; | 9686 var path = (req.url).path; |
| 9033 var pathOffset = 0; | 9687 var pathOffset = 0; |
| 9034 var index; | 9688 var index; |
| 9035 var subPart; | 9689 var subPart; |
| 9036 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9690 unittest.expect( |
| 9691 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9037 pathOffset += 1; | 9692 pathOffset += 1; |
| 9038 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 9693 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9694 unittest.equals("analytics/v3/")); |
| 9039 pathOffset += 13; | 9695 pathOffset += 13; |
| 9040 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 9696 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 9697 unittest.equals("management/accounts/")); |
| 9041 pathOffset += 20; | 9698 pathOffset += 20; |
| 9042 index = path.indexOf("/webproperties/", pathOffset); | 9699 index = path.indexOf("/webproperties/", pathOffset); |
| 9043 unittest.expect(index >= 0, unittest.isTrue); | 9700 unittest.expect(index >= 0, unittest.isTrue); |
| 9044 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9701 subPart = |
| 9702 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9045 pathOffset = index; | 9703 pathOffset = index; |
| 9046 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 9704 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9047 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 9705 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 9706 unittest.equals("/webproperties/")); |
| 9048 pathOffset += 15; | 9707 pathOffset += 15; |
| 9049 index = path.indexOf("/profiles/", pathOffset); | 9708 index = path.indexOf("/profiles/", pathOffset); |
| 9050 unittest.expect(index >= 0, unittest.isTrue); | 9709 unittest.expect(index >= 0, unittest.isTrue); |
| 9051 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9710 subPart = |
| 9711 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9052 pathOffset = index; | 9712 pathOffset = index; |
| 9053 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 9713 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9054 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/profiles/")); | 9714 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 9715 unittest.equals("/profiles/")); |
| 9055 pathOffset += 10; | 9716 pathOffset += 10; |
| 9056 index = path.indexOf("/unsampledReports", pathOffset); | 9717 index = path.indexOf("/unsampledReports", pathOffset); |
| 9057 unittest.expect(index >= 0, unittest.isTrue); | 9718 unittest.expect(index >= 0, unittest.isTrue); |
| 9058 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9719 subPart = |
| 9720 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9059 pathOffset = index; | 9721 pathOffset = index; |
| 9060 unittest.expect(subPart, unittest.equals("$arg_profileId")); | 9722 unittest.expect(subPart, unittest.equals("$arg_profileId")); |
| 9061 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/unsampledReports")); | 9723 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 9724 unittest.equals("/unsampledReports")); |
| 9062 pathOffset += 17; | 9725 pathOffset += 17; |
| 9063 | 9726 |
| 9064 var query = (req.url).query; | 9727 var query = (req.url).query; |
| 9065 var queryOffset = 0; | 9728 var queryOffset = 0; |
| 9066 var queryMap = {}; | 9729 var queryMap = {}; |
| 9067 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9730 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9068 parseBool(n) { | 9731 parseBool(n) { |
| 9069 if (n == "true") return true; | 9732 if (n == "true") return true; |
| 9070 if (n == "false") return false; | 9733 if (n == "false") return false; |
| 9071 if (n == null) return null; | 9734 if (n == null) return null; |
| 9072 throw new core.ArgumentError("Invalid boolean: $n"); | 9735 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9073 } | 9736 } |
| 9737 |
| 9074 if (query.length > 0) { | 9738 if (query.length > 0) { |
| 9075 for (var part in query.split("&")) { | 9739 for (var part in query.split("&")) { |
| 9076 var keyvalue = part.split("="); | 9740 var keyvalue = part.split("="); |
| 9077 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9741 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9742 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9078 } | 9743 } |
| 9079 } | 9744 } |
| 9080 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 9745 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 9081 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 9746 unittest.equals(arg_max_results)); |
| 9082 | 9747 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 9748 unittest.equals(arg_start_index)); |
| 9083 | 9749 |
| 9084 var h = { | 9750 var h = { |
| 9085 "content-type" : "application/json; charset=utf-8", | 9751 "content-type": "application/json; charset=utf-8", |
| 9086 }; | 9752 }; |
| 9087 var resp = convert.JSON.encode(buildUnsampledReports()); | 9753 var resp = convert.JSON.encode(buildUnsampledReports()); |
| 9088 return new async.Future.value(stringResponse(200, h, resp)); | 9754 return new async.Future.value(stringResponse(200, h, resp)); |
| 9089 }), true); | 9755 }), true); |
| 9090 res.list(arg_accountId, arg_webPropertyId, arg_profileId, max_results: arg
_max_results, start_index: arg_start_index).then(unittest.expectAsync1(((api.Uns
ampledReports response) { | 9756 res |
| 9757 .list(arg_accountId, arg_webPropertyId, arg_profileId, |
| 9758 max_results: arg_max_results, start_index: arg_start_index) |
| 9759 .then(unittest.expectAsync1(((api.UnsampledReports response) { |
| 9091 checkUnsampledReports(response); | 9760 checkUnsampledReports(response); |
| 9092 }))); | 9761 }))); |
| 9093 }); | 9762 }); |
| 9094 | |
| 9095 }); | 9763 }); |
| 9096 | 9764 |
| 9097 | |
| 9098 unittest.group("resource-ManagementUploadsResourceApi", () { | 9765 unittest.group("resource-ManagementUploadsResourceApi", () { |
| 9099 unittest.test("method--deleteUploadData", () { | 9766 unittest.test("method--deleteUploadData", () { |
| 9100 | |
| 9101 var mock = new HttpServerMock(); | 9767 var mock = new HttpServerMock(); |
| 9102 api.ManagementUploadsResourceApi res = new api.AnalyticsApi(mock).manageme
nt.uploads; | 9768 api.ManagementUploadsResourceApi res = |
| 9769 new api.AnalyticsApi(mock).management.uploads; |
| 9103 var arg_request = buildAnalyticsDataimportDeleteUploadDataRequest(); | 9770 var arg_request = buildAnalyticsDataimportDeleteUploadDataRequest(); |
| 9104 var arg_accountId = "foo"; | 9771 var arg_accountId = "foo"; |
| 9105 var arg_webPropertyId = "foo"; | 9772 var arg_webPropertyId = "foo"; |
| 9106 var arg_customDataSourceId = "foo"; | 9773 var arg_customDataSourceId = "foo"; |
| 9107 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9774 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9108 var obj = new api.AnalyticsDataimportDeleteUploadDataRequest.fromJson(js
on); | 9775 var obj = |
| 9776 new api.AnalyticsDataimportDeleteUploadDataRequest.fromJson(json); |
| 9109 checkAnalyticsDataimportDeleteUploadDataRequest(obj); | 9777 checkAnalyticsDataimportDeleteUploadDataRequest(obj); |
| 9110 | 9778 |
| 9111 var path = (req.url).path; | 9779 var path = (req.url).path; |
| 9112 var pathOffset = 0; | 9780 var pathOffset = 0; |
| 9113 var index; | 9781 var index; |
| 9114 var subPart; | 9782 var subPart; |
| 9115 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9783 unittest.expect( |
| 9784 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9116 pathOffset += 1; | 9785 pathOffset += 1; |
| 9117 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 9786 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9787 unittest.equals("analytics/v3/")); |
| 9118 pathOffset += 13; | 9788 pathOffset += 13; |
| 9119 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 9789 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 9790 unittest.equals("management/accounts/")); |
| 9120 pathOffset += 20; | 9791 pathOffset += 20; |
| 9121 index = path.indexOf("/webproperties/", pathOffset); | 9792 index = path.indexOf("/webproperties/", pathOffset); |
| 9122 unittest.expect(index >= 0, unittest.isTrue); | 9793 unittest.expect(index >= 0, unittest.isTrue); |
| 9123 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9794 subPart = |
| 9795 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9124 pathOffset = index; | 9796 pathOffset = index; |
| 9125 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 9797 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9126 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 9798 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 9799 unittest.equals("/webproperties/")); |
| 9127 pathOffset += 15; | 9800 pathOffset += 15; |
| 9128 index = path.indexOf("/customDataSources/", pathOffset); | 9801 index = path.indexOf("/customDataSources/", pathOffset); |
| 9129 unittest.expect(index >= 0, unittest.isTrue); | 9802 unittest.expect(index >= 0, unittest.isTrue); |
| 9130 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9803 subPart = |
| 9804 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9131 pathOffset = index; | 9805 pathOffset = index; |
| 9132 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 9806 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9133 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/customDataSources/")); | 9807 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 9808 unittest.equals("/customDataSources/")); |
| 9134 pathOffset += 19; | 9809 pathOffset += 19; |
| 9135 index = path.indexOf("/deleteUploadData", pathOffset); | 9810 index = path.indexOf("/deleteUploadData", pathOffset); |
| 9136 unittest.expect(index >= 0, unittest.isTrue); | 9811 unittest.expect(index >= 0, unittest.isTrue); |
| 9137 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9812 subPart = |
| 9813 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9138 pathOffset = index; | 9814 pathOffset = index; |
| 9139 unittest.expect(subPart, unittest.equals("$arg_customDataSourceId")); | 9815 unittest.expect(subPart, unittest.equals("$arg_customDataSourceId")); |
| 9140 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/deleteUploadData")); | 9816 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 9817 unittest.equals("/deleteUploadData")); |
| 9141 pathOffset += 17; | 9818 pathOffset += 17; |
| 9142 | 9819 |
| 9143 var query = (req.url).query; | 9820 var query = (req.url).query; |
| 9144 var queryOffset = 0; | 9821 var queryOffset = 0; |
| 9145 var queryMap = {}; | 9822 var queryMap = {}; |
| 9146 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9823 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9147 parseBool(n) { | 9824 parseBool(n) { |
| 9148 if (n == "true") return true; | 9825 if (n == "true") return true; |
| 9149 if (n == "false") return false; | 9826 if (n == "false") return false; |
| 9150 if (n == null) return null; | 9827 if (n == null) return null; |
| 9151 throw new core.ArgumentError("Invalid boolean: $n"); | 9828 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9152 } | 9829 } |
| 9830 |
| 9153 if (query.length > 0) { | 9831 if (query.length > 0) { |
| 9154 for (var part in query.split("&")) { | 9832 for (var part in query.split("&")) { |
| 9155 var keyvalue = part.split("="); | 9833 var keyvalue = part.split("="); |
| 9156 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9834 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9835 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9157 } | 9836 } |
| 9158 } | 9837 } |
| 9159 | 9838 |
| 9160 | |
| 9161 var h = { | 9839 var h = { |
| 9162 "content-type" : "application/json; charset=utf-8", | 9840 "content-type": "application/json; charset=utf-8", |
| 9163 }; | 9841 }; |
| 9164 var resp = ""; | 9842 var resp = ""; |
| 9165 return new async.Future.value(stringResponse(200, h, resp)); | 9843 return new async.Future.value(stringResponse(200, h, resp)); |
| 9166 }), true); | 9844 }), true); |
| 9167 res.deleteUploadData(arg_request, arg_accountId, arg_webPropertyId, arg_cu
stomDataSourceId).then(unittest.expectAsync1((_) {})); | 9845 res |
| 9846 .deleteUploadData(arg_request, arg_accountId, arg_webPropertyId, |
| 9847 arg_customDataSourceId) |
| 9848 .then(unittest.expectAsync1((_) {})); |
| 9168 }); | 9849 }); |
| 9169 | 9850 |
| 9170 unittest.test("method--get", () { | 9851 unittest.test("method--get", () { |
| 9171 | |
| 9172 var mock = new HttpServerMock(); | 9852 var mock = new HttpServerMock(); |
| 9173 api.ManagementUploadsResourceApi res = new api.AnalyticsApi(mock).manageme
nt.uploads; | 9853 api.ManagementUploadsResourceApi res = |
| 9854 new api.AnalyticsApi(mock).management.uploads; |
| 9174 var arg_accountId = "foo"; | 9855 var arg_accountId = "foo"; |
| 9175 var arg_webPropertyId = "foo"; | 9856 var arg_webPropertyId = "foo"; |
| 9176 var arg_customDataSourceId = "foo"; | 9857 var arg_customDataSourceId = "foo"; |
| 9177 var arg_uploadId = "foo"; | 9858 var arg_uploadId = "foo"; |
| 9178 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9859 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9179 var path = (req.url).path; | 9860 var path = (req.url).path; |
| 9180 var pathOffset = 0; | 9861 var pathOffset = 0; |
| 9181 var index; | 9862 var index; |
| 9182 var subPart; | 9863 var subPart; |
| 9183 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9864 unittest.expect( |
| 9865 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9184 pathOffset += 1; | 9866 pathOffset += 1; |
| 9185 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 9867 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9868 unittest.equals("analytics/v3/")); |
| 9186 pathOffset += 13; | 9869 pathOffset += 13; |
| 9187 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 9870 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 9871 unittest.equals("management/accounts/")); |
| 9188 pathOffset += 20; | 9872 pathOffset += 20; |
| 9189 index = path.indexOf("/webproperties/", pathOffset); | 9873 index = path.indexOf("/webproperties/", pathOffset); |
| 9190 unittest.expect(index >= 0, unittest.isTrue); | 9874 unittest.expect(index >= 0, unittest.isTrue); |
| 9191 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9875 subPart = |
| 9876 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9192 pathOffset = index; | 9877 pathOffset = index; |
| 9193 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 9878 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9194 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 9879 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 9880 unittest.equals("/webproperties/")); |
| 9195 pathOffset += 15; | 9881 pathOffset += 15; |
| 9196 index = path.indexOf("/customDataSources/", pathOffset); | 9882 index = path.indexOf("/customDataSources/", pathOffset); |
| 9197 unittest.expect(index >= 0, unittest.isTrue); | 9883 unittest.expect(index >= 0, unittest.isTrue); |
| 9198 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9884 subPart = |
| 9885 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9199 pathOffset = index; | 9886 pathOffset = index; |
| 9200 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 9887 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9201 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/customDataSources/")); | 9888 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 9889 unittest.equals("/customDataSources/")); |
| 9202 pathOffset += 19; | 9890 pathOffset += 19; |
| 9203 index = path.indexOf("/uploads/", pathOffset); | 9891 index = path.indexOf("/uploads/", pathOffset); |
| 9204 unittest.expect(index >= 0, unittest.isTrue); | 9892 unittest.expect(index >= 0, unittest.isTrue); |
| 9205 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9893 subPart = |
| 9894 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9206 pathOffset = index; | 9895 pathOffset = index; |
| 9207 unittest.expect(subPart, unittest.equals("$arg_customDataSourceId")); | 9896 unittest.expect(subPart, unittest.equals("$arg_customDataSourceId")); |
| 9208 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/uploads/")); | 9897 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 9898 unittest.equals("/uploads/")); |
| 9209 pathOffset += 9; | 9899 pathOffset += 9; |
| 9210 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 9900 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 9211 pathOffset = path.length; | 9901 pathOffset = path.length; |
| 9212 unittest.expect(subPart, unittest.equals("$arg_uploadId")); | 9902 unittest.expect(subPart, unittest.equals("$arg_uploadId")); |
| 9213 | 9903 |
| 9214 var query = (req.url).query; | 9904 var query = (req.url).query; |
| 9215 var queryOffset = 0; | 9905 var queryOffset = 0; |
| 9216 var queryMap = {}; | 9906 var queryMap = {}; |
| 9217 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9907 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9218 parseBool(n) { | 9908 parseBool(n) { |
| 9219 if (n == "true") return true; | 9909 if (n == "true") return true; |
| 9220 if (n == "false") return false; | 9910 if (n == "false") return false; |
| 9221 if (n == null) return null; | 9911 if (n == null) return null; |
| 9222 throw new core.ArgumentError("Invalid boolean: $n"); | 9912 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9223 } | 9913 } |
| 9914 |
| 9224 if (query.length > 0) { | 9915 if (query.length > 0) { |
| 9225 for (var part in query.split("&")) { | 9916 for (var part in query.split("&")) { |
| 9226 var keyvalue = part.split("="); | 9917 var keyvalue = part.split("="); |
| 9227 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9918 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9919 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9228 } | 9920 } |
| 9229 } | 9921 } |
| 9230 | 9922 |
| 9231 | |
| 9232 var h = { | 9923 var h = { |
| 9233 "content-type" : "application/json; charset=utf-8", | 9924 "content-type": "application/json; charset=utf-8", |
| 9234 }; | 9925 }; |
| 9235 var resp = convert.JSON.encode(buildUpload()); | 9926 var resp = convert.JSON.encode(buildUpload()); |
| 9236 return new async.Future.value(stringResponse(200, h, resp)); | 9927 return new async.Future.value(stringResponse(200, h, resp)); |
| 9237 }), true); | 9928 }), true); |
| 9238 res.get(arg_accountId, arg_webPropertyId, arg_customDataSourceId, arg_uplo
adId).then(unittest.expectAsync1(((api.Upload response) { | 9929 res |
| 9930 .get(arg_accountId, arg_webPropertyId, arg_customDataSourceId, |
| 9931 arg_uploadId) |
| 9932 .then(unittest.expectAsync1(((api.Upload response) { |
| 9239 checkUpload(response); | 9933 checkUpload(response); |
| 9240 }))); | 9934 }))); |
| 9241 }); | 9935 }); |
| 9242 | 9936 |
| 9243 unittest.test("method--list", () { | 9937 unittest.test("method--list", () { |
| 9244 | |
| 9245 var mock = new HttpServerMock(); | 9938 var mock = new HttpServerMock(); |
| 9246 api.ManagementUploadsResourceApi res = new api.AnalyticsApi(mock).manageme
nt.uploads; | 9939 api.ManagementUploadsResourceApi res = |
| 9940 new api.AnalyticsApi(mock).management.uploads; |
| 9247 var arg_accountId = "foo"; | 9941 var arg_accountId = "foo"; |
| 9248 var arg_webPropertyId = "foo"; | 9942 var arg_webPropertyId = "foo"; |
| 9249 var arg_customDataSourceId = "foo"; | 9943 var arg_customDataSourceId = "foo"; |
| 9250 var arg_max_results = 42; | 9944 var arg_max_results = 42; |
| 9251 var arg_start_index = 42; | 9945 var arg_start_index = 42; |
| 9252 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9946 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9253 var path = (req.url).path; | 9947 var path = (req.url).path; |
| 9254 var pathOffset = 0; | 9948 var pathOffset = 0; |
| 9255 var index; | 9949 var index; |
| 9256 var subPart; | 9950 var subPart; |
| 9257 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9951 unittest.expect( |
| 9952 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9258 pathOffset += 1; | 9953 pathOffset += 1; |
| 9259 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 9954 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9955 unittest.equals("analytics/v3/")); |
| 9260 pathOffset += 13; | 9956 pathOffset += 13; |
| 9261 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 9957 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 9958 unittest.equals("management/accounts/")); |
| 9262 pathOffset += 20; | 9959 pathOffset += 20; |
| 9263 index = path.indexOf("/webproperties/", pathOffset); | 9960 index = path.indexOf("/webproperties/", pathOffset); |
| 9264 unittest.expect(index >= 0, unittest.isTrue); | 9961 unittest.expect(index >= 0, unittest.isTrue); |
| 9265 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9962 subPart = |
| 9963 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9266 pathOffset = index; | 9964 pathOffset = index; |
| 9267 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 9965 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9268 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 9966 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 9967 unittest.equals("/webproperties/")); |
| 9269 pathOffset += 15; | 9968 pathOffset += 15; |
| 9270 index = path.indexOf("/customDataSources/", pathOffset); | 9969 index = path.indexOf("/customDataSources/", pathOffset); |
| 9271 unittest.expect(index >= 0, unittest.isTrue); | 9970 unittest.expect(index >= 0, unittest.isTrue); |
| 9272 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9971 subPart = |
| 9972 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9273 pathOffset = index; | 9973 pathOffset = index; |
| 9274 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 9974 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9275 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/customDataSources/")); | 9975 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 9976 unittest.equals("/customDataSources/")); |
| 9276 pathOffset += 19; | 9977 pathOffset += 19; |
| 9277 index = path.indexOf("/uploads", pathOffset); | 9978 index = path.indexOf("/uploads", pathOffset); |
| 9278 unittest.expect(index >= 0, unittest.isTrue); | 9979 unittest.expect(index >= 0, unittest.isTrue); |
| 9279 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 9980 subPart = |
| 9981 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9280 pathOffset = index; | 9982 pathOffset = index; |
| 9281 unittest.expect(subPart, unittest.equals("$arg_customDataSourceId")); | 9983 unittest.expect(subPart, unittest.equals("$arg_customDataSourceId")); |
| 9282 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/uploads")); | 9984 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 9985 unittest.equals("/uploads")); |
| 9283 pathOffset += 8; | 9986 pathOffset += 8; |
| 9284 | 9987 |
| 9285 var query = (req.url).query; | 9988 var query = (req.url).query; |
| 9286 var queryOffset = 0; | 9989 var queryOffset = 0; |
| 9287 var queryMap = {}; | 9990 var queryMap = {}; |
| 9288 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9991 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9289 parseBool(n) { | 9992 parseBool(n) { |
| 9290 if (n == "true") return true; | 9993 if (n == "true") return true; |
| 9291 if (n == "false") return false; | 9994 if (n == "false") return false; |
| 9292 if (n == null) return null; | 9995 if (n == null) return null; |
| 9293 throw new core.ArgumentError("Invalid boolean: $n"); | 9996 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9294 } | 9997 } |
| 9998 |
| 9295 if (query.length > 0) { | 9999 if (query.length > 0) { |
| 9296 for (var part in query.split("&")) { | 10000 for (var part in query.split("&")) { |
| 9297 var keyvalue = part.split("="); | 10001 var keyvalue = part.split("="); |
| 9298 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10002 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10003 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9299 } | 10004 } |
| 9300 } | 10005 } |
| 9301 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 10006 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 9302 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 10007 unittest.equals(arg_max_results)); |
| 9303 | 10008 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 10009 unittest.equals(arg_start_index)); |
| 9304 | 10010 |
| 9305 var h = { | 10011 var h = { |
| 9306 "content-type" : "application/json; charset=utf-8", | 10012 "content-type": "application/json; charset=utf-8", |
| 9307 }; | 10013 }; |
| 9308 var resp = convert.JSON.encode(buildUploads()); | 10014 var resp = convert.JSON.encode(buildUploads()); |
| 9309 return new async.Future.value(stringResponse(200, h, resp)); | 10015 return new async.Future.value(stringResponse(200, h, resp)); |
| 9310 }), true); | 10016 }), true); |
| 9311 res.list(arg_accountId, arg_webPropertyId, arg_customDataSourceId, max_res
ults: arg_max_results, start_index: arg_start_index).then(unittest.expectAsync1(
((api.Uploads response) { | 10017 res |
| 10018 .list(arg_accountId, arg_webPropertyId, arg_customDataSourceId, |
| 10019 max_results: arg_max_results, start_index: arg_start_index) |
| 10020 .then(unittest.expectAsync1(((api.Uploads response) { |
| 9312 checkUploads(response); | 10021 checkUploads(response); |
| 9313 }))); | 10022 }))); |
| 9314 }); | 10023 }); |
| 9315 | 10024 |
| 9316 unittest.test("method--uploadData", () { | 10025 unittest.test("method--uploadData", () { |
| 9317 // TODO: Implement tests for media upload; | 10026 // TODO: Implement tests for media upload; |
| 9318 // TODO: Implement tests for media download; | 10027 // TODO: Implement tests for media download; |
| 9319 | 10028 |
| 9320 var mock = new HttpServerMock(); | 10029 var mock = new HttpServerMock(); |
| 9321 api.ManagementUploadsResourceApi res = new api.AnalyticsApi(mock).manageme
nt.uploads; | 10030 api.ManagementUploadsResourceApi res = |
| 10031 new api.AnalyticsApi(mock).management.uploads; |
| 9322 var arg_accountId = "foo"; | 10032 var arg_accountId = "foo"; |
| 9323 var arg_webPropertyId = "foo"; | 10033 var arg_webPropertyId = "foo"; |
| 9324 var arg_customDataSourceId = "foo"; | 10034 var arg_customDataSourceId = "foo"; |
| 9325 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10035 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9326 var path = (req.url).path; | 10036 var path = (req.url).path; |
| 9327 var pathOffset = 0; | 10037 var pathOffset = 0; |
| 9328 var index; | 10038 var index; |
| 9329 var subPart; | 10039 var subPart; |
| 9330 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10040 unittest.expect( |
| 10041 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9331 pathOffset += 1; | 10042 pathOffset += 1; |
| 9332 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10043 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10044 unittest.equals("analytics/v3/")); |
| 9333 pathOffset += 13; | 10045 pathOffset += 13; |
| 9334 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10046 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10047 unittest.equals("management/accounts/")); |
| 9335 pathOffset += 20; | 10048 pathOffset += 20; |
| 9336 index = path.indexOf("/webproperties/", pathOffset); | 10049 index = path.indexOf("/webproperties/", pathOffset); |
| 9337 unittest.expect(index >= 0, unittest.isTrue); | 10050 unittest.expect(index >= 0, unittest.isTrue); |
| 9338 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10051 subPart = |
| 10052 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9339 pathOffset = index; | 10053 pathOffset = index; |
| 9340 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10054 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9341 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 10055 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 10056 unittest.equals("/webproperties/")); |
| 9342 pathOffset += 15; | 10057 pathOffset += 15; |
| 9343 index = path.indexOf("/customDataSources/", pathOffset); | 10058 index = path.indexOf("/customDataSources/", pathOffset); |
| 9344 unittest.expect(index >= 0, unittest.isTrue); | 10059 unittest.expect(index >= 0, unittest.isTrue); |
| 9345 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10060 subPart = |
| 10061 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9346 pathOffset = index; | 10062 pathOffset = index; |
| 9347 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 10063 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9348 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/customDataSources/")); | 10064 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 10065 unittest.equals("/customDataSources/")); |
| 9349 pathOffset += 19; | 10066 pathOffset += 19; |
| 9350 index = path.indexOf("/uploads", pathOffset); | 10067 index = path.indexOf("/uploads", pathOffset); |
| 9351 unittest.expect(index >= 0, unittest.isTrue); | 10068 unittest.expect(index >= 0, unittest.isTrue); |
| 9352 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10069 subPart = |
| 10070 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9353 pathOffset = index; | 10071 pathOffset = index; |
| 9354 unittest.expect(subPart, unittest.equals("$arg_customDataSourceId")); | 10072 unittest.expect(subPart, unittest.equals("$arg_customDataSourceId")); |
| 9355 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/uploads")); | 10073 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 10074 unittest.equals("/uploads")); |
| 9356 pathOffset += 8; | 10075 pathOffset += 8; |
| 9357 | 10076 |
| 9358 var query = (req.url).query; | 10077 var query = (req.url).query; |
| 9359 var queryOffset = 0; | 10078 var queryOffset = 0; |
| 9360 var queryMap = {}; | 10079 var queryMap = {}; |
| 9361 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10080 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9362 parseBool(n) { | 10081 parseBool(n) { |
| 9363 if (n == "true") return true; | 10082 if (n == "true") return true; |
| 9364 if (n == "false") return false; | 10083 if (n == "false") return false; |
| 9365 if (n == null) return null; | 10084 if (n == null) return null; |
| 9366 throw new core.ArgumentError("Invalid boolean: $n"); | 10085 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9367 } | 10086 } |
| 10087 |
| 9368 if (query.length > 0) { | 10088 if (query.length > 0) { |
| 9369 for (var part in query.split("&")) { | 10089 for (var part in query.split("&")) { |
| 9370 var keyvalue = part.split("="); | 10090 var keyvalue = part.split("="); |
| 9371 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10091 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10092 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9372 } | 10093 } |
| 9373 } | 10094 } |
| 9374 | 10095 |
| 9375 | |
| 9376 var h = { | 10096 var h = { |
| 9377 "content-type" : "application/json; charset=utf-8", | 10097 "content-type": "application/json; charset=utf-8", |
| 9378 }; | 10098 }; |
| 9379 var resp = convert.JSON.encode(buildUpload()); | 10099 var resp = convert.JSON.encode(buildUpload()); |
| 9380 return new async.Future.value(stringResponse(200, h, resp)); | 10100 return new async.Future.value(stringResponse(200, h, resp)); |
| 9381 }), true); | 10101 }), true); |
| 9382 res.uploadData(arg_accountId, arg_webPropertyId, arg_customDataSourceId).t
hen(unittest.expectAsync1(((api.Upload response) { | 10102 res |
| 10103 .uploadData(arg_accountId, arg_webPropertyId, arg_customDataSourceId) |
| 10104 .then(unittest.expectAsync1(((api.Upload response) { |
| 9383 checkUpload(response); | 10105 checkUpload(response); |
| 9384 }))); | 10106 }))); |
| 9385 }); | 10107 }); |
| 9386 | |
| 9387 }); | 10108 }); |
| 9388 | 10109 |
| 9389 | |
| 9390 unittest.group("resource-ManagementWebPropertyAdWordsLinksResourceApi", () { | 10110 unittest.group("resource-ManagementWebPropertyAdWordsLinksResourceApi", () { |
| 9391 unittest.test("method--delete", () { | 10111 unittest.test("method--delete", () { |
| 9392 | |
| 9393 var mock = new HttpServerMock(); | 10112 var mock = new HttpServerMock(); |
| 9394 api.ManagementWebPropertyAdWordsLinksResourceApi res = new api.AnalyticsAp
i(mock).management.webPropertyAdWordsLinks; | 10113 api.ManagementWebPropertyAdWordsLinksResourceApi res = |
| 10114 new api.AnalyticsApi(mock).management.webPropertyAdWordsLinks; |
| 9395 var arg_accountId = "foo"; | 10115 var arg_accountId = "foo"; |
| 9396 var arg_webPropertyId = "foo"; | 10116 var arg_webPropertyId = "foo"; |
| 9397 var arg_webPropertyAdWordsLinkId = "foo"; | 10117 var arg_webPropertyAdWordsLinkId = "foo"; |
| 9398 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10118 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9399 var path = (req.url).path; | 10119 var path = (req.url).path; |
| 9400 var pathOffset = 0; | 10120 var pathOffset = 0; |
| 9401 var index; | 10121 var index; |
| 9402 var subPart; | 10122 var subPart; |
| 9403 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10123 unittest.expect( |
| 10124 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9404 pathOffset += 1; | 10125 pathOffset += 1; |
| 9405 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10126 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10127 unittest.equals("analytics/v3/")); |
| 9406 pathOffset += 13; | 10128 pathOffset += 13; |
| 9407 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10129 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10130 unittest.equals("management/accounts/")); |
| 9408 pathOffset += 20; | 10131 pathOffset += 20; |
| 9409 index = path.indexOf("/webproperties/", pathOffset); | 10132 index = path.indexOf("/webproperties/", pathOffset); |
| 9410 unittest.expect(index >= 0, unittest.isTrue); | 10133 unittest.expect(index >= 0, unittest.isTrue); |
| 9411 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10134 subPart = |
| 10135 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9412 pathOffset = index; | 10136 pathOffset = index; |
| 9413 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10137 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9414 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 10138 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 10139 unittest.equals("/webproperties/")); |
| 9415 pathOffset += 15; | 10140 pathOffset += 15; |
| 9416 index = path.indexOf("/entityAdWordsLinks/", pathOffset); | 10141 index = path.indexOf("/entityAdWordsLinks/", pathOffset); |
| 9417 unittest.expect(index >= 0, unittest.isTrue); | 10142 unittest.expect(index >= 0, unittest.isTrue); |
| 9418 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10143 subPart = |
| 10144 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9419 pathOffset = index; | 10145 pathOffset = index; |
| 9420 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 10146 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9421 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/entityAdWordsLinks/")); | 10147 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10148 unittest.equals("/entityAdWordsLinks/")); |
| 9422 pathOffset += 20; | 10149 pathOffset += 20; |
| 9423 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 10150 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 9424 pathOffset = path.length; | 10151 pathOffset = path.length; |
| 9425 unittest.expect(subPart, unittest.equals("$arg_webPropertyAdWordsLinkId"
)); | 10152 unittest.expect( |
| 10153 subPart, unittest.equals("$arg_webPropertyAdWordsLinkId")); |
| 9426 | 10154 |
| 9427 var query = (req.url).query; | 10155 var query = (req.url).query; |
| 9428 var queryOffset = 0; | 10156 var queryOffset = 0; |
| 9429 var queryMap = {}; | 10157 var queryMap = {}; |
| 9430 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10158 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9431 parseBool(n) { | 10159 parseBool(n) { |
| 9432 if (n == "true") return true; | 10160 if (n == "true") return true; |
| 9433 if (n == "false") return false; | 10161 if (n == "false") return false; |
| 9434 if (n == null) return null; | 10162 if (n == null) return null; |
| 9435 throw new core.ArgumentError("Invalid boolean: $n"); | 10163 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9436 } | 10164 } |
| 10165 |
| 9437 if (query.length > 0) { | 10166 if (query.length > 0) { |
| 9438 for (var part in query.split("&")) { | 10167 for (var part in query.split("&")) { |
| 9439 var keyvalue = part.split("="); | 10168 var keyvalue = part.split("="); |
| 9440 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10169 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10170 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9441 } | 10171 } |
| 9442 } | 10172 } |
| 9443 | 10173 |
| 9444 | |
| 9445 var h = { | 10174 var h = { |
| 9446 "content-type" : "application/json; charset=utf-8", | 10175 "content-type": "application/json; charset=utf-8", |
| 9447 }; | 10176 }; |
| 9448 var resp = ""; | 10177 var resp = ""; |
| 9449 return new async.Future.value(stringResponse(200, h, resp)); | 10178 return new async.Future.value(stringResponse(200, h, resp)); |
| 9450 }), true); | 10179 }), true); |
| 9451 res.delete(arg_accountId, arg_webPropertyId, arg_webPropertyAdWordsLinkId)
.then(unittest.expectAsync1((_) {})); | 10180 res |
| 10181 .delete( |
| 10182 arg_accountId, arg_webPropertyId, arg_webPropertyAdWordsLinkId) |
| 10183 .then(unittest.expectAsync1((_) {})); |
| 9452 }); | 10184 }); |
| 9453 | 10185 |
| 9454 unittest.test("method--get", () { | 10186 unittest.test("method--get", () { |
| 9455 | |
| 9456 var mock = new HttpServerMock(); | 10187 var mock = new HttpServerMock(); |
| 9457 api.ManagementWebPropertyAdWordsLinksResourceApi res = new api.AnalyticsAp
i(mock).management.webPropertyAdWordsLinks; | 10188 api.ManagementWebPropertyAdWordsLinksResourceApi res = |
| 10189 new api.AnalyticsApi(mock).management.webPropertyAdWordsLinks; |
| 9458 var arg_accountId = "foo"; | 10190 var arg_accountId = "foo"; |
| 9459 var arg_webPropertyId = "foo"; | 10191 var arg_webPropertyId = "foo"; |
| 9460 var arg_webPropertyAdWordsLinkId = "foo"; | 10192 var arg_webPropertyAdWordsLinkId = "foo"; |
| 9461 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10193 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9462 var path = (req.url).path; | 10194 var path = (req.url).path; |
| 9463 var pathOffset = 0; | 10195 var pathOffset = 0; |
| 9464 var index; | 10196 var index; |
| 9465 var subPart; | 10197 var subPart; |
| 9466 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10198 unittest.expect( |
| 10199 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9467 pathOffset += 1; | 10200 pathOffset += 1; |
| 9468 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10201 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10202 unittest.equals("analytics/v3/")); |
| 9469 pathOffset += 13; | 10203 pathOffset += 13; |
| 9470 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10204 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10205 unittest.equals("management/accounts/")); |
| 9471 pathOffset += 20; | 10206 pathOffset += 20; |
| 9472 index = path.indexOf("/webproperties/", pathOffset); | 10207 index = path.indexOf("/webproperties/", pathOffset); |
| 9473 unittest.expect(index >= 0, unittest.isTrue); | 10208 unittest.expect(index >= 0, unittest.isTrue); |
| 9474 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10209 subPart = |
| 10210 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9475 pathOffset = index; | 10211 pathOffset = index; |
| 9476 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10212 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9477 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 10213 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 10214 unittest.equals("/webproperties/")); |
| 9478 pathOffset += 15; | 10215 pathOffset += 15; |
| 9479 index = path.indexOf("/entityAdWordsLinks/", pathOffset); | 10216 index = path.indexOf("/entityAdWordsLinks/", pathOffset); |
| 9480 unittest.expect(index >= 0, unittest.isTrue); | 10217 unittest.expect(index >= 0, unittest.isTrue); |
| 9481 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10218 subPart = |
| 10219 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9482 pathOffset = index; | 10220 pathOffset = index; |
| 9483 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 10221 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9484 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/entityAdWordsLinks/")); | 10222 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10223 unittest.equals("/entityAdWordsLinks/")); |
| 9485 pathOffset += 20; | 10224 pathOffset += 20; |
| 9486 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 10225 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 9487 pathOffset = path.length; | 10226 pathOffset = path.length; |
| 9488 unittest.expect(subPart, unittest.equals("$arg_webPropertyAdWordsLinkId"
)); | 10227 unittest.expect( |
| 10228 subPart, unittest.equals("$arg_webPropertyAdWordsLinkId")); |
| 9489 | 10229 |
| 9490 var query = (req.url).query; | 10230 var query = (req.url).query; |
| 9491 var queryOffset = 0; | 10231 var queryOffset = 0; |
| 9492 var queryMap = {}; | 10232 var queryMap = {}; |
| 9493 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10233 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9494 parseBool(n) { | 10234 parseBool(n) { |
| 9495 if (n == "true") return true; | 10235 if (n == "true") return true; |
| 9496 if (n == "false") return false; | 10236 if (n == "false") return false; |
| 9497 if (n == null) return null; | 10237 if (n == null) return null; |
| 9498 throw new core.ArgumentError("Invalid boolean: $n"); | 10238 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9499 } | 10239 } |
| 10240 |
| 9500 if (query.length > 0) { | 10241 if (query.length > 0) { |
| 9501 for (var part in query.split("&")) { | 10242 for (var part in query.split("&")) { |
| 9502 var keyvalue = part.split("="); | 10243 var keyvalue = part.split("="); |
| 9503 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10244 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10245 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9504 } | 10246 } |
| 9505 } | 10247 } |
| 9506 | 10248 |
| 9507 | |
| 9508 var h = { | 10249 var h = { |
| 9509 "content-type" : "application/json; charset=utf-8", | 10250 "content-type": "application/json; charset=utf-8", |
| 9510 }; | 10251 }; |
| 9511 var resp = convert.JSON.encode(buildEntityAdWordsLink()); | 10252 var resp = convert.JSON.encode(buildEntityAdWordsLink()); |
| 9512 return new async.Future.value(stringResponse(200, h, resp)); | 10253 return new async.Future.value(stringResponse(200, h, resp)); |
| 9513 }), true); | 10254 }), true); |
| 9514 res.get(arg_accountId, arg_webPropertyId, arg_webPropertyAdWordsLinkId).th
en(unittest.expectAsync1(((api.EntityAdWordsLink response) { | 10255 res |
| 10256 .get(arg_accountId, arg_webPropertyId, arg_webPropertyAdWordsLinkId) |
| 10257 .then(unittest.expectAsync1(((api.EntityAdWordsLink response) { |
| 9515 checkEntityAdWordsLink(response); | 10258 checkEntityAdWordsLink(response); |
| 9516 }))); | 10259 }))); |
| 9517 }); | 10260 }); |
| 9518 | 10261 |
| 9519 unittest.test("method--insert", () { | 10262 unittest.test("method--insert", () { |
| 9520 | |
| 9521 var mock = new HttpServerMock(); | 10263 var mock = new HttpServerMock(); |
| 9522 api.ManagementWebPropertyAdWordsLinksResourceApi res = new api.AnalyticsAp
i(mock).management.webPropertyAdWordsLinks; | 10264 api.ManagementWebPropertyAdWordsLinksResourceApi res = |
| 10265 new api.AnalyticsApi(mock).management.webPropertyAdWordsLinks; |
| 9523 var arg_request = buildEntityAdWordsLink(); | 10266 var arg_request = buildEntityAdWordsLink(); |
| 9524 var arg_accountId = "foo"; | 10267 var arg_accountId = "foo"; |
| 9525 var arg_webPropertyId = "foo"; | 10268 var arg_webPropertyId = "foo"; |
| 9526 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10269 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9527 var obj = new api.EntityAdWordsLink.fromJson(json); | 10270 var obj = new api.EntityAdWordsLink.fromJson(json); |
| 9528 checkEntityAdWordsLink(obj); | 10271 checkEntityAdWordsLink(obj); |
| 9529 | 10272 |
| 9530 var path = (req.url).path; | 10273 var path = (req.url).path; |
| 9531 var pathOffset = 0; | 10274 var pathOffset = 0; |
| 9532 var index; | 10275 var index; |
| 9533 var subPart; | 10276 var subPart; |
| 9534 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10277 unittest.expect( |
| 10278 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9535 pathOffset += 1; | 10279 pathOffset += 1; |
| 9536 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10280 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10281 unittest.equals("analytics/v3/")); |
| 9537 pathOffset += 13; | 10282 pathOffset += 13; |
| 9538 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10283 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10284 unittest.equals("management/accounts/")); |
| 9539 pathOffset += 20; | 10285 pathOffset += 20; |
| 9540 index = path.indexOf("/webproperties/", pathOffset); | 10286 index = path.indexOf("/webproperties/", pathOffset); |
| 9541 unittest.expect(index >= 0, unittest.isTrue); | 10287 unittest.expect(index >= 0, unittest.isTrue); |
| 9542 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10288 subPart = |
| 10289 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9543 pathOffset = index; | 10290 pathOffset = index; |
| 9544 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10291 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9545 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 10292 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 10293 unittest.equals("/webproperties/")); |
| 9546 pathOffset += 15; | 10294 pathOffset += 15; |
| 9547 index = path.indexOf("/entityAdWordsLinks", pathOffset); | 10295 index = path.indexOf("/entityAdWordsLinks", pathOffset); |
| 9548 unittest.expect(index >= 0, unittest.isTrue); | 10296 unittest.expect(index >= 0, unittest.isTrue); |
| 9549 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10297 subPart = |
| 10298 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9550 pathOffset = index; | 10299 pathOffset = index; |
| 9551 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 10300 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9552 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/entityAdWordsLinks")); | 10301 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 10302 unittest.equals("/entityAdWordsLinks")); |
| 9553 pathOffset += 19; | 10303 pathOffset += 19; |
| 9554 | 10304 |
| 9555 var query = (req.url).query; | 10305 var query = (req.url).query; |
| 9556 var queryOffset = 0; | 10306 var queryOffset = 0; |
| 9557 var queryMap = {}; | 10307 var queryMap = {}; |
| 9558 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10308 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9559 parseBool(n) { | 10309 parseBool(n) { |
| 9560 if (n == "true") return true; | 10310 if (n == "true") return true; |
| 9561 if (n == "false") return false; | 10311 if (n == "false") return false; |
| 9562 if (n == null) return null; | 10312 if (n == null) return null; |
| 9563 throw new core.ArgumentError("Invalid boolean: $n"); | 10313 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9564 } | 10314 } |
| 10315 |
| 9565 if (query.length > 0) { | 10316 if (query.length > 0) { |
| 9566 for (var part in query.split("&")) { | 10317 for (var part in query.split("&")) { |
| 9567 var keyvalue = part.split("="); | 10318 var keyvalue = part.split("="); |
| 9568 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10319 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10320 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9569 } | 10321 } |
| 9570 } | 10322 } |
| 9571 | 10323 |
| 9572 | |
| 9573 var h = { | 10324 var h = { |
| 9574 "content-type" : "application/json; charset=utf-8", | 10325 "content-type": "application/json; charset=utf-8", |
| 9575 }; | 10326 }; |
| 9576 var resp = convert.JSON.encode(buildEntityAdWordsLink()); | 10327 var resp = convert.JSON.encode(buildEntityAdWordsLink()); |
| 9577 return new async.Future.value(stringResponse(200, h, resp)); | 10328 return new async.Future.value(stringResponse(200, h, resp)); |
| 9578 }), true); | 10329 }), true); |
| 9579 res.insert(arg_request, arg_accountId, arg_webPropertyId).then(unittest.ex
pectAsync1(((api.EntityAdWordsLink response) { | 10330 res |
| 10331 .insert(arg_request, arg_accountId, arg_webPropertyId) |
| 10332 .then(unittest.expectAsync1(((api.EntityAdWordsLink response) { |
| 9580 checkEntityAdWordsLink(response); | 10333 checkEntityAdWordsLink(response); |
| 9581 }))); | 10334 }))); |
| 9582 }); | 10335 }); |
| 9583 | 10336 |
| 9584 unittest.test("method--list", () { | 10337 unittest.test("method--list", () { |
| 9585 | |
| 9586 var mock = new HttpServerMock(); | 10338 var mock = new HttpServerMock(); |
| 9587 api.ManagementWebPropertyAdWordsLinksResourceApi res = new api.AnalyticsAp
i(mock).management.webPropertyAdWordsLinks; | 10339 api.ManagementWebPropertyAdWordsLinksResourceApi res = |
| 10340 new api.AnalyticsApi(mock).management.webPropertyAdWordsLinks; |
| 9588 var arg_accountId = "foo"; | 10341 var arg_accountId = "foo"; |
| 9589 var arg_webPropertyId = "foo"; | 10342 var arg_webPropertyId = "foo"; |
| 9590 var arg_max_results = 42; | 10343 var arg_max_results = 42; |
| 9591 var arg_start_index = 42; | 10344 var arg_start_index = 42; |
| 9592 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10345 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9593 var path = (req.url).path; | 10346 var path = (req.url).path; |
| 9594 var pathOffset = 0; | 10347 var pathOffset = 0; |
| 9595 var index; | 10348 var index; |
| 9596 var subPart; | 10349 var subPart; |
| 9597 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10350 unittest.expect( |
| 10351 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9598 pathOffset += 1; | 10352 pathOffset += 1; |
| 9599 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10353 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10354 unittest.equals("analytics/v3/")); |
| 9600 pathOffset += 13; | 10355 pathOffset += 13; |
| 9601 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10356 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10357 unittest.equals("management/accounts/")); |
| 9602 pathOffset += 20; | 10358 pathOffset += 20; |
| 9603 index = path.indexOf("/webproperties/", pathOffset); | 10359 index = path.indexOf("/webproperties/", pathOffset); |
| 9604 unittest.expect(index >= 0, unittest.isTrue); | 10360 unittest.expect(index >= 0, unittest.isTrue); |
| 9605 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10361 subPart = |
| 10362 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9606 pathOffset = index; | 10363 pathOffset = index; |
| 9607 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10364 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9608 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 10365 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 10366 unittest.equals("/webproperties/")); |
| 9609 pathOffset += 15; | 10367 pathOffset += 15; |
| 9610 index = path.indexOf("/entityAdWordsLinks", pathOffset); | 10368 index = path.indexOf("/entityAdWordsLinks", pathOffset); |
| 9611 unittest.expect(index >= 0, unittest.isTrue); | 10369 unittest.expect(index >= 0, unittest.isTrue); |
| 9612 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10370 subPart = |
| 10371 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9613 pathOffset = index; | 10372 pathOffset = index; |
| 9614 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 10373 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9615 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/entityAdWordsLinks")); | 10374 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 10375 unittest.equals("/entityAdWordsLinks")); |
| 9616 pathOffset += 19; | 10376 pathOffset += 19; |
| 9617 | 10377 |
| 9618 var query = (req.url).query; | 10378 var query = (req.url).query; |
| 9619 var queryOffset = 0; | 10379 var queryOffset = 0; |
| 9620 var queryMap = {}; | 10380 var queryMap = {}; |
| 9621 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10381 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9622 parseBool(n) { | 10382 parseBool(n) { |
| 9623 if (n == "true") return true; | 10383 if (n == "true") return true; |
| 9624 if (n == "false") return false; | 10384 if (n == "false") return false; |
| 9625 if (n == null) return null; | 10385 if (n == null) return null; |
| 9626 throw new core.ArgumentError("Invalid boolean: $n"); | 10386 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9627 } | 10387 } |
| 10388 |
| 9628 if (query.length > 0) { | 10389 if (query.length > 0) { |
| 9629 for (var part in query.split("&")) { | 10390 for (var part in query.split("&")) { |
| 9630 var keyvalue = part.split("="); | 10391 var keyvalue = part.split("="); |
| 9631 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10392 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10393 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9632 } | 10394 } |
| 9633 } | 10395 } |
| 9634 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 10396 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 9635 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 10397 unittest.equals(arg_max_results)); |
| 9636 | 10398 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 10399 unittest.equals(arg_start_index)); |
| 9637 | 10400 |
| 9638 var h = { | 10401 var h = { |
| 9639 "content-type" : "application/json; charset=utf-8", | 10402 "content-type": "application/json; charset=utf-8", |
| 9640 }; | 10403 }; |
| 9641 var resp = convert.JSON.encode(buildEntityAdWordsLinks()); | 10404 var resp = convert.JSON.encode(buildEntityAdWordsLinks()); |
| 9642 return new async.Future.value(stringResponse(200, h, resp)); | 10405 return new async.Future.value(stringResponse(200, h, resp)); |
| 9643 }), true); | 10406 }), true); |
| 9644 res.list(arg_accountId, arg_webPropertyId, max_results: arg_max_results, s
tart_index: arg_start_index).then(unittest.expectAsync1(((api.EntityAdWordsLinks
response) { | 10407 res |
| 10408 .list(arg_accountId, arg_webPropertyId, |
| 10409 max_results: arg_max_results, start_index: arg_start_index) |
| 10410 .then(unittest.expectAsync1(((api.EntityAdWordsLinks response) { |
| 9645 checkEntityAdWordsLinks(response); | 10411 checkEntityAdWordsLinks(response); |
| 9646 }))); | 10412 }))); |
| 9647 }); | 10413 }); |
| 9648 | 10414 |
| 9649 unittest.test("method--patch", () { | 10415 unittest.test("method--patch", () { |
| 9650 | |
| 9651 var mock = new HttpServerMock(); | 10416 var mock = new HttpServerMock(); |
| 9652 api.ManagementWebPropertyAdWordsLinksResourceApi res = new api.AnalyticsAp
i(mock).management.webPropertyAdWordsLinks; | 10417 api.ManagementWebPropertyAdWordsLinksResourceApi res = |
| 10418 new api.AnalyticsApi(mock).management.webPropertyAdWordsLinks; |
| 9653 var arg_request = buildEntityAdWordsLink(); | 10419 var arg_request = buildEntityAdWordsLink(); |
| 9654 var arg_accountId = "foo"; | 10420 var arg_accountId = "foo"; |
| 9655 var arg_webPropertyId = "foo"; | 10421 var arg_webPropertyId = "foo"; |
| 9656 var arg_webPropertyAdWordsLinkId = "foo"; | 10422 var arg_webPropertyAdWordsLinkId = "foo"; |
| 9657 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10423 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9658 var obj = new api.EntityAdWordsLink.fromJson(json); | 10424 var obj = new api.EntityAdWordsLink.fromJson(json); |
| 9659 checkEntityAdWordsLink(obj); | 10425 checkEntityAdWordsLink(obj); |
| 9660 | 10426 |
| 9661 var path = (req.url).path; | 10427 var path = (req.url).path; |
| 9662 var pathOffset = 0; | 10428 var pathOffset = 0; |
| 9663 var index; | 10429 var index; |
| 9664 var subPart; | 10430 var subPart; |
| 9665 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10431 unittest.expect( |
| 10432 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9666 pathOffset += 1; | 10433 pathOffset += 1; |
| 9667 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10434 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10435 unittest.equals("analytics/v3/")); |
| 9668 pathOffset += 13; | 10436 pathOffset += 13; |
| 9669 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10437 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10438 unittest.equals("management/accounts/")); |
| 9670 pathOffset += 20; | 10439 pathOffset += 20; |
| 9671 index = path.indexOf("/webproperties/", pathOffset); | 10440 index = path.indexOf("/webproperties/", pathOffset); |
| 9672 unittest.expect(index >= 0, unittest.isTrue); | 10441 unittest.expect(index >= 0, unittest.isTrue); |
| 9673 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10442 subPart = |
| 10443 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9674 pathOffset = index; | 10444 pathOffset = index; |
| 9675 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10445 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9676 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 10446 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 10447 unittest.equals("/webproperties/")); |
| 9677 pathOffset += 15; | 10448 pathOffset += 15; |
| 9678 index = path.indexOf("/entityAdWordsLinks/", pathOffset); | 10449 index = path.indexOf("/entityAdWordsLinks/", pathOffset); |
| 9679 unittest.expect(index >= 0, unittest.isTrue); | 10450 unittest.expect(index >= 0, unittest.isTrue); |
| 9680 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10451 subPart = |
| 10452 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9681 pathOffset = index; | 10453 pathOffset = index; |
| 9682 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 10454 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9683 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/entityAdWordsLinks/")); | 10455 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10456 unittest.equals("/entityAdWordsLinks/")); |
| 9684 pathOffset += 20; | 10457 pathOffset += 20; |
| 9685 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 10458 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 9686 pathOffset = path.length; | 10459 pathOffset = path.length; |
| 9687 unittest.expect(subPart, unittest.equals("$arg_webPropertyAdWordsLinkId"
)); | 10460 unittest.expect( |
| 10461 subPart, unittest.equals("$arg_webPropertyAdWordsLinkId")); |
| 9688 | 10462 |
| 9689 var query = (req.url).query; | 10463 var query = (req.url).query; |
| 9690 var queryOffset = 0; | 10464 var queryOffset = 0; |
| 9691 var queryMap = {}; | 10465 var queryMap = {}; |
| 9692 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10466 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9693 parseBool(n) { | 10467 parseBool(n) { |
| 9694 if (n == "true") return true; | 10468 if (n == "true") return true; |
| 9695 if (n == "false") return false; | 10469 if (n == "false") return false; |
| 9696 if (n == null) return null; | 10470 if (n == null) return null; |
| 9697 throw new core.ArgumentError("Invalid boolean: $n"); | 10471 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9698 } | 10472 } |
| 10473 |
| 9699 if (query.length > 0) { | 10474 if (query.length > 0) { |
| 9700 for (var part in query.split("&")) { | 10475 for (var part in query.split("&")) { |
| 9701 var keyvalue = part.split("="); | 10476 var keyvalue = part.split("="); |
| 9702 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10477 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10478 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9703 } | 10479 } |
| 9704 } | 10480 } |
| 9705 | 10481 |
| 9706 | |
| 9707 var h = { | 10482 var h = { |
| 9708 "content-type" : "application/json; charset=utf-8", | 10483 "content-type": "application/json; charset=utf-8", |
| 9709 }; | 10484 }; |
| 9710 var resp = convert.JSON.encode(buildEntityAdWordsLink()); | 10485 var resp = convert.JSON.encode(buildEntityAdWordsLink()); |
| 9711 return new async.Future.value(stringResponse(200, h, resp)); | 10486 return new async.Future.value(stringResponse(200, h, resp)); |
| 9712 }), true); | 10487 }), true); |
| 9713 res.patch(arg_request, arg_accountId, arg_webPropertyId, arg_webPropertyAd
WordsLinkId).then(unittest.expectAsync1(((api.EntityAdWordsLink response) { | 10488 res |
| 10489 .patch(arg_request, arg_accountId, arg_webPropertyId, |
| 10490 arg_webPropertyAdWordsLinkId) |
| 10491 .then(unittest.expectAsync1(((api.EntityAdWordsLink response) { |
| 9714 checkEntityAdWordsLink(response); | 10492 checkEntityAdWordsLink(response); |
| 9715 }))); | 10493 }))); |
| 9716 }); | 10494 }); |
| 9717 | 10495 |
| 9718 unittest.test("method--update", () { | 10496 unittest.test("method--update", () { |
| 9719 | |
| 9720 var mock = new HttpServerMock(); | 10497 var mock = new HttpServerMock(); |
| 9721 api.ManagementWebPropertyAdWordsLinksResourceApi res = new api.AnalyticsAp
i(mock).management.webPropertyAdWordsLinks; | 10498 api.ManagementWebPropertyAdWordsLinksResourceApi res = |
| 10499 new api.AnalyticsApi(mock).management.webPropertyAdWordsLinks; |
| 9722 var arg_request = buildEntityAdWordsLink(); | 10500 var arg_request = buildEntityAdWordsLink(); |
| 9723 var arg_accountId = "foo"; | 10501 var arg_accountId = "foo"; |
| 9724 var arg_webPropertyId = "foo"; | 10502 var arg_webPropertyId = "foo"; |
| 9725 var arg_webPropertyAdWordsLinkId = "foo"; | 10503 var arg_webPropertyAdWordsLinkId = "foo"; |
| 9726 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10504 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9727 var obj = new api.EntityAdWordsLink.fromJson(json); | 10505 var obj = new api.EntityAdWordsLink.fromJson(json); |
| 9728 checkEntityAdWordsLink(obj); | 10506 checkEntityAdWordsLink(obj); |
| 9729 | 10507 |
| 9730 var path = (req.url).path; | 10508 var path = (req.url).path; |
| 9731 var pathOffset = 0; | 10509 var pathOffset = 0; |
| 9732 var index; | 10510 var index; |
| 9733 var subPart; | 10511 var subPart; |
| 9734 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10512 unittest.expect( |
| 10513 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9735 pathOffset += 1; | 10514 pathOffset += 1; |
| 9736 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10515 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10516 unittest.equals("analytics/v3/")); |
| 9737 pathOffset += 13; | 10517 pathOffset += 13; |
| 9738 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10518 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10519 unittest.equals("management/accounts/")); |
| 9739 pathOffset += 20; | 10520 pathOffset += 20; |
| 9740 index = path.indexOf("/webproperties/", pathOffset); | 10521 index = path.indexOf("/webproperties/", pathOffset); |
| 9741 unittest.expect(index >= 0, unittest.isTrue); | 10522 unittest.expect(index >= 0, unittest.isTrue); |
| 9742 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10523 subPart = |
| 10524 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9743 pathOffset = index; | 10525 pathOffset = index; |
| 9744 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10526 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9745 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 10527 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 10528 unittest.equals("/webproperties/")); |
| 9746 pathOffset += 15; | 10529 pathOffset += 15; |
| 9747 index = path.indexOf("/entityAdWordsLinks/", pathOffset); | 10530 index = path.indexOf("/entityAdWordsLinks/", pathOffset); |
| 9748 unittest.expect(index >= 0, unittest.isTrue); | 10531 unittest.expect(index >= 0, unittest.isTrue); |
| 9749 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10532 subPart = |
| 10533 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9750 pathOffset = index; | 10534 pathOffset = index; |
| 9751 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 10535 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9752 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/entityAdWordsLinks/")); | 10536 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10537 unittest.equals("/entityAdWordsLinks/")); |
| 9753 pathOffset += 20; | 10538 pathOffset += 20; |
| 9754 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 10539 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 9755 pathOffset = path.length; | 10540 pathOffset = path.length; |
| 9756 unittest.expect(subPart, unittest.equals("$arg_webPropertyAdWordsLinkId"
)); | 10541 unittest.expect( |
| 10542 subPart, unittest.equals("$arg_webPropertyAdWordsLinkId")); |
| 9757 | 10543 |
| 9758 var query = (req.url).query; | 10544 var query = (req.url).query; |
| 9759 var queryOffset = 0; | 10545 var queryOffset = 0; |
| 9760 var queryMap = {}; | 10546 var queryMap = {}; |
| 9761 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10547 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9762 parseBool(n) { | 10548 parseBool(n) { |
| 9763 if (n == "true") return true; | 10549 if (n == "true") return true; |
| 9764 if (n == "false") return false; | 10550 if (n == "false") return false; |
| 9765 if (n == null) return null; | 10551 if (n == null) return null; |
| 9766 throw new core.ArgumentError("Invalid boolean: $n"); | 10552 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9767 } | 10553 } |
| 10554 |
| 9768 if (query.length > 0) { | 10555 if (query.length > 0) { |
| 9769 for (var part in query.split("&")) { | 10556 for (var part in query.split("&")) { |
| 9770 var keyvalue = part.split("="); | 10557 var keyvalue = part.split("="); |
| 9771 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10558 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10559 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9772 } | 10560 } |
| 9773 } | 10561 } |
| 9774 | 10562 |
| 9775 | |
| 9776 var h = { | 10563 var h = { |
| 9777 "content-type" : "application/json; charset=utf-8", | 10564 "content-type": "application/json; charset=utf-8", |
| 9778 }; | 10565 }; |
| 9779 var resp = convert.JSON.encode(buildEntityAdWordsLink()); | 10566 var resp = convert.JSON.encode(buildEntityAdWordsLink()); |
| 9780 return new async.Future.value(stringResponse(200, h, resp)); | 10567 return new async.Future.value(stringResponse(200, h, resp)); |
| 9781 }), true); | 10568 }), true); |
| 9782 res.update(arg_request, arg_accountId, arg_webPropertyId, arg_webPropertyA
dWordsLinkId).then(unittest.expectAsync1(((api.EntityAdWordsLink response) { | 10569 res |
| 10570 .update(arg_request, arg_accountId, arg_webPropertyId, |
| 10571 arg_webPropertyAdWordsLinkId) |
| 10572 .then(unittest.expectAsync1(((api.EntityAdWordsLink response) { |
| 9783 checkEntityAdWordsLink(response); | 10573 checkEntityAdWordsLink(response); |
| 9784 }))); | 10574 }))); |
| 9785 }); | 10575 }); |
| 9786 | |
| 9787 }); | 10576 }); |
| 9788 | 10577 |
| 9789 | |
| 9790 unittest.group("resource-ManagementWebpropertiesResourceApi", () { | 10578 unittest.group("resource-ManagementWebpropertiesResourceApi", () { |
| 9791 unittest.test("method--get", () { | 10579 unittest.test("method--get", () { |
| 9792 | |
| 9793 var mock = new HttpServerMock(); | 10580 var mock = new HttpServerMock(); |
| 9794 api.ManagementWebpropertiesResourceApi res = new api.AnalyticsApi(mock).ma
nagement.webproperties; | 10581 api.ManagementWebpropertiesResourceApi res = |
| 10582 new api.AnalyticsApi(mock).management.webproperties; |
| 9795 var arg_accountId = "foo"; | 10583 var arg_accountId = "foo"; |
| 9796 var arg_webPropertyId = "foo"; | 10584 var arg_webPropertyId = "foo"; |
| 9797 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10585 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9798 var path = (req.url).path; | 10586 var path = (req.url).path; |
| 9799 var pathOffset = 0; | 10587 var pathOffset = 0; |
| 9800 var index; | 10588 var index; |
| 9801 var subPart; | 10589 var subPart; |
| 9802 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10590 unittest.expect( |
| 10591 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9803 pathOffset += 1; | 10592 pathOffset += 1; |
| 9804 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10593 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10594 unittest.equals("analytics/v3/")); |
| 9805 pathOffset += 13; | 10595 pathOffset += 13; |
| 9806 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10596 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10597 unittest.equals("management/accounts/")); |
| 9807 pathOffset += 20; | 10598 pathOffset += 20; |
| 9808 index = path.indexOf("/webproperties/", pathOffset); | 10599 index = path.indexOf("/webproperties/", pathOffset); |
| 9809 unittest.expect(index >= 0, unittest.isTrue); | 10600 unittest.expect(index >= 0, unittest.isTrue); |
| 9810 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10601 subPart = |
| 10602 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9811 pathOffset = index; | 10603 pathOffset = index; |
| 9812 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10604 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9813 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 10605 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 10606 unittest.equals("/webproperties/")); |
| 9814 pathOffset += 15; | 10607 pathOffset += 15; |
| 9815 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 10608 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 9816 pathOffset = path.length; | 10609 pathOffset = path.length; |
| 9817 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 10610 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9818 | 10611 |
| 9819 var query = (req.url).query; | 10612 var query = (req.url).query; |
| 9820 var queryOffset = 0; | 10613 var queryOffset = 0; |
| 9821 var queryMap = {}; | 10614 var queryMap = {}; |
| 9822 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10615 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9823 parseBool(n) { | 10616 parseBool(n) { |
| 9824 if (n == "true") return true; | 10617 if (n == "true") return true; |
| 9825 if (n == "false") return false; | 10618 if (n == "false") return false; |
| 9826 if (n == null) return null; | 10619 if (n == null) return null; |
| 9827 throw new core.ArgumentError("Invalid boolean: $n"); | 10620 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9828 } | 10621 } |
| 10622 |
| 9829 if (query.length > 0) { | 10623 if (query.length > 0) { |
| 9830 for (var part in query.split("&")) { | 10624 for (var part in query.split("&")) { |
| 9831 var keyvalue = part.split("="); | 10625 var keyvalue = part.split("="); |
| 9832 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10626 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10627 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9833 } | 10628 } |
| 9834 } | 10629 } |
| 9835 | 10630 |
| 9836 | |
| 9837 var h = { | 10631 var h = { |
| 9838 "content-type" : "application/json; charset=utf-8", | 10632 "content-type": "application/json; charset=utf-8", |
| 9839 }; | 10633 }; |
| 9840 var resp = convert.JSON.encode(buildWebproperty()); | 10634 var resp = convert.JSON.encode(buildWebproperty()); |
| 9841 return new async.Future.value(stringResponse(200, h, resp)); | 10635 return new async.Future.value(stringResponse(200, h, resp)); |
| 9842 }), true); | 10636 }), true); |
| 9843 res.get(arg_accountId, arg_webPropertyId).then(unittest.expectAsync1(((api
.Webproperty response) { | 10637 res |
| 10638 .get(arg_accountId, arg_webPropertyId) |
| 10639 .then(unittest.expectAsync1(((api.Webproperty response) { |
| 9844 checkWebproperty(response); | 10640 checkWebproperty(response); |
| 9845 }))); | 10641 }))); |
| 9846 }); | 10642 }); |
| 9847 | 10643 |
| 9848 unittest.test("method--insert", () { | 10644 unittest.test("method--insert", () { |
| 9849 | |
| 9850 var mock = new HttpServerMock(); | 10645 var mock = new HttpServerMock(); |
| 9851 api.ManagementWebpropertiesResourceApi res = new api.AnalyticsApi(mock).ma
nagement.webproperties; | 10646 api.ManagementWebpropertiesResourceApi res = |
| 10647 new api.AnalyticsApi(mock).management.webproperties; |
| 9852 var arg_request = buildWebproperty(); | 10648 var arg_request = buildWebproperty(); |
| 9853 var arg_accountId = "foo"; | 10649 var arg_accountId = "foo"; |
| 9854 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10650 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9855 var obj = new api.Webproperty.fromJson(json); | 10651 var obj = new api.Webproperty.fromJson(json); |
| 9856 checkWebproperty(obj); | 10652 checkWebproperty(obj); |
| 9857 | 10653 |
| 9858 var path = (req.url).path; | 10654 var path = (req.url).path; |
| 9859 var pathOffset = 0; | 10655 var pathOffset = 0; |
| 9860 var index; | 10656 var index; |
| 9861 var subPart; | 10657 var subPart; |
| 9862 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10658 unittest.expect( |
| 10659 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9863 pathOffset += 1; | 10660 pathOffset += 1; |
| 9864 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10661 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10662 unittest.equals("analytics/v3/")); |
| 9865 pathOffset += 13; | 10663 pathOffset += 13; |
| 9866 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10664 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10665 unittest.equals("management/accounts/")); |
| 9867 pathOffset += 20; | 10666 pathOffset += 20; |
| 9868 index = path.indexOf("/webproperties", pathOffset); | 10667 index = path.indexOf("/webproperties", pathOffset); |
| 9869 unittest.expect(index >= 0, unittest.isTrue); | 10668 unittest.expect(index >= 0, unittest.isTrue); |
| 9870 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10669 subPart = |
| 10670 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9871 pathOffset = index; | 10671 pathOffset = index; |
| 9872 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10672 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9873 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/webproperties")); | 10673 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 10674 unittest.equals("/webproperties")); |
| 9874 pathOffset += 14; | 10675 pathOffset += 14; |
| 9875 | 10676 |
| 9876 var query = (req.url).query; | 10677 var query = (req.url).query; |
| 9877 var queryOffset = 0; | 10678 var queryOffset = 0; |
| 9878 var queryMap = {}; | 10679 var queryMap = {}; |
| 9879 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10680 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9880 parseBool(n) { | 10681 parseBool(n) { |
| 9881 if (n == "true") return true; | 10682 if (n == "true") return true; |
| 9882 if (n == "false") return false; | 10683 if (n == "false") return false; |
| 9883 if (n == null) return null; | 10684 if (n == null) return null; |
| 9884 throw new core.ArgumentError("Invalid boolean: $n"); | 10685 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9885 } | 10686 } |
| 10687 |
| 9886 if (query.length > 0) { | 10688 if (query.length > 0) { |
| 9887 for (var part in query.split("&")) { | 10689 for (var part in query.split("&")) { |
| 9888 var keyvalue = part.split("="); | 10690 var keyvalue = part.split("="); |
| 9889 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10691 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10692 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9890 } | 10693 } |
| 9891 } | 10694 } |
| 9892 | 10695 |
| 9893 | |
| 9894 var h = { | 10696 var h = { |
| 9895 "content-type" : "application/json; charset=utf-8", | 10697 "content-type": "application/json; charset=utf-8", |
| 9896 }; | 10698 }; |
| 9897 var resp = convert.JSON.encode(buildWebproperty()); | 10699 var resp = convert.JSON.encode(buildWebproperty()); |
| 9898 return new async.Future.value(stringResponse(200, h, resp)); | 10700 return new async.Future.value(stringResponse(200, h, resp)); |
| 9899 }), true); | 10701 }), true); |
| 9900 res.insert(arg_request, arg_accountId).then(unittest.expectAsync1(((api.We
bproperty response) { | 10702 res |
| 10703 .insert(arg_request, arg_accountId) |
| 10704 .then(unittest.expectAsync1(((api.Webproperty response) { |
| 9901 checkWebproperty(response); | 10705 checkWebproperty(response); |
| 9902 }))); | 10706 }))); |
| 9903 }); | 10707 }); |
| 9904 | 10708 |
| 9905 unittest.test("method--list", () { | 10709 unittest.test("method--list", () { |
| 9906 | |
| 9907 var mock = new HttpServerMock(); | 10710 var mock = new HttpServerMock(); |
| 9908 api.ManagementWebpropertiesResourceApi res = new api.AnalyticsApi(mock).ma
nagement.webproperties; | 10711 api.ManagementWebpropertiesResourceApi res = |
| 10712 new api.AnalyticsApi(mock).management.webproperties; |
| 9909 var arg_accountId = "foo"; | 10713 var arg_accountId = "foo"; |
| 9910 var arg_max_results = 42; | 10714 var arg_max_results = 42; |
| 9911 var arg_start_index = 42; | 10715 var arg_start_index = 42; |
| 9912 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10716 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9913 var path = (req.url).path; | 10717 var path = (req.url).path; |
| 9914 var pathOffset = 0; | 10718 var pathOffset = 0; |
| 9915 var index; | 10719 var index; |
| 9916 var subPart; | 10720 var subPart; |
| 9917 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10721 unittest.expect( |
| 10722 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9918 pathOffset += 1; | 10723 pathOffset += 1; |
| 9919 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10724 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10725 unittest.equals("analytics/v3/")); |
| 9920 pathOffset += 13; | 10726 pathOffset += 13; |
| 9921 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10727 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10728 unittest.equals("management/accounts/")); |
| 9922 pathOffset += 20; | 10729 pathOffset += 20; |
| 9923 index = path.indexOf("/webproperties", pathOffset); | 10730 index = path.indexOf("/webproperties", pathOffset); |
| 9924 unittest.expect(index >= 0, unittest.isTrue); | 10731 unittest.expect(index >= 0, unittest.isTrue); |
| 9925 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10732 subPart = |
| 10733 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9926 pathOffset = index; | 10734 pathOffset = index; |
| 9927 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10735 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9928 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/webproperties")); | 10736 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 10737 unittest.equals("/webproperties")); |
| 9929 pathOffset += 14; | 10738 pathOffset += 14; |
| 9930 | 10739 |
| 9931 var query = (req.url).query; | 10740 var query = (req.url).query; |
| 9932 var queryOffset = 0; | 10741 var queryOffset = 0; |
| 9933 var queryMap = {}; | 10742 var queryMap = {}; |
| 9934 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10743 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9935 parseBool(n) { | 10744 parseBool(n) { |
| 9936 if (n == "true") return true; | 10745 if (n == "true") return true; |
| 9937 if (n == "false") return false; | 10746 if (n == "false") return false; |
| 9938 if (n == null) return null; | 10747 if (n == null) return null; |
| 9939 throw new core.ArgumentError("Invalid boolean: $n"); | 10748 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9940 } | 10749 } |
| 10750 |
| 9941 if (query.length > 0) { | 10751 if (query.length > 0) { |
| 9942 for (var part in query.split("&")) { | 10752 for (var part in query.split("&")) { |
| 9943 var keyvalue = part.split("="); | 10753 var keyvalue = part.split("="); |
| 9944 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10754 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10755 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9945 } | 10756 } |
| 9946 } | 10757 } |
| 9947 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 10758 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 9948 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 10759 unittest.equals(arg_max_results)); |
| 9949 | 10760 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 10761 unittest.equals(arg_start_index)); |
| 9950 | 10762 |
| 9951 var h = { | 10763 var h = { |
| 9952 "content-type" : "application/json; charset=utf-8", | 10764 "content-type": "application/json; charset=utf-8", |
| 9953 }; | 10765 }; |
| 9954 var resp = convert.JSON.encode(buildWebproperties()); | 10766 var resp = convert.JSON.encode(buildWebproperties()); |
| 9955 return new async.Future.value(stringResponse(200, h, resp)); | 10767 return new async.Future.value(stringResponse(200, h, resp)); |
| 9956 }), true); | 10768 }), true); |
| 9957 res.list(arg_accountId, max_results: arg_max_results, start_index: arg_sta
rt_index).then(unittest.expectAsync1(((api.Webproperties response) { | 10769 res |
| 10770 .list(arg_accountId, |
| 10771 max_results: arg_max_results, start_index: arg_start_index) |
| 10772 .then(unittest.expectAsync1(((api.Webproperties response) { |
| 9958 checkWebproperties(response); | 10773 checkWebproperties(response); |
| 9959 }))); | 10774 }))); |
| 9960 }); | 10775 }); |
| 9961 | 10776 |
| 9962 unittest.test("method--patch", () { | 10777 unittest.test("method--patch", () { |
| 9963 | |
| 9964 var mock = new HttpServerMock(); | 10778 var mock = new HttpServerMock(); |
| 9965 api.ManagementWebpropertiesResourceApi res = new api.AnalyticsApi(mock).ma
nagement.webproperties; | 10779 api.ManagementWebpropertiesResourceApi res = |
| 10780 new api.AnalyticsApi(mock).management.webproperties; |
| 9966 var arg_request = buildWebproperty(); | 10781 var arg_request = buildWebproperty(); |
| 9967 var arg_accountId = "foo"; | 10782 var arg_accountId = "foo"; |
| 9968 var arg_webPropertyId = "foo"; | 10783 var arg_webPropertyId = "foo"; |
| 9969 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10784 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9970 var obj = new api.Webproperty.fromJson(json); | 10785 var obj = new api.Webproperty.fromJson(json); |
| 9971 checkWebproperty(obj); | 10786 checkWebproperty(obj); |
| 9972 | 10787 |
| 9973 var path = (req.url).path; | 10788 var path = (req.url).path; |
| 9974 var pathOffset = 0; | 10789 var pathOffset = 0; |
| 9975 var index; | 10790 var index; |
| 9976 var subPart; | 10791 var subPart; |
| 9977 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10792 unittest.expect( |
| 10793 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9978 pathOffset += 1; | 10794 pathOffset += 1; |
| 9979 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10795 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10796 unittest.equals("analytics/v3/")); |
| 9980 pathOffset += 13; | 10797 pathOffset += 13; |
| 9981 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10798 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10799 unittest.equals("management/accounts/")); |
| 9982 pathOffset += 20; | 10800 pathOffset += 20; |
| 9983 index = path.indexOf("/webproperties/", pathOffset); | 10801 index = path.indexOf("/webproperties/", pathOffset); |
| 9984 unittest.expect(index >= 0, unittest.isTrue); | 10802 unittest.expect(index >= 0, unittest.isTrue); |
| 9985 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10803 subPart = |
| 10804 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 9986 pathOffset = index; | 10805 pathOffset = index; |
| 9987 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10806 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 9988 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 10807 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 10808 unittest.equals("/webproperties/")); |
| 9989 pathOffset += 15; | 10809 pathOffset += 15; |
| 9990 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 10810 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 9991 pathOffset = path.length; | 10811 pathOffset = path.length; |
| 9992 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 10812 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 9993 | 10813 |
| 9994 var query = (req.url).query; | 10814 var query = (req.url).query; |
| 9995 var queryOffset = 0; | 10815 var queryOffset = 0; |
| 9996 var queryMap = {}; | 10816 var queryMap = {}; |
| 9997 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10817 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9998 parseBool(n) { | 10818 parseBool(n) { |
| 9999 if (n == "true") return true; | 10819 if (n == "true") return true; |
| 10000 if (n == "false") return false; | 10820 if (n == "false") return false; |
| 10001 if (n == null) return null; | 10821 if (n == null) return null; |
| 10002 throw new core.ArgumentError("Invalid boolean: $n"); | 10822 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10003 } | 10823 } |
| 10824 |
| 10004 if (query.length > 0) { | 10825 if (query.length > 0) { |
| 10005 for (var part in query.split("&")) { | 10826 for (var part in query.split("&")) { |
| 10006 var keyvalue = part.split("="); | 10827 var keyvalue = part.split("="); |
| 10007 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10828 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10829 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10008 } | 10830 } |
| 10009 } | 10831 } |
| 10010 | 10832 |
| 10011 | |
| 10012 var h = { | 10833 var h = { |
| 10013 "content-type" : "application/json; charset=utf-8", | 10834 "content-type": "application/json; charset=utf-8", |
| 10014 }; | 10835 }; |
| 10015 var resp = convert.JSON.encode(buildWebproperty()); | 10836 var resp = convert.JSON.encode(buildWebproperty()); |
| 10016 return new async.Future.value(stringResponse(200, h, resp)); | 10837 return new async.Future.value(stringResponse(200, h, resp)); |
| 10017 }), true); | 10838 }), true); |
| 10018 res.patch(arg_request, arg_accountId, arg_webPropertyId).then(unittest.exp
ectAsync1(((api.Webproperty response) { | 10839 res |
| 10840 .patch(arg_request, arg_accountId, arg_webPropertyId) |
| 10841 .then(unittest.expectAsync1(((api.Webproperty response) { |
| 10019 checkWebproperty(response); | 10842 checkWebproperty(response); |
| 10020 }))); | 10843 }))); |
| 10021 }); | 10844 }); |
| 10022 | 10845 |
| 10023 unittest.test("method--update", () { | 10846 unittest.test("method--update", () { |
| 10024 | |
| 10025 var mock = new HttpServerMock(); | 10847 var mock = new HttpServerMock(); |
| 10026 api.ManagementWebpropertiesResourceApi res = new api.AnalyticsApi(mock).ma
nagement.webproperties; | 10848 api.ManagementWebpropertiesResourceApi res = |
| 10849 new api.AnalyticsApi(mock).management.webproperties; |
| 10027 var arg_request = buildWebproperty(); | 10850 var arg_request = buildWebproperty(); |
| 10028 var arg_accountId = "foo"; | 10851 var arg_accountId = "foo"; |
| 10029 var arg_webPropertyId = "foo"; | 10852 var arg_webPropertyId = "foo"; |
| 10030 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10853 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10031 var obj = new api.Webproperty.fromJson(json); | 10854 var obj = new api.Webproperty.fromJson(json); |
| 10032 checkWebproperty(obj); | 10855 checkWebproperty(obj); |
| 10033 | 10856 |
| 10034 var path = (req.url).path; | 10857 var path = (req.url).path; |
| 10035 var pathOffset = 0; | 10858 var pathOffset = 0; |
| 10036 var index; | 10859 var index; |
| 10037 var subPart; | 10860 var subPart; |
| 10038 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10861 unittest.expect( |
| 10862 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10039 pathOffset += 1; | 10863 pathOffset += 1; |
| 10040 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10864 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10865 unittest.equals("analytics/v3/")); |
| 10041 pathOffset += 13; | 10866 pathOffset += 13; |
| 10042 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10867 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10868 unittest.equals("management/accounts/")); |
| 10043 pathOffset += 20; | 10869 pathOffset += 20; |
| 10044 index = path.indexOf("/webproperties/", pathOffset); | 10870 index = path.indexOf("/webproperties/", pathOffset); |
| 10045 unittest.expect(index >= 0, unittest.isTrue); | 10871 unittest.expect(index >= 0, unittest.isTrue); |
| 10046 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10872 subPart = |
| 10873 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 10047 pathOffset = index; | 10874 pathOffset = index; |
| 10048 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10875 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 10049 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 10876 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 10877 unittest.equals("/webproperties/")); |
| 10050 pathOffset += 15; | 10878 pathOffset += 15; |
| 10051 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 10879 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 10052 pathOffset = path.length; | 10880 pathOffset = path.length; |
| 10053 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 10881 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 10054 | 10882 |
| 10055 var query = (req.url).query; | 10883 var query = (req.url).query; |
| 10056 var queryOffset = 0; | 10884 var queryOffset = 0; |
| 10057 var queryMap = {}; | 10885 var queryMap = {}; |
| 10058 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10886 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10059 parseBool(n) { | 10887 parseBool(n) { |
| 10060 if (n == "true") return true; | 10888 if (n == "true") return true; |
| 10061 if (n == "false") return false; | 10889 if (n == "false") return false; |
| 10062 if (n == null) return null; | 10890 if (n == null) return null; |
| 10063 throw new core.ArgumentError("Invalid boolean: $n"); | 10891 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10064 } | 10892 } |
| 10893 |
| 10065 if (query.length > 0) { | 10894 if (query.length > 0) { |
| 10066 for (var part in query.split("&")) { | 10895 for (var part in query.split("&")) { |
| 10067 var keyvalue = part.split("="); | 10896 var keyvalue = part.split("="); |
| 10068 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10897 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10898 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10069 } | 10899 } |
| 10070 } | 10900 } |
| 10071 | 10901 |
| 10072 | |
| 10073 var h = { | 10902 var h = { |
| 10074 "content-type" : "application/json; charset=utf-8", | 10903 "content-type": "application/json; charset=utf-8", |
| 10075 }; | 10904 }; |
| 10076 var resp = convert.JSON.encode(buildWebproperty()); | 10905 var resp = convert.JSON.encode(buildWebproperty()); |
| 10077 return new async.Future.value(stringResponse(200, h, resp)); | 10906 return new async.Future.value(stringResponse(200, h, resp)); |
| 10078 }), true); | 10907 }), true); |
| 10079 res.update(arg_request, arg_accountId, arg_webPropertyId).then(unittest.ex
pectAsync1(((api.Webproperty response) { | 10908 res |
| 10909 .update(arg_request, arg_accountId, arg_webPropertyId) |
| 10910 .then(unittest.expectAsync1(((api.Webproperty response) { |
| 10080 checkWebproperty(response); | 10911 checkWebproperty(response); |
| 10081 }))); | 10912 }))); |
| 10082 }); | 10913 }); |
| 10083 | |
| 10084 }); | 10914 }); |
| 10085 | 10915 |
| 10086 | |
| 10087 unittest.group("resource-ManagementWebpropertyUserLinksResourceApi", () { | 10916 unittest.group("resource-ManagementWebpropertyUserLinksResourceApi", () { |
| 10088 unittest.test("method--delete", () { | 10917 unittest.test("method--delete", () { |
| 10089 | |
| 10090 var mock = new HttpServerMock(); | 10918 var mock = new HttpServerMock(); |
| 10091 api.ManagementWebpropertyUserLinksResourceApi res = new api.AnalyticsApi(m
ock).management.webpropertyUserLinks; | 10919 api.ManagementWebpropertyUserLinksResourceApi res = |
| 10920 new api.AnalyticsApi(mock).management.webpropertyUserLinks; |
| 10092 var arg_accountId = "foo"; | 10921 var arg_accountId = "foo"; |
| 10093 var arg_webPropertyId = "foo"; | 10922 var arg_webPropertyId = "foo"; |
| 10094 var arg_linkId = "foo"; | 10923 var arg_linkId = "foo"; |
| 10095 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10924 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10096 var path = (req.url).path; | 10925 var path = (req.url).path; |
| 10097 var pathOffset = 0; | 10926 var pathOffset = 0; |
| 10098 var index; | 10927 var index; |
| 10099 var subPart; | 10928 var subPart; |
| 10100 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10929 unittest.expect( |
| 10930 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10101 pathOffset += 1; | 10931 pathOffset += 1; |
| 10102 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 10932 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10933 unittest.equals("analytics/v3/")); |
| 10103 pathOffset += 13; | 10934 pathOffset += 13; |
| 10104 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 10935 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 10936 unittest.equals("management/accounts/")); |
| 10105 pathOffset += 20; | 10937 pathOffset += 20; |
| 10106 index = path.indexOf("/webproperties/", pathOffset); | 10938 index = path.indexOf("/webproperties/", pathOffset); |
| 10107 unittest.expect(index >= 0, unittest.isTrue); | 10939 unittest.expect(index >= 0, unittest.isTrue); |
| 10108 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10940 subPart = |
| 10941 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 10109 pathOffset = index; | 10942 pathOffset = index; |
| 10110 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 10943 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 10111 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 10944 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 10945 unittest.equals("/webproperties/")); |
| 10112 pathOffset += 15; | 10946 pathOffset += 15; |
| 10113 index = path.indexOf("/entityUserLinks/", pathOffset); | 10947 index = path.indexOf("/entityUserLinks/", pathOffset); |
| 10114 unittest.expect(index >= 0, unittest.isTrue); | 10948 unittest.expect(index >= 0, unittest.isTrue); |
| 10115 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 10949 subPart = |
| 10950 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 10116 pathOffset = index; | 10951 pathOffset = index; |
| 10117 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 10952 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 10118 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/entityUserLinks/")); | 10953 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 10954 unittest.equals("/entityUserLinks/")); |
| 10119 pathOffset += 17; | 10955 pathOffset += 17; |
| 10120 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 10956 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 10121 pathOffset = path.length; | 10957 pathOffset = path.length; |
| 10122 unittest.expect(subPart, unittest.equals("$arg_linkId")); | 10958 unittest.expect(subPart, unittest.equals("$arg_linkId")); |
| 10123 | 10959 |
| 10124 var query = (req.url).query; | 10960 var query = (req.url).query; |
| 10125 var queryOffset = 0; | 10961 var queryOffset = 0; |
| 10126 var queryMap = {}; | 10962 var queryMap = {}; |
| 10127 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10963 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10128 parseBool(n) { | 10964 parseBool(n) { |
| 10129 if (n == "true") return true; | 10965 if (n == "true") return true; |
| 10130 if (n == "false") return false; | 10966 if (n == "false") return false; |
| 10131 if (n == null) return null; | 10967 if (n == null) return null; |
| 10132 throw new core.ArgumentError("Invalid boolean: $n"); | 10968 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10133 } | 10969 } |
| 10970 |
| 10134 if (query.length > 0) { | 10971 if (query.length > 0) { |
| 10135 for (var part in query.split("&")) { | 10972 for (var part in query.split("&")) { |
| 10136 var keyvalue = part.split("="); | 10973 var keyvalue = part.split("="); |
| 10137 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10974 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10975 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10138 } | 10976 } |
| 10139 } | 10977 } |
| 10140 | 10978 |
| 10141 | |
| 10142 var h = { | 10979 var h = { |
| 10143 "content-type" : "application/json; charset=utf-8", | 10980 "content-type": "application/json; charset=utf-8", |
| 10144 }; | 10981 }; |
| 10145 var resp = ""; | 10982 var resp = ""; |
| 10146 return new async.Future.value(stringResponse(200, h, resp)); | 10983 return new async.Future.value(stringResponse(200, h, resp)); |
| 10147 }), true); | 10984 }), true); |
| 10148 res.delete(arg_accountId, arg_webPropertyId, arg_linkId).then(unittest.exp
ectAsync1((_) {})); | 10985 res |
| 10986 .delete(arg_accountId, arg_webPropertyId, arg_linkId) |
| 10987 .then(unittest.expectAsync1((_) {})); |
| 10149 }); | 10988 }); |
| 10150 | 10989 |
| 10151 unittest.test("method--insert", () { | 10990 unittest.test("method--insert", () { |
| 10152 | |
| 10153 var mock = new HttpServerMock(); | 10991 var mock = new HttpServerMock(); |
| 10154 api.ManagementWebpropertyUserLinksResourceApi res = new api.AnalyticsApi(m
ock).management.webpropertyUserLinks; | 10992 api.ManagementWebpropertyUserLinksResourceApi res = |
| 10993 new api.AnalyticsApi(mock).management.webpropertyUserLinks; |
| 10155 var arg_request = buildEntityUserLink(); | 10994 var arg_request = buildEntityUserLink(); |
| 10156 var arg_accountId = "foo"; | 10995 var arg_accountId = "foo"; |
| 10157 var arg_webPropertyId = "foo"; | 10996 var arg_webPropertyId = "foo"; |
| 10158 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10997 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10159 var obj = new api.EntityUserLink.fromJson(json); | 10998 var obj = new api.EntityUserLink.fromJson(json); |
| 10160 checkEntityUserLink(obj); | 10999 checkEntityUserLink(obj); |
| 10161 | 11000 |
| 10162 var path = (req.url).path; | 11001 var path = (req.url).path; |
| 10163 var pathOffset = 0; | 11002 var pathOffset = 0; |
| 10164 var index; | 11003 var index; |
| 10165 var subPart; | 11004 var subPart; |
| 10166 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11005 unittest.expect( |
| 11006 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10167 pathOffset += 1; | 11007 pathOffset += 1; |
| 10168 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 11008 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 11009 unittest.equals("analytics/v3/")); |
| 10169 pathOffset += 13; | 11010 pathOffset += 13; |
| 10170 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 11011 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 11012 unittest.equals("management/accounts/")); |
| 10171 pathOffset += 20; | 11013 pathOffset += 20; |
| 10172 index = path.indexOf("/webproperties/", pathOffset); | 11014 index = path.indexOf("/webproperties/", pathOffset); |
| 10173 unittest.expect(index >= 0, unittest.isTrue); | 11015 unittest.expect(index >= 0, unittest.isTrue); |
| 10174 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 11016 subPart = |
| 11017 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 10175 pathOffset = index; | 11018 pathOffset = index; |
| 10176 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 11019 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 10177 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 11020 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 11021 unittest.equals("/webproperties/")); |
| 10178 pathOffset += 15; | 11022 pathOffset += 15; |
| 10179 index = path.indexOf("/entityUserLinks", pathOffset); | 11023 index = path.indexOf("/entityUserLinks", pathOffset); |
| 10180 unittest.expect(index >= 0, unittest.isTrue); | 11024 unittest.expect(index >= 0, unittest.isTrue); |
| 10181 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 11025 subPart = |
| 11026 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 10182 pathOffset = index; | 11027 pathOffset = index; |
| 10183 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 11028 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 10184 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/entityUserLinks")); | 11029 unittest.expect(path.substring(pathOffset, pathOffset + 16), |
| 11030 unittest.equals("/entityUserLinks")); |
| 10185 pathOffset += 16; | 11031 pathOffset += 16; |
| 10186 | 11032 |
| 10187 var query = (req.url).query; | 11033 var query = (req.url).query; |
| 10188 var queryOffset = 0; | 11034 var queryOffset = 0; |
| 10189 var queryMap = {}; | 11035 var queryMap = {}; |
| 10190 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11036 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10191 parseBool(n) { | 11037 parseBool(n) { |
| 10192 if (n == "true") return true; | 11038 if (n == "true") return true; |
| 10193 if (n == "false") return false; | 11039 if (n == "false") return false; |
| 10194 if (n == null) return null; | 11040 if (n == null) return null; |
| 10195 throw new core.ArgumentError("Invalid boolean: $n"); | 11041 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10196 } | 11042 } |
| 11043 |
| 10197 if (query.length > 0) { | 11044 if (query.length > 0) { |
| 10198 for (var part in query.split("&")) { | 11045 for (var part in query.split("&")) { |
| 10199 var keyvalue = part.split("="); | 11046 var keyvalue = part.split("="); |
| 10200 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11047 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11048 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10201 } | 11049 } |
| 10202 } | 11050 } |
| 10203 | 11051 |
| 10204 | |
| 10205 var h = { | 11052 var h = { |
| 10206 "content-type" : "application/json; charset=utf-8", | 11053 "content-type": "application/json; charset=utf-8", |
| 10207 }; | 11054 }; |
| 10208 var resp = convert.JSON.encode(buildEntityUserLink()); | 11055 var resp = convert.JSON.encode(buildEntityUserLink()); |
| 10209 return new async.Future.value(stringResponse(200, h, resp)); | 11056 return new async.Future.value(stringResponse(200, h, resp)); |
| 10210 }), true); | 11057 }), true); |
| 10211 res.insert(arg_request, arg_accountId, arg_webPropertyId).then(unittest.ex
pectAsync1(((api.EntityUserLink response) { | 11058 res |
| 11059 .insert(arg_request, arg_accountId, arg_webPropertyId) |
| 11060 .then(unittest.expectAsync1(((api.EntityUserLink response) { |
| 10212 checkEntityUserLink(response); | 11061 checkEntityUserLink(response); |
| 10213 }))); | 11062 }))); |
| 10214 }); | 11063 }); |
| 10215 | 11064 |
| 10216 unittest.test("method--list", () { | 11065 unittest.test("method--list", () { |
| 10217 | |
| 10218 var mock = new HttpServerMock(); | 11066 var mock = new HttpServerMock(); |
| 10219 api.ManagementWebpropertyUserLinksResourceApi res = new api.AnalyticsApi(m
ock).management.webpropertyUserLinks; | 11067 api.ManagementWebpropertyUserLinksResourceApi res = |
| 11068 new api.AnalyticsApi(mock).management.webpropertyUserLinks; |
| 10220 var arg_accountId = "foo"; | 11069 var arg_accountId = "foo"; |
| 10221 var arg_webPropertyId = "foo"; | 11070 var arg_webPropertyId = "foo"; |
| 10222 var arg_max_results = 42; | 11071 var arg_max_results = 42; |
| 10223 var arg_start_index = 42; | 11072 var arg_start_index = 42; |
| 10224 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11073 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10225 var path = (req.url).path; | 11074 var path = (req.url).path; |
| 10226 var pathOffset = 0; | 11075 var pathOffset = 0; |
| 10227 var index; | 11076 var index; |
| 10228 var subPart; | 11077 var subPart; |
| 10229 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11078 unittest.expect( |
| 11079 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10230 pathOffset += 1; | 11080 pathOffset += 1; |
| 10231 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 11081 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 11082 unittest.equals("analytics/v3/")); |
| 10232 pathOffset += 13; | 11083 pathOffset += 13; |
| 10233 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 11084 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 11085 unittest.equals("management/accounts/")); |
| 10234 pathOffset += 20; | 11086 pathOffset += 20; |
| 10235 index = path.indexOf("/webproperties/", pathOffset); | 11087 index = path.indexOf("/webproperties/", pathOffset); |
| 10236 unittest.expect(index >= 0, unittest.isTrue); | 11088 unittest.expect(index >= 0, unittest.isTrue); |
| 10237 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 11089 subPart = |
| 11090 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 10238 pathOffset = index; | 11091 pathOffset = index; |
| 10239 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 11092 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 10240 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 11093 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 11094 unittest.equals("/webproperties/")); |
| 10241 pathOffset += 15; | 11095 pathOffset += 15; |
| 10242 index = path.indexOf("/entityUserLinks", pathOffset); | 11096 index = path.indexOf("/entityUserLinks", pathOffset); |
| 10243 unittest.expect(index >= 0, unittest.isTrue); | 11097 unittest.expect(index >= 0, unittest.isTrue); |
| 10244 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 11098 subPart = |
| 11099 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 10245 pathOffset = index; | 11100 pathOffset = index; |
| 10246 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 11101 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 10247 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/entityUserLinks")); | 11102 unittest.expect(path.substring(pathOffset, pathOffset + 16), |
| 11103 unittest.equals("/entityUserLinks")); |
| 10248 pathOffset += 16; | 11104 pathOffset += 16; |
| 10249 | 11105 |
| 10250 var query = (req.url).query; | 11106 var query = (req.url).query; |
| 10251 var queryOffset = 0; | 11107 var queryOffset = 0; |
| 10252 var queryMap = {}; | 11108 var queryMap = {}; |
| 10253 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11109 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10254 parseBool(n) { | 11110 parseBool(n) { |
| 10255 if (n == "true") return true; | 11111 if (n == "true") return true; |
| 10256 if (n == "false") return false; | 11112 if (n == "false") return false; |
| 10257 if (n == null) return null; | 11113 if (n == null) return null; |
| 10258 throw new core.ArgumentError("Invalid boolean: $n"); | 11114 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10259 } | 11115 } |
| 11116 |
| 10260 if (query.length > 0) { | 11117 if (query.length > 0) { |
| 10261 for (var part in query.split("&")) { | 11118 for (var part in query.split("&")) { |
| 10262 var keyvalue = part.split("="); | 11119 var keyvalue = part.split("="); |
| 10263 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11120 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11121 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10264 } | 11122 } |
| 10265 } | 11123 } |
| 10266 unittest.expect(core.int.parse(queryMap["max-results"].first), unittest.
equals(arg_max_results)); | 11124 unittest.expect(core.int.parse(queryMap["max-results"].first), |
| 10267 unittest.expect(core.int.parse(queryMap["start-index"].first), unittest.
equals(arg_start_index)); | 11125 unittest.equals(arg_max_results)); |
| 10268 | 11126 unittest.expect(core.int.parse(queryMap["start-index"].first), |
| 11127 unittest.equals(arg_start_index)); |
| 10269 | 11128 |
| 10270 var h = { | 11129 var h = { |
| 10271 "content-type" : "application/json; charset=utf-8", | 11130 "content-type": "application/json; charset=utf-8", |
| 10272 }; | 11131 }; |
| 10273 var resp = convert.JSON.encode(buildEntityUserLinks()); | 11132 var resp = convert.JSON.encode(buildEntityUserLinks()); |
| 10274 return new async.Future.value(stringResponse(200, h, resp)); | 11133 return new async.Future.value(stringResponse(200, h, resp)); |
| 10275 }), true); | 11134 }), true); |
| 10276 res.list(arg_accountId, arg_webPropertyId, max_results: arg_max_results, s
tart_index: arg_start_index).then(unittest.expectAsync1(((api.EntityUserLinks re
sponse) { | 11135 res |
| 11136 .list(arg_accountId, arg_webPropertyId, |
| 11137 max_results: arg_max_results, start_index: arg_start_index) |
| 11138 .then(unittest.expectAsync1(((api.EntityUserLinks response) { |
| 10277 checkEntityUserLinks(response); | 11139 checkEntityUserLinks(response); |
| 10278 }))); | 11140 }))); |
| 10279 }); | 11141 }); |
| 10280 | 11142 |
| 10281 unittest.test("method--update", () { | 11143 unittest.test("method--update", () { |
| 10282 | |
| 10283 var mock = new HttpServerMock(); | 11144 var mock = new HttpServerMock(); |
| 10284 api.ManagementWebpropertyUserLinksResourceApi res = new api.AnalyticsApi(m
ock).management.webpropertyUserLinks; | 11145 api.ManagementWebpropertyUserLinksResourceApi res = |
| 11146 new api.AnalyticsApi(mock).management.webpropertyUserLinks; |
| 10285 var arg_request = buildEntityUserLink(); | 11147 var arg_request = buildEntityUserLink(); |
| 10286 var arg_accountId = "foo"; | 11148 var arg_accountId = "foo"; |
| 10287 var arg_webPropertyId = "foo"; | 11149 var arg_webPropertyId = "foo"; |
| 10288 var arg_linkId = "foo"; | 11150 var arg_linkId = "foo"; |
| 10289 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11151 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10290 var obj = new api.EntityUserLink.fromJson(json); | 11152 var obj = new api.EntityUserLink.fromJson(json); |
| 10291 checkEntityUserLink(obj); | 11153 checkEntityUserLink(obj); |
| 10292 | 11154 |
| 10293 var path = (req.url).path; | 11155 var path = (req.url).path; |
| 10294 var pathOffset = 0; | 11156 var pathOffset = 0; |
| 10295 var index; | 11157 var index; |
| 10296 var subPart; | 11158 var subPart; |
| 10297 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11159 unittest.expect( |
| 11160 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10298 pathOffset += 1; | 11161 pathOffset += 1; |
| 10299 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 11162 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 11163 unittest.equals("analytics/v3/")); |
| 10300 pathOffset += 13; | 11164 pathOffset += 13; |
| 10301 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("management/accounts/")); | 11165 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 11166 unittest.equals("management/accounts/")); |
| 10302 pathOffset += 20; | 11167 pathOffset += 20; |
| 10303 index = path.indexOf("/webproperties/", pathOffset); | 11168 index = path.indexOf("/webproperties/", pathOffset); |
| 10304 unittest.expect(index >= 0, unittest.isTrue); | 11169 unittest.expect(index >= 0, unittest.isTrue); |
| 10305 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 11170 subPart = |
| 11171 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 10306 pathOffset = index; | 11172 pathOffset = index; |
| 10307 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 11173 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
| 10308 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/webproperties/")); | 11174 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 11175 unittest.equals("/webproperties/")); |
| 10309 pathOffset += 15; | 11176 pathOffset += 15; |
| 10310 index = path.indexOf("/entityUserLinks/", pathOffset); | 11177 index = path.indexOf("/entityUserLinks/", pathOffset); |
| 10311 unittest.expect(index >= 0, unittest.isTrue); | 11178 unittest.expect(index >= 0, unittest.isTrue); |
| 10312 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 11179 subPart = |
| 11180 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 10313 pathOffset = index; | 11181 pathOffset = index; |
| 10314 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); | 11182 unittest.expect(subPart, unittest.equals("$arg_webPropertyId")); |
| 10315 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/entityUserLinks/")); | 11183 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 11184 unittest.equals("/entityUserLinks/")); |
| 10316 pathOffset += 17; | 11185 pathOffset += 17; |
| 10317 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 11186 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 10318 pathOffset = path.length; | 11187 pathOffset = path.length; |
| 10319 unittest.expect(subPart, unittest.equals("$arg_linkId")); | 11188 unittest.expect(subPart, unittest.equals("$arg_linkId")); |
| 10320 | 11189 |
| 10321 var query = (req.url).query; | 11190 var query = (req.url).query; |
| 10322 var queryOffset = 0; | 11191 var queryOffset = 0; |
| 10323 var queryMap = {}; | 11192 var queryMap = {}; |
| 10324 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11193 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10325 parseBool(n) { | 11194 parseBool(n) { |
| 10326 if (n == "true") return true; | 11195 if (n == "true") return true; |
| 10327 if (n == "false") return false; | 11196 if (n == "false") return false; |
| 10328 if (n == null) return null; | 11197 if (n == null) return null; |
| 10329 throw new core.ArgumentError("Invalid boolean: $n"); | 11198 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10330 } | 11199 } |
| 11200 |
| 10331 if (query.length > 0) { | 11201 if (query.length > 0) { |
| 10332 for (var part in query.split("&")) { | 11202 for (var part in query.split("&")) { |
| 10333 var keyvalue = part.split("="); | 11203 var keyvalue = part.split("="); |
| 10334 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11204 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11205 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10335 } | 11206 } |
| 10336 } | 11207 } |
| 10337 | 11208 |
| 10338 | |
| 10339 var h = { | 11209 var h = { |
| 10340 "content-type" : "application/json; charset=utf-8", | 11210 "content-type": "application/json; charset=utf-8", |
| 10341 }; | 11211 }; |
| 10342 var resp = convert.JSON.encode(buildEntityUserLink()); | 11212 var resp = convert.JSON.encode(buildEntityUserLink()); |
| 10343 return new async.Future.value(stringResponse(200, h, resp)); | 11213 return new async.Future.value(stringResponse(200, h, resp)); |
| 10344 }), true); | 11214 }), true); |
| 10345 res.update(arg_request, arg_accountId, arg_webPropertyId, arg_linkId).then
(unittest.expectAsync1(((api.EntityUserLink response) { | 11215 res |
| 11216 .update(arg_request, arg_accountId, arg_webPropertyId, arg_linkId) |
| 11217 .then(unittest.expectAsync1(((api.EntityUserLink response) { |
| 10346 checkEntityUserLink(response); | 11218 checkEntityUserLink(response); |
| 10347 }))); | 11219 }))); |
| 10348 }); | 11220 }); |
| 10349 | |
| 10350 }); | 11221 }); |
| 10351 | 11222 |
| 10352 | |
| 10353 unittest.group("resource-MetadataColumnsResourceApi", () { | 11223 unittest.group("resource-MetadataColumnsResourceApi", () { |
| 10354 unittest.test("method--list", () { | 11224 unittest.test("method--list", () { |
| 10355 | |
| 10356 var mock = new HttpServerMock(); | 11225 var mock = new HttpServerMock(); |
| 10357 api.MetadataColumnsResourceApi res = new api.AnalyticsApi(mock).metadata.c
olumns; | 11226 api.MetadataColumnsResourceApi res = |
| 11227 new api.AnalyticsApi(mock).metadata.columns; |
| 10358 var arg_reportType = "foo"; | 11228 var arg_reportType = "foo"; |
| 10359 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11229 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10360 var path = (req.url).path; | 11230 var path = (req.url).path; |
| 10361 var pathOffset = 0; | 11231 var pathOffset = 0; |
| 10362 var index; | 11232 var index; |
| 10363 var subPart; | 11233 var subPart; |
| 10364 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11234 unittest.expect( |
| 11235 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10365 pathOffset += 1; | 11236 pathOffset += 1; |
| 10366 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 11237 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 11238 unittest.equals("analytics/v3/")); |
| 10367 pathOffset += 13; | 11239 pathOffset += 13; |
| 10368 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("metadata/")); | 11240 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 11241 unittest.equals("metadata/")); |
| 10369 pathOffset += 9; | 11242 pathOffset += 9; |
| 10370 index = path.indexOf("/columns", pathOffset); | 11243 index = path.indexOf("/columns", pathOffset); |
| 10371 unittest.expect(index >= 0, unittest.isTrue); | 11244 unittest.expect(index >= 0, unittest.isTrue); |
| 10372 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 11245 subPart = |
| 11246 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 10373 pathOffset = index; | 11247 pathOffset = index; |
| 10374 unittest.expect(subPart, unittest.equals("$arg_reportType")); | 11248 unittest.expect(subPart, unittest.equals("$arg_reportType")); |
| 10375 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/columns")); | 11249 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 11250 unittest.equals("/columns")); |
| 10376 pathOffset += 8; | 11251 pathOffset += 8; |
| 10377 | 11252 |
| 10378 var query = (req.url).query; | 11253 var query = (req.url).query; |
| 10379 var queryOffset = 0; | 11254 var queryOffset = 0; |
| 10380 var queryMap = {}; | 11255 var queryMap = {}; |
| 10381 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11256 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10382 parseBool(n) { | 11257 parseBool(n) { |
| 10383 if (n == "true") return true; | 11258 if (n == "true") return true; |
| 10384 if (n == "false") return false; | 11259 if (n == "false") return false; |
| 10385 if (n == null) return null; | 11260 if (n == null) return null; |
| 10386 throw new core.ArgumentError("Invalid boolean: $n"); | 11261 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10387 } | 11262 } |
| 11263 |
| 10388 if (query.length > 0) { | 11264 if (query.length > 0) { |
| 10389 for (var part in query.split("&")) { | 11265 for (var part in query.split("&")) { |
| 10390 var keyvalue = part.split("="); | 11266 var keyvalue = part.split("="); |
| 10391 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11267 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11268 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10392 } | 11269 } |
| 10393 } | 11270 } |
| 10394 | 11271 |
| 10395 | |
| 10396 var h = { | 11272 var h = { |
| 10397 "content-type" : "application/json; charset=utf-8", | 11273 "content-type": "application/json; charset=utf-8", |
| 10398 }; | 11274 }; |
| 10399 var resp = convert.JSON.encode(buildColumns()); | 11275 var resp = convert.JSON.encode(buildColumns()); |
| 10400 return new async.Future.value(stringResponse(200, h, resp)); | 11276 return new async.Future.value(stringResponse(200, h, resp)); |
| 10401 }), true); | 11277 }), true); |
| 10402 res.list(arg_reportType).then(unittest.expectAsync1(((api.Columns response
) { | 11278 res |
| 11279 .list(arg_reportType) |
| 11280 .then(unittest.expectAsync1(((api.Columns response) { |
| 10403 checkColumns(response); | 11281 checkColumns(response); |
| 10404 }))); | 11282 }))); |
| 10405 }); | 11283 }); |
| 10406 | |
| 10407 }); | 11284 }); |
| 10408 | 11285 |
| 10409 | |
| 10410 unittest.group("resource-ProvisioningResourceApi", () { | 11286 unittest.group("resource-ProvisioningResourceApi", () { |
| 10411 unittest.test("method--createAccountTicket", () { | 11287 unittest.test("method--createAccountTicket", () { |
| 10412 | |
| 10413 var mock = new HttpServerMock(); | 11288 var mock = new HttpServerMock(); |
| 10414 api.ProvisioningResourceApi res = new api.AnalyticsApi(mock).provisioning; | 11289 api.ProvisioningResourceApi res = new api.AnalyticsApi(mock).provisioning; |
| 10415 var arg_request = buildAccountTicket(); | 11290 var arg_request = buildAccountTicket(); |
| 10416 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11291 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10417 var obj = new api.AccountTicket.fromJson(json); | 11292 var obj = new api.AccountTicket.fromJson(json); |
| 10418 checkAccountTicket(obj); | 11293 checkAccountTicket(obj); |
| 10419 | 11294 |
| 10420 var path = (req.url).path; | 11295 var path = (req.url).path; |
| 10421 var pathOffset = 0; | 11296 var pathOffset = 0; |
| 10422 var index; | 11297 var index; |
| 10423 var subPart; | 11298 var subPart; |
| 10424 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11299 unittest.expect( |
| 11300 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10425 pathOffset += 1; | 11301 pathOffset += 1; |
| 10426 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("analytics/v3/")); | 11302 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 11303 unittest.equals("analytics/v3/")); |
| 10427 pathOffset += 13; | 11304 pathOffset += 13; |
| 10428 unittest.expect(path.substring(pathOffset, pathOffset + 32), unittest.eq
uals("provisioning/createAccountTicket")); | 11305 unittest.expect(path.substring(pathOffset, pathOffset + 32), |
| 11306 unittest.equals("provisioning/createAccountTicket")); |
| 10429 pathOffset += 32; | 11307 pathOffset += 32; |
| 10430 | 11308 |
| 10431 var query = (req.url).query; | 11309 var query = (req.url).query; |
| 10432 var queryOffset = 0; | 11310 var queryOffset = 0; |
| 10433 var queryMap = {}; | 11311 var queryMap = {}; |
| 10434 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11312 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10435 parseBool(n) { | 11313 parseBool(n) { |
| 10436 if (n == "true") return true; | 11314 if (n == "true") return true; |
| 10437 if (n == "false") return false; | 11315 if (n == "false") return false; |
| 10438 if (n == null) return null; | 11316 if (n == null) return null; |
| 10439 throw new core.ArgumentError("Invalid boolean: $n"); | 11317 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10440 } | 11318 } |
| 11319 |
| 10441 if (query.length > 0) { | 11320 if (query.length > 0) { |
| 10442 for (var part in query.split("&")) { | 11321 for (var part in query.split("&")) { |
| 10443 var keyvalue = part.split("="); | 11322 var keyvalue = part.split("="); |
| 10444 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11323 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11324 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10445 } | 11325 } |
| 10446 } | 11326 } |
| 10447 | 11327 |
| 10448 | |
| 10449 var h = { | 11328 var h = { |
| 10450 "content-type" : "application/json; charset=utf-8", | 11329 "content-type": "application/json; charset=utf-8", |
| 10451 }; | 11330 }; |
| 10452 var resp = convert.JSON.encode(buildAccountTicket()); | 11331 var resp = convert.JSON.encode(buildAccountTicket()); |
| 10453 return new async.Future.value(stringResponse(200, h, resp)); | 11332 return new async.Future.value(stringResponse(200, h, resp)); |
| 10454 }), true); | 11333 }), true); |
| 10455 res.createAccountTicket(arg_request).then(unittest.expectAsync1(((api.Acco
untTicket response) { | 11334 res |
| 11335 .createAccountTicket(arg_request) |
| 11336 .then(unittest.expectAsync1(((api.AccountTicket response) { |
| 10456 checkAccountTicket(response); | 11337 checkAccountTicket(response); |
| 10457 }))); | 11338 }))); |
| 10458 }); | 11339 }); |
| 10459 | |
| 10460 }); | 11340 }); |
| 10461 | |
| 10462 | |
| 10463 } | 11341 } |
| 10464 | |
| OLD | NEW |