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

Unified Diff: pkg/analysis_server/test/protocol_test.dart

Issue 176873015: update client to use channel rather than socket (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: use common json encoder Created 6 years, 10 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 | « pkg/analysis_server/lib/src/protocol.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/protocol_test.dart
diff --git a/pkg/analysis_server/test/protocol_test.dart b/pkg/analysis_server/test/protocol_test.dart
index 2bb24fd77aebbe37041c4abd48c581c7b35f6b67..f4669e6af8f10341603761e6fb8ff744ccac80cd 100644
--- a/pkg/analysis_server/test/protocol_test.dart
+++ b/pkg/analysis_server/test/protocol_test.dart
@@ -14,6 +14,7 @@ main() {
test('getParameter_undefined', RequestTest.getParameter_undefined);
test('getRequiredParameter_defined', RequestTest.getRequiredParameter_defined);
test('getRequiredParameter_undefined', RequestTest.getRequiredParameter_undefined);
+ test('toJson', RequestTest.toJson);
});
group('Response', () {
test('create_contextDoesNotExist', ResponseTest.create_contextDoesNotExist);
@@ -52,6 +53,14 @@ class RequestTest {
Request request = new Request('0', '');
expect(() => request.getRequiredParameter(name), throwsA(new isInstanceOf<RequestFailure>()));
}
+
+ static void toJson() {
+ Request original = new Request('one', 'aMethod');
+ expect(original.toJson(), equals({
+ Request.ID: 'one',
+ Request.METHOD : 'aMethod'
+ }));
+ }
}
class ResponseTest {
« no previous file with comments | « pkg/analysis_server/lib/src/protocol.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698