Search in sources :

Example 1 with SyncPromises

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();
}
Also used : SyncPromises(org.uberfire.promise.SyncPromises) WorkspaceProject(org.guvnor.common.services.project.model.WorkspaceProject) Module(org.guvnor.common.services.project.model.Module) Before(org.junit.Before)

Aggregations

Module (org.guvnor.common.services.project.model.Module)1 WorkspaceProject (org.guvnor.common.services.project.model.WorkspaceProject)1 Before (org.junit.Before)1 SyncPromises (org.uberfire.promise.SyncPromises)1