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

Unified Diff: test/util/path_handler_test.dart

Issue 2515303002: Add expectAsyncX and expectAsyncUntilX methods, and deprecate the old methods. (Closed)
Patch Set: Mark parameter types as Object. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/util/one_off_handler_test.dart ('k') | test/util/stream_queue_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/util/path_handler_test.dart
diff --git a/test/util/path_handler_test.dart b/test/util/path_handler_test.dart
index 4ac0835d545fb62239cd6a994b557745c321f1b7..729b94ae1eebc35dd30524f89005a53c43c628ad 100644
--- a/test/util/path_handler_test.dart
+++ b/test/util/path_handler_test.dart
@@ -26,7 +26,7 @@ void main() {
test("runs a handler for an exact URL", () async {
var request = new shelf.Request("GET", Uri.parse("http://localhost/foo"));
- handler.add("foo", expectAsync((request) {
+ handler.add("foo", expectAsync1((request) {
expect(request.handlerPath, equals('/foo'));
expect(request.url.path, isEmpty);
return new shelf.Response.ok("good job!");
@@ -40,7 +40,7 @@ void main() {
test("runs a handler for a suffix", () async {
var request = new shelf.Request(
"GET", Uri.parse("http://localhost/foo/bar"));
- handler.add("foo", expectAsync((request) {
+ handler.add("foo", expectAsync1((request) {
expect(request.handlerPath, equals('/foo/'));
expect(request.url.path, 'bar');
return new shelf.Response.ok("good job!");
@@ -55,13 +55,13 @@ void main() {
var request = new shelf.Request(
"GET", Uri.parse("http://localhost/foo/bar/baz"));
- handler.add("foo", expectAsync((_) {}, count: 0));
- handler.add("foo/bar", expectAsync((request) {
+ handler.add("foo", expectAsync1((_) {}, count: 0));
+ handler.add("foo/bar", expectAsync1((request) {
expect(request.handlerPath, equals('/foo/bar/'));
expect(request.url.path, 'baz');
return new shelf.Response.ok("good job!");
}));
- handler.add("foo/bar/baz/bang", expectAsync((_) {}, count: 0));
+ handler.add("foo/bar/baz/bang", expectAsync1((_) {}, count: 0));
var response = await _handle(request);
expect(response.statusCode, equals(200));
« no previous file with comments | « test/util/one_off_handler_test.dart ('k') | test/util/stream_queue_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698