use of com.jetbrains.lang.dart.ide.refactoring.ServerRenameRefactoring in project intellij-plugins by JetBrains.
the class DartServerRenameTest method doTest.
private void doTest(@NotNull final String newName) {
final ServerRenameRefactoring refactoring = createRenameRefactoring();
doTest(refactoring, newName);
}
use of com.jetbrains.lang.dart.ide.refactoring.ServerRenameRefactoring in project intellij-plugins by JetBrains.
the class DartServerRenameTest method testCheckInitialConditionsCannotCreate.
public void testCheckInitialConditionsCannotCreate() throws Throwable {
final ServerRenameRefactoring refactoring = createRenameRefactoring();
final RefactoringStatus initialConditions = refactoring.checkInitialConditions();
assertNotNull(initialConditions);
assertTrue(initialConditions.hasFatalError());
}
use of com.jetbrains.lang.dart.ide.refactoring.ServerRenameRefactoring in project intellij-plugins by JetBrains.
the class DartServerRenameTest method testCheckFinalConditionsNameFatalError.
public void testCheckFinalConditionsNameFatalError() throws Throwable {
final ServerRenameRefactoring refactoring = createRenameRefactoring();
// initial status OK
final RefactoringStatus initialConditions = refactoring.checkInitialConditions();
assertNotNull(initialConditions);
assertTrue(initialConditions.isOK());
// final (actually options) status has a fatal error
refactoring.setNewName("bad name");
final RefactoringStatus finalConditions = refactoring.checkFinalConditions();
assertNotNull(finalConditions);
assertTrue(finalConditions.hasFatalError());
}
use of com.jetbrains.lang.dart.ide.refactoring.ServerRenameRefactoring in project intellij-plugins by JetBrains.
the class DartServerRenameTest method testTypeAndImmediatelyRenameLocalVar.
public void testTypeAndImmediatelyRenameLocalVar() throws Throwable {
myFixture.configureByFile(getTestName(false) + ".dart");
// warm up
myFixture.doHighlighting();
myFixture.type('\n');
final int offset = getEditor().getCaretModel().getOffset();
final ServerRenameRefactoring refactoring = new ServerRenameRefactoring(getProject(), getFile().getVirtualFile(), offset, 0);
doTest(refactoring, "newName");
}
Aggregations