use of org.uberfire.promise.SyncPromises in project kie-wb-common by kiegroup.
the class ProjectScreenTest method setUp.
@Before
public void setUp() {
projectScreenServiceCaller = new CallerMock<>(projectScreenService);
promises = spy(new SyncPromises());
when(assetsScreen.getView()).thenReturn(assetsView);
when(viewHideAlertsButtonPresenter.getView()).thenReturn(viewHideAlertsButtonView);
when(editContributorsPopUpPresenterInstance.get()).thenReturn(editContributorsPopUpPresenter);
when(deleteProjectPopUpScreenInstance.get()).thenReturn(deleteProjectPopUpScreen);
when(renameProjectPopUpScreenInstance.get()).thenReturn(renameProjectPopUpScreen);
final WorkspaceProject workspaceProject = mock(WorkspaceProject.class);
final Module module = mock(Module.class);
when(module.getModuleName()).thenReturn("module-name");
when(workspaceProject.getMainModule()).thenReturn(module);
when(libraryPlaces.getActiveWorkspaceContext()).thenReturn(workspaceProject);
this.presenter = spy(new ProjectScreen(this.view, this.libraryPlaces, this.emptyAssetsScree, this.assetsScreen, this.contributorsListScreen, this.projectMetrictsScreen, this.projectController, this.settingsPresenter, this.organizationalUnitController, this.newFileUploader, this.newResourcePresenter, this.buildExecutor, this.editContributorsPopUpPresenterInstance, this.deleteProjectPopUpScreenInstance, this.renameProjectPopUpScreenInstance, new CallerMock<>(this.libraryService), projectScreenServiceCaller, copyPopUpPresenter, projectNameValidator, promises, notificationEvent, viewHideAlertsButtonPresenter));
this.presenter.workspaceProject = createProject();
}
Aggregations