use of org.uberfire.ext.editor.commons.client.file.popups.CopyPopUpPresenter in project kie-wb-common by kiegroup.
the class CopyPopupWithPackageViewTest method setup.
@Before
public void setup() {
final CopyPopUpPresenter presenter = mock(CopyPopUpPresenter.class);
doReturn(PathFactory.newPath("my-file.txt", "my-project/src/main/resources/my-file.txt")).when(presenter).getPath();
copyView = spy(new CopyPopupWithPackageView());
copyView.presenter = presenter;
copyView.packageListBox = mock(PackageListBox.class);
copyView.translationService = mock(TranslationService.class);
doReturn(mock(Package.class)).when(copyView.packageListBox).getSelectedPackage();
doReturn(mock(Button.class)).when(copyView).button(anyString(), any(Command.class), any(ButtonType.class));
packageLoadedCommandCaptor = ArgumentCaptor.forClass(Command.class);
doNothing().when(copyView.packageListBox).setUp(eq(true), packageLoadedCommandCaptor.capture());
}
Aggregations