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.set.subscriptions.invalid.service; | 5 library test.integration.server.set.subscriptions.invalid.service; |
6 | 6 |
7 import 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
8 | 8 |
9 import '../../reflective_tests.dart'; | 9 import '../../reflective_tests.dart'; |
10 import '../integration_tests.dart'; | 10 import '../integration_tests.dart'; |
11 | 11 |
12 main() { | 12 main() { |
13 runReflectiveTests(Test); | 13 runReflectiveTests(Test); |
14 } | 14 } |
15 | 15 |
16 @ReflectiveTestCase() | 16 @reflectiveTest |
17 class Test extends AbstractAnalysisServerIntegrationTest { | 17 class Test extends AbstractAnalysisServerIntegrationTest { |
18 test_setSubscriptions_invalidService() { | 18 test_setSubscriptions_invalidService() { |
19 // TODO(paulberry): verify that if an invalid service is specified, the | 19 // TODO(paulberry): verify that if an invalid service is specified, the |
20 // current subscriptions are unchanged. | 20 // current subscriptions are unchanged. |
21 return server.send("server.setSubscriptions", { | 21 return server.send("server.setSubscriptions", { |
22 'subscriptions': ['bogus'] | 22 'subscriptions': ['bogus'] |
23 }).then((_) { | 23 }).then((_) { |
24 fail('setSubscriptions should have produced an error'); | 24 fail('setSubscriptions should have produced an error'); |
25 }, onError: (error) { | 25 }, onError: (error) { |
26 // The expected error occurred. | 26 // The expected error occurred. |
27 }); | 27 }); |
28 } | 28 } |
29 } | 29 } |
OLD | NEW |