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