GithubImporterPagePresenter extends AbstractWizardPage<ImportProject> implements GithubImporterPageView.ActionDelegate { @Override public void onRepositorySelected(@NotNull ProjectData repository) { dataObject.getProject().setName(repository.getName()); dataObject.getProject().setDescription(repository.getDescription()); dataObject.getSource().getProject().setLocation(repository.getRepositoryUrl()); updateView(); updateDelegate.updateControls(); } @Inject  GithubImporterPagePresenter(GithubImporterPageView view,
                                       GitHubAuthenticator gitHubAuthenticator,
                                       NotificationManager notificationManager,
                                       GitHubClientService gitHubClientService,
                                       DtoFactory dtoFactory,
                                       GitHubLocalizationConstant locale); @Override boolean isCompleted(); @Override void projectNameChanged(@NotNull String name); @Override void projectUrlChanged(@NotNull String url); @Override void recursiveSelected(boolean recursiveSelected); @Override void projectDescriptionChanged(@NotNull String projectDescription); @Override void projectVisibilityChanged(boolean visible); @Override void keepDirectorySelected(boolean keepDirectory); @Override void keepDirectoryNameChanged(@NotNull String directoryName); @Override void go(@NotNull AcceptsOneWidget container); @Override void onLoadRepoClicked(); @Override void onRepositorySelected(@NotNull ProjectData repository); @Override void onAccountChanged();  }
@Test public void onRepositorySelectedTest() { ProjectData projectData = new ProjectData("name", "description", "type", new ArrayList<String>(), "repoUrl", "readOnlyUrl"); presenter.onRepositorySelected(projectData); verify(newProject).setName(eq("name")); verify(newProject).setDescription(eq("description")); verify(importSourceDescriptor).setLocation(eq("repoUrl")); verify(view).setProjectName(anyString()); verify(view).setProjectDescription(anyString()); verify(view).setProjectUrl(anyString()); verify(updateDelegate).updateControls(); }