| 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.channel; | 5 library test.channel; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/channel.dart'; | 9 import 'package:analysis_server/src/channel.dart'; |
| 10 import 'package:analysis_server/src/protocol.dart'; | 10 import 'package:analysis_server/src/protocol.dart'; |
| 11 import 'package:unittest/matcher.dart'; | |
| 12 import 'package:unittest/unittest.dart'; | 11 import 'package:unittest/unittest.dart'; |
| 13 | 12 |
| 14 import 'mocks.dart'; | 13 import 'mocks.dart'; |
| 15 | 14 |
| 16 main() { | 15 main() { |
| 17 group('WebSocketChannel', () { | 16 group('WebSocketChannel', () { |
| 18 setUp(WebSocketChannelTest.setUp); | 17 setUp(WebSocketChannelTest.setUp); |
| 19 test('close', WebSocketChannelTest.close); | 18 test('close', WebSocketChannelTest.close); |
| 20 test('invalidJsonToClient', WebSocketChannelTest.invalidJsonToClient); | 19 test('invalidJsonToClient', WebSocketChannelTest.invalidJsonToClient); |
| 21 test('invalidJsonToServer', WebSocketChannelTest.invalidJsonToServer); | 20 test('invalidJsonToServer', WebSocketChannelTest.invalidJsonToServer); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 } | 150 } |
| 152 | 151 |
| 153 static void expectMsgCount({requestCount: 0, | 152 static void expectMsgCount({requestCount: 0, |
| 154 responseCount: 0, | 153 responseCount: 0, |
| 155 notificationCount: 0}) { | 154 notificationCount: 0}) { |
| 156 expect(requestsReceived, hasLength(requestCount)); | 155 expect(requestsReceived, hasLength(requestCount)); |
| 157 expect(responsesReceived, hasLength(responseCount)); | 156 expect(responsesReceived, hasLength(responseCount)); |
| 158 expect(notificationsReceived, hasLength(notificationCount)); | 157 expect(notificationsReceived, hasLength(notificationCount)); |
| 159 } | 158 } |
| 160 } | 159 } |
| OLD | NEW |