Search in sources :

Example 1 with CopyPopUpView

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();
}
Also used : FileNameAndCommitMessage(org.uberfire.ext.editor.commons.client.file.FileNameAndCommitMessage) CommandWithFileNameAndCommitMessage(org.uberfire.ext.editor.commons.client.file.CommandWithFileNameAndCommitMessage) CopyPopUpView(org.uberfire.ext.editor.commons.client.file.popups.CopyPopUpView) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 CommandWithFileNameAndCommitMessage (org.uberfire.ext.editor.commons.client.file.CommandWithFileNameAndCommitMessage)1 FileNameAndCommitMessage (org.uberfire.ext.editor.commons.client.file.FileNameAndCommitMessage)1 CopyPopUpView (org.uberfire.ext.editor.commons.client.file.popups.CopyPopUpView)1