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 import 'dart:async'; | 5 import 'dart:async'; |
6 | 6 |
7 import 'package:analysis_server/protocol/protocol.dart'; | 7 import 'package:analysis_server/protocol/protocol.dart'; |
8 import 'package:analysis_server/protocol/protocol_generated.dart'; | 8 import 'package:analysis_server/protocol/protocol_generated.dart'; |
9 import 'package:analysis_server/src/edit/edit_domain.dart'; | 9 import 'package:analysis_server/src/edit/edit_domain.dart'; |
10 import 'package:analyzer_plugin/protocol/protocol_common.dart'; | 10 import 'package:analyzer_plugin/protocol/protocol_common.dart'; |
11 import 'package:plugin/manager.dart'; | |
12 import 'package:test/test.dart'; | 11 import 'package:test/test.dart'; |
13 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 12 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
14 | 13 |
15 import '../analysis_abstract.dart'; | 14 import '../analysis_abstract.dart'; |
16 import '../mocks.dart'; | 15 import '../mocks.dart'; |
17 | 16 |
18 main() { | 17 main() { |
19 defineReflectiveSuite(() { | 18 defineReflectiveSuite(() { |
20 defineReflectiveTests(ConvertGetterMethodToMethodTest); | 19 defineReflectiveTests(ConvertGetterMethodToMethodTest); |
21 defineReflectiveTests(ConvertMethodToGetterTest); | 20 defineReflectiveTests(ConvertMethodToGetterTest); |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 | 747 |
749 Future getRefactoringsForString(String search) { | 748 Future getRefactoringsForString(String search) { |
750 int offset = findOffset(search); | 749 int offset = findOffset(search); |
751 return getRefactorings(offset, search.length); | 750 return getRefactorings(offset, search.length); |
752 } | 751 } |
753 | 752 |
754 @override | 753 @override |
755 void setUp() { | 754 void setUp() { |
756 super.setUp(); | 755 super.setUp(); |
757 createProject(); | 756 createProject(); |
758 ExtensionManager manager = new ExtensionManager(); | |
759 manager.processPlugins([server.serverPlugin]); | |
760 handler = new EditDomainHandler(server); | 757 handler = new EditDomainHandler(server); |
761 server.handlers = [handler]; | 758 server.handlers = [handler]; |
762 } | 759 } |
763 | 760 |
764 Future test_convertMethodToGetter_hasElement() { | 761 Future test_convertMethodToGetter_hasElement() { |
765 return assertHasKind(''' | 762 return assertHasKind(''' |
766 int getValue() => 42; | 763 int getValue() => 42; |
767 ''', 'getValue', RefactoringKind.CONVERT_METHOD_TO_GETTER, true); | 764 ''', 'getValue', RefactoringKind.CONVERT_METHOD_TO_GETTER, true); |
768 } | 765 } |
769 | 766 |
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1931 kind, testFile, offset, length, validateOnly, | 1928 kind, testFile, offset, length, validateOnly, |
1932 options: options) | 1929 options: options) |
1933 .toRequest('0'); | 1930 .toRequest('0'); |
1934 return serverChannel.sendRequest(request); | 1931 return serverChannel.sendRequest(request); |
1935 } | 1932 } |
1936 | 1933 |
1937 @override | 1934 @override |
1938 void setUp() { | 1935 void setUp() { |
1939 super.setUp(); | 1936 super.setUp(); |
1940 createProject(); | 1937 createProject(); |
1941 ExtensionManager manager = new ExtensionManager(); | |
1942 manager.processPlugins([server.serverPlugin]); | |
1943 handler = new EditDomainHandler(server); | 1938 handler = new EditDomainHandler(server); |
1944 server.handlers = [handler]; | 1939 server.handlers = [handler]; |
1945 } | 1940 } |
1946 } | 1941 } |
OLD | NEW |