use of org.uberfire.ext.editor.commons.client.file.popups.CopyPopUpView in project kie-wb-common by kiegroup.
the class ProjectScreenTest method testDuplicateCommand.
@Test
public void testDuplicateCommand() {
doNothing().when(projectScreenService).copy(any(), any());
final CopyPopUpView copyPopUpView = mock(CopyPopUpView.class);
doReturn(copyPopUpView).when(copyPopUpPresenter).getView();
this.presenter.getDuplicateCommand().execute(new FileNameAndCommitMessage("newFileName", "commitMessage"));
verify(copyPopUpView).hide();
verify(view).showBusyIndicator(anyString());
verify(projectScreenService).copy(presenter.workspaceProject, "newFileName");
verify(view).hideBusyIndicator();
verify(notificationEvent).fire(any());
verify(promises).resolve();
}
Aggregations