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.integration.server.domain; | 5 library test.integration.server.domain; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/src/constants.dart'; | 9 import 'package:analysis_server/src/constants.dart'; |
10 import 'package:analysis_testing/reflective_tests.dart'; | 10 import 'package:analysis_testing/reflective_tests.dart'; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // TODO(paulberry): verify that if an invalid service is specified, the | 75 // TODO(paulberry): verify that if an invalid service is specified, the |
76 // current subscriptions are unchanged. | 76 // current subscriptions are unchanged. |
77 return server_setSubscriptions(['bogus']).then((_) { | 77 return server_setSubscriptions(['bogus']).then((_) { |
78 fail('setSubscriptions should have produced an error'); | 78 fail('setSubscriptions should have produced an error'); |
79 }, onError: (error) { | 79 }, onError: (error) { |
80 // The expected error occurred. | 80 // The expected error occurred. |
81 }); | 81 }); |
82 } | 82 } |
83 | 83 |
84 test_connected() { | 84 test_connected() { |
85 Completer receivedConnected = new Completer(); | 85 expect(serverConnectedParams, isNull); |
86 server.onNotification(SERVER_CONNECTED).listen((params) { | |
87 expect(receivedConnected.isCompleted, isFalse); | |
88 receivedConnected.complete(); | |
89 expect(params, isNull); | |
90 }); | |
91 return receivedConnected.future; | |
92 } | 86 } |
93 | 87 |
94 test_error() { | 88 test_error() { |
95 // TODO(paulberry): how do we test the 'server.error' notification given | 89 // TODO(paulberry): how do we test the 'server.error' notification given |
96 // that this notification should only occur in the event of a server bug? | 90 // that this notification should only occur in the event of a server bug? |
97 } | 91 } |
98 | 92 |
99 test_status() { | 93 test_status() { |
100 // TODO(paulberry): spec says that server.status is not subscribed to by | 94 // TODO(paulberry): spec says that server.status is not subscribed to by |
101 // default, but currently it's behaving as though it is. | 95 // default, but currently it's behaving as though it is. |
(...skipping 25 matching lines...) Expand all Loading... |
127 return analysisBegun.future.then((_) { | 121 return analysisBegun.future.then((_) { |
128 expect(analysisFinished.isCompleted, isFalse); | 122 expect(analysisFinished.isCompleted, isFalse); |
129 return analysisFinished.future; | 123 return analysisFinished.future; |
130 }); | 124 }); |
131 } | 125 } |
132 } | 126 } |
133 | 127 |
134 main() { | 128 main() { |
135 runReflectiveTests(ServerDomainIntegrationTest); | 129 runReflectiveTests(ServerDomainIntegrationTest); |
136 } | 130 } |
OLD | NEW |