| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library test.protocol; | 5 library test.protocol; |
| 6 | 6 |
| 7 import 'dart:convert'; |
| 8 |
| 7 import 'package:analysis_server/src/protocol.dart'; | 9 import 'package:analysis_server/src/protocol.dart'; |
| 8 import 'package:unittest/matcher.dart'; | |
| 9 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| 10 import 'dart:convert'; | |
| 11 | 11 |
| 12 main() { | 12 main() { |
| 13 group('Notification', () { | 13 group('Notification', () { |
| 14 test('getParameter_defined', NotificationTest.getParameter_defined); | 14 test('getParameter_defined', NotificationTest.getParameter_defined); |
| 15 test('getParameter_undefined', NotificationTest.getParameter_undefined); | 15 test('getParameter_undefined', NotificationTest.getParameter_undefined); |
| 16 test('fromJson', NotificationTest.fromJson); | 16 test('fromJson', NotificationTest.fromJson); |
| 17 test('fromJson_withParams', NotificationTest.fromJson_withParams); | 17 test('fromJson_withParams', NotificationTest.fromJson_withParams); |
| 18 }); | 18 }); |
| 19 group('Request', () { | 19 group('Request', () { |
| 20 test('getParameter_defined', RequestTest.getParameter_defined); | 20 test('getParameter_defined', RequestTest.getParameter_defined); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 static void fromJson_withResult() { | 240 static void fromJson_withResult() { |
| 241 Response original = new Response('myId'); | 241 Response original = new Response('myId'); |
| 242 original.setResult('foo', 'bar'); | 242 original.setResult('foo', 'bar'); |
| 243 Response response = new Response.fromJson(original.toJson()); | 243 Response response = new Response.fromJson(original.toJson()); |
| 244 expect(response.id, equals('myId')); | 244 expect(response.id, equals('myId')); |
| 245 Map<String, Object> result = response.result; | 245 Map<String, Object> result = response.result; |
| 246 expect(result.length, equals(1)); | 246 expect(result.length, equals(1)); |
| 247 expect(result['foo'], equals('bar')); | 247 expect(result['foo'], equals('bar')); |
| 248 } | 248 } |
| 249 } | 249 } |
| OLD | NEW |