| OLD | NEW |
| 1 library googleapis.qpxExpress.v1.test; | 1 library googleapis.qpxExpress.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| (...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 api.TripsResourceApi res = new api.QpxExpressApi(mock).trips; | 1166 api.TripsResourceApi res = new api.QpxExpressApi(mock).trips; |
| 1167 var arg_request = buildTripsSearchRequest(); | 1167 var arg_request = buildTripsSearchRequest(); |
| 1168 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1168 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1169 var obj = new api.TripsSearchRequest.fromJson(json); | 1169 var obj = new api.TripsSearchRequest.fromJson(json); |
| 1170 checkTripsSearchRequest(obj); | 1170 checkTripsSearchRequest(obj); |
| 1171 | 1171 |
| 1172 var path = (req.url).path; | 1172 var path = (req.url).path; |
| 1173 var pathOffset = 0; | 1173 var pathOffset = 0; |
| 1174 var index; | 1174 var index; |
| 1175 var subPart; | 1175 var subPart; |
| 1176 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/qpxExpress/v1/trips/")); | 1176 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1177 pathOffset += 21; | 1177 pathOffset += 1; |
| 1178 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("qpxExpress/v1/trips/")); |
| 1179 pathOffset += 20; |
| 1178 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("search")); | 1180 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("search")); |
| 1179 pathOffset += 6; | 1181 pathOffset += 6; |
| 1180 | 1182 |
| 1181 var query = (req.url).query; | 1183 var query = (req.url).query; |
| 1182 var queryOffset = 0; | 1184 var queryOffset = 0; |
| 1183 var queryMap = {}; | 1185 var queryMap = {}; |
| 1184 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1186 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1185 parseBool(n) { | 1187 parseBool(n) { |
| 1186 if (n == "true") return true; | 1188 if (n == "true") return true; |
| 1187 if (n == "false") return false; | 1189 if (n == "false") return false; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1205 res.search(arg_request).then(unittest.expectAsync(((api.TripsSearchRespons
e response) { | 1207 res.search(arg_request).then(unittest.expectAsync(((api.TripsSearchRespons
e response) { |
| 1206 checkTripsSearchResponse(response); | 1208 checkTripsSearchResponse(response); |
| 1207 }))); | 1209 }))); |
| 1208 }); | 1210 }); |
| 1209 | 1211 |
| 1210 }); | 1212 }); |
| 1211 | 1213 |
| 1212 | 1214 |
| 1213 } | 1215 } |
| 1214 | 1216 |
| OLD | NEW |