OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.operation; | 5 library test.operation; |
6 | 6 |
7 import 'package:plugin/plugin.dart'; | 7 import 'package:plugin/plugin.dart'; |
8 import 'package:plugin/src/plugin_impl.dart'; | 8 import 'package:plugin/src/plugin_impl.dart'; |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:test/test.dart'; |
10 | 10 |
11 main() { | 11 main() { |
12 groupSep = ' | '; | |
13 | |
14 group('ExtensionManager', () { | 12 group('ExtensionManager', () { |
15 test('processPlugins', () { | 13 test('processPlugins', () { |
16 TestPlugin plugin1 = new TestPlugin('plugin1'); | 14 TestPlugin plugin1 = new TestPlugin('plugin1'); |
17 TestPlugin plugin2 = new TestPlugin('plugin1'); | 15 TestPlugin plugin2 = new TestPlugin('plugin1'); |
18 ExtensionManagerImpl manager = new ExtensionManagerImpl(); | 16 ExtensionManagerImpl manager = new ExtensionManagerImpl(); |
19 manager.processPlugins([plugin1, plugin2]); | 17 manager.processPlugins([plugin1, plugin2]); |
20 expect(plugin1.extensionPointsRegistered, true); | 18 expect(plugin1.extensionPointsRegistered, true); |
21 expect(plugin1.extensionsRegistered, true); | 19 expect(plugin1.extensionsRegistered, true); |
22 expect(plugin2.extensionPointsRegistered, true); | 20 expect(plugin2.extensionPointsRegistered, true); |
23 expect(plugin2.extensionsRegistered, true); | 21 expect(plugin2.extensionsRegistered, true); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 @override | 167 @override |
170 void registerExtensionPoints(RegisterExtensionPoint register) { | 168 void registerExtensionPoints(RegisterExtensionPoint register) { |
171 extensionPointsRegistered = true; | 169 extensionPointsRegistered = true; |
172 } | 170 } |
173 | 171 |
174 @override | 172 @override |
175 void registerExtensions(RegisterExtension register) { | 173 void registerExtensions(RegisterExtension register) { |
176 extensionsRegistered = true; | 174 extensionsRegistered = true; |
177 } | 175 } |
178 } | 176 } |
OLD | NEW |