| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library http_multi_server.test; | |
| 6 | |
| 7 import 'dart:async'; | 5 import 'dart:async'; |
| 8 import 'dart:io'; | 6 import 'dart:io'; |
| 9 | 7 |
| 10 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 11 import 'package:http_multi_server/http_multi_server.dart'; | 9 import 'package:http_multi_server/http_multi_server.dart'; |
| 12 import 'package:http_multi_server/src/utils.dart'; | 10 import 'package:http_multi_server/src/utils.dart'; |
| 13 import 'package:test/test.dart'; | 11 import 'package:test/test.dart'; |
| 14 | 12 |
| 15 void main() { | 13 void main() { |
| 16 group("with multiple HttpServers", () { | 14 group("with multiple HttpServers", () { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 160 |
| 163 /// Makes a GET request to the root of [server] and returns the response. | 161 /// Makes a GET request to the root of [server] and returns the response. |
| 164 Future<http.Response> _get(HttpServer server) => http.get(_urlFor(server)); | 162 Future<http.Response> _get(HttpServer server) => http.get(_urlFor(server)); |
| 165 | 163 |
| 166 /// Makes a GET request to the root of [server] and returns the response body. | 164 /// Makes a GET request to the root of [server] and returns the response body. |
| 167 Future<String> _read(HttpServer server) => http.read(_urlFor(server)); | 165 Future<String> _read(HttpServer server) => http.read(_urlFor(server)); |
| 168 | 166 |
| 169 /// Returns the URL for the root of [server]. | 167 /// Returns the URL for the root of [server]. |
| 170 String _urlFor(HttpServer server) => | 168 String _urlFor(HttpServer server) => |
| 171 "http://${server.address.host}:${server.port}/"; | 169 "http://${server.address.host}:${server.port}/"; |
| OLD | NEW |