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