@Test public void createProjectWithInvalidVersionFailedTest() { doReturn("name").when(view).getName(); doReturn("description").when(view).getDescription(); doReturn("groupId").when(view).getGroupId(); doReturn("artifactId").when(view).getArtifactId(); doReturn("version").when(view).getVersion(); doReturn(true).when(view).isAdvancedOptionsSelected(); doReturn(false).when(validationService).validateGAVVersion(anyString()); presenter.add(); verify(view).setAddButtonEnabled(false); verify(view).showBusyIndicator(anyString()); verify(newProjectEvent, never()).fire(any(NewProjectEvent.class)); verify(view).hideBusyIndicator(); verify(view, never()).hide(); verify(view).showError(anyString()); verify(libraryPlaces, never()).goToProject(any(WorkspaceProject.class)); verify(view).setAddButtonEnabled(true); }
public void add() { createProject(DeploymentMode.VALIDATED); }
AddProjectPopUpPresenter { public void add() { createProject(DeploymentMode.VALIDATED); } }
AddProjectPopUpPresenter { public void add() { createProject(DeploymentMode.VALIDATED); } @Inject  AddProjectPopUpPresenter(final Caller<LibraryService> libraryService,
                                    final BusyIndicatorView busyIndicatorView,
                                    final Event<NotificationEvent> notificationEvent,
                                    final LibraryPlaces libraryPlaces,
                                    final WorkspaceProjectContext projectContext,
                                    final View view,
                                    final SessionInfo sessionInfo,
                                    final Event<NewProjectEvent> newProjectEvent,
                                    final LibraryPreferences libraryPreferences,
                                    final ConflictingRepositoriesPopup conflictingRepositoriesPopup,
                                    final Caller<ValidationService> validationService,
                                    final ErrorPopup errorPopup,
                                    final TranslationService translationService,
                                    final Caller<WorkspaceProjectService> projectService,
                                    final Logger logger,
                                    final ArchetypePreferences archetypePreferences,
                                    final SpaceScopedResolutionStrategySupplier spaceScopedResolutionStrategySupplier); }
AddProjectPopUpPresenter { public void add() { createProject(DeploymentMode.VALIDATED); } @Inject  AddProjectPopUpPresenter(final Caller<LibraryService> libraryService,
                                    final BusyIndicatorView busyIndicatorView,
                                    final Event<NotificationEvent> notificationEvent,
                                    final LibraryPlaces libraryPlaces,
                                    final WorkspaceProjectContext projectContext,
                                    final View view,
                                    final SessionInfo sessionInfo,
                                    final Event<NewProjectEvent> newProjectEvent,
                                    final LibraryPreferences libraryPreferences,
                                    final ConflictingRepositoriesPopup conflictingRepositoriesPopup,
                                    final Caller<ValidationService> validationService,
                                    final ErrorPopup errorPopup,
                                    final TranslationService translationService,
                                    final Caller<WorkspaceProjectService> projectService,
                                    final Logger logger,
                                    final ArchetypePreferences archetypePreferences,
                                    final SpaceScopedResolutionStrategySupplier spaceScopedResolutionStrategySupplier); @PostConstruct void setup(); void setSuccessCallback(ParameterizedCommand<WorkspaceProject> successCallback); void show(); void add(); void onProjectIndexingFinishedEvent(@Observes IndexingFinishedEvent event); ParameterizedCommand<WorkspaceProject> getSuccessCallback(); ParameterizedCommand<WorkspaceProject> getProjectCreationSuccessCallback(); void cancel(); void setDefaultArtifactId(); void restoreAdvancedOptions(); }
AddProjectPopUpPresenter { public void add() { createProject(DeploymentMode.VALIDATED); } @Inject  AddProjectPopUpPresenter(final Caller<LibraryService> libraryService,
                                    final BusyIndicatorView busyIndicatorView,
                                    final Event<NotificationEvent> notificationEvent,
                                    final LibraryPlaces libraryPlaces,
                                    final WorkspaceProjectContext projectContext,
                                    final View view,
                                    final SessionInfo sessionInfo,
                                    final Event<NewProjectEvent> newProjectEvent,
                                    final LibraryPreferences libraryPreferences,
                                    final ConflictingRepositoriesPopup conflictingRepositoriesPopup,
                                    final Caller<ValidationService> validationService,
                                    final ErrorPopup errorPopup,
                                    final TranslationService translationService,
                                    final Caller<WorkspaceProjectService> projectService,
                                    final Logger logger,
                                    final ArchetypePreferences archetypePreferences,
                                    final SpaceScopedResolutionStrategySupplier spaceScopedResolutionStrategySupplier); @PostConstruct void setup(); void setSuccessCallback(ParameterizedCommand<WorkspaceProject> successCallback); void show(); void add(); void onProjectIndexingFinishedEvent(@Observes IndexingFinishedEvent event); ParameterizedCommand<WorkspaceProject> getSuccessCallback(); ParameterizedCommand<WorkspaceProject> getProjectCreationSuccessCallback(); void cancel(); void setDefaultArtifactId(); void restoreAdvancedOptions();  }