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();
}
Aggregations