Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: test/util/one_off_handler_test.dart

Issue 1053443002: Rename the package to "test". (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/util/multi_channel_test.dart ('k') | test/util/string_literal_iterator_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:shelf/shelf.dart' as shelf; 7 import 'package:shelf/shelf.dart' as shelf;
8 import 'package:unittest/src/util/one_off_handler.dart'; 8 import 'package:test/src/util/one_off_handler.dart';
9 import 'package:unittest/unittest.dart'; 9 import 'package:test/test.dart';
10 10
11 void main() { 11 void main() {
12 var handler; 12 var handler;
13 setUp(() => handler = new OneOffHandler()); 13 setUp(() => handler = new OneOffHandler());
14 14
15 _handle(request) => new Future.sync(() => handler.handler(request)); 15 _handle(request) => new Future.sync(() => handler.handler(request));
16 16
17 test("returns a 404 for a root URL", () { 17 test("returns a 404 for a root URL", () {
18 var request = new shelf.Request("GET", Uri.parse("http://localhost/")); 18 var request = new shelf.Request("GET", Uri.parse("http://localhost/"));
19 return _handle(request).then((response) { 19 return _handle(request).then((response) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 expect(response.readAsString(), completion(equals("one"))); 75 expect(response.readAsString(), completion(equals("one")));
76 76
77 request = new shelf.Request("GET", Uri.parse("http://localhost/$path3")); 77 request = new shelf.Request("GET", Uri.parse("http://localhost/$path3"));
78 return _handle(request); 78 return _handle(request);
79 }).then((response) { 79 }).then((response) {
80 expect(response.statusCode, equals(200)); 80 expect(response.statusCode, equals(200));
81 expect(response.readAsString(), completion(equals("three"))); 81 expect(response.readAsString(), completion(equals("three")));
82 }); 82 });
83 }); 83 });
84 } 84 }
OLDNEW
« no previous file with comments | « test/util/multi_channel_test.dart ('k') | test/util/string_literal_iterator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698