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

Unified Diff: test/peer_test.dart

Issue 1652413002: Use StreamChannel. (Closed) Base URL: git@github.com:dart-lang/json_rpc_2.git@master
Patch Set: Code review changes Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/client/utils.dart ('k') | test/server/stream_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/peer_test.dart
diff --git a/test/peer_test.dart b/test/peer_test.dart
index 7008b724aac07c217bfe2e168456770f386e490d..89ab2d6112fe1dfee2eb4be2689b0a1f075648de 100644
--- a/test/peer_test.dart
+++ b/test/peer_test.dart
@@ -5,7 +5,9 @@
import 'dart:async';
import 'dart:convert';
+import 'package:stream_channel/stream_channel.dart';
import 'package:test/test.dart';
+
import 'package:json_rpc_2/error_code.dart' as error_code;
import 'package:json_rpc_2/json_rpc_2.dart' as json_rpc;
@@ -19,7 +21,7 @@ void main() {
var outgoingController = new StreamController();
outgoing = outgoingController.stream;
peer = new json_rpc.Peer.withoutJson(
- incomingController.stream, outgoingController);
+ new StreamChannel(incomingController.stream, outgoingController));
});
group("like a client,", () {
@@ -165,7 +167,7 @@ void main() {
var incomingController = new StreamController();
var outgoingController = new StreamController();
var jsonPeer = new json_rpc.Peer(
- incomingController.stream, outgoingController);
+ new StreamChannel(incomingController.stream, outgoingController));
expect(outgoingController.stream.first.then(JSON.decode), completion({
"jsonrpc": "2.0",
« no previous file with comments | « test/client/utils.dart ('k') | test/server/stream_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698