Search in sources :

Example 11 with RefactorInfo

use of org.eclipse.che.ide.ext.java.client.refactoring.RefactorInfo in project che by eclipse.

the class RenamePresenterTest method renameTypeWizardShouldBeShow.

@Test
public void renameTypeWizardShouldBeShow() throws Exception {
    when(session.getWizardType()).thenReturn(RenameRefactoringSession.RenameWizard.TYPE);
    RefactorInfo refactorInfo = RefactorInfo.of(MoveType.REFACTOR_MENU, RefactoredItemType.COMPILATION_UNIT, new Resource[] { file });
    renamePresenter.show(refactorInfo);
    verifyPreparingRenameRefactoringDto();
    verify(refactorService).createRenameRefactoring(createRenameRefactoringDto);
    verify(renameRefactoringSessionPromise).then(renameRefactoringSessionCaptor.capture());
    renameRefactoringSessionCaptor.getValue().apply(session);
    verifyPreparingWizard();
    verify(locale).renameTypeTitle();
    verify(view).setTitle(anyString());
    verify(view).setVisiblePatternsPanel(true);
    verify(view).setVisibleFullQualifiedNamePanel(true);
    verify(view).setVisibleSimilarlyVariablesPanel(true);
    verify(view).show();
}
Also used : RefactorInfo(org.eclipse.che.ide.ext.java.client.refactoring.RefactorInfo) Test(org.junit.Test)

Aggregations

RefactorInfo (org.eclipse.che.ide.ext.java.client.refactoring.RefactorInfo)11 Test (org.junit.Test)11 ChangeInfo (org.eclipse.che.ide.ext.java.shared.dto.refactoring.ChangeInfo)2 ArrayList (java.util.ArrayList)1 DisplayMode (org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode)1 RefactoringStatus (org.eclipse.che.ide.ext.java.shared.dto.refactoring.RefactoringStatus)1