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 { |