Index: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameMethodProcessorTest.java |
diff --git a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameMethodProcessorTest.java b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameMethodProcessorTest.java |
index 6b3e512ba52a0fc80bedb87d849136a9ee0c1a93..af931e08222c0c9b0c4f6b6b46055b7a45ed88fb 100644 |
--- a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameMethodProcessorTest.java |
+++ b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameMethodProcessorTest.java |
@@ -156,6 +156,26 @@ public final class RenameMethodProcessorTest extends RefactoringTest { |
"}"); |
} |
+ public void test_methodCall() throws Exception { |
+ setTestUnitContent( |
+ "// filler filler filler filler filler filler filler filler filler filler", |
+ "class A {", |
+ " call() {}", |
+ "}"); |
+ Method method = findElement("call() {}"); |
+ // try to rename |
+ try { |
+ renameMethod(method, "newName"); |
+ fail(); |
+ } catch (InterruptedException e) { |
+ } |
+ // error should be displayed |
+ assertThat(openInformationMessages).isEmpty(); |
+ assertThat(showStatusMessages).hasSize(1); |
+ assertEquals(RefactoringStatus.FATAL, showStatusSeverities.get(0).intValue()); |
+ assertEquals("Method 'call' cannot be renamed", showStatusMessages.get(0)); |
+ } |
+ |
public void test_OK_getter() throws Exception { |
setTestUnitContent( |
"// filler filler filler filler filler filler filler filler filler filler", |