@Test public void correctProjectUrlEnteredTest() { String correctUrl = "https: when(view.getProjectName()).thenReturn("", "angularjs"); presenter.projectUrlChanged(correctUrl); verify(view, never()).showUrlError(anyString()); verify(importSourceDescriptor).setLocation(eq(correctUrl)); verify(view).hideNameError(); verify(view).setProjectName(anyString()); verify(delegate).updateControls(); }
@Override public void projectUrlChanged(@Nonnull String url) { dataObject.getSource().getProject().setLocation(url); isUrlCorrect(url); String projectName = view.getProjectName(); if (projectName.isEmpty()) { projectName = extractProjectNameFromUri(url); dataObject.getProject().setName(projectName); view.setProjectName(projectName); validateProjectName(); } updateDelegate.updateControls(); }
ZipImporterPagePresenter extends AbstractWizardPage<ImportProject> implements ZipImporterPageView.ActionDelegate { @Override public void projectUrlChanged(@Nonnull String url) { dataObject.getSource().getProject().setLocation(url); isUrlCorrect(url); String projectName = view.getProjectName(); if (projectName.isEmpty()) { projectName = extractProjectNameFromUri(url); dataObject.getProject().setName(projectName); view.setProjectName(projectName); validateProjectName(); } updateDelegate.updateControls(); } }
ZipImporterPagePresenter extends AbstractWizardPage<ImportProject> implements ZipImporterPageView.ActionDelegate { @Override public void projectUrlChanged(@Nonnull String url) { dataObject.getSource().getProject().setLocation(url); isUrlCorrect(url); String projectName = view.getProjectName(); if (projectName.isEmpty()) { projectName = extractProjectNameFromUri(url); dataObject.getProject().setName(projectName); view.setProjectName(projectName); validateProjectName(); } updateDelegate.updateControls(); } @Inject  ZipImporterPagePresenter(ZipImporterPageView view, CoreLocalizationConstant locale); }
ZipImporterPagePresenter extends AbstractWizardPage<ImportProject> implements ZipImporterPageView.ActionDelegate { @Override public void projectUrlChanged(@Nonnull String url) { dataObject.getSource().getProject().setLocation(url); isUrlCorrect(url); String projectName = view.getProjectName(); if (projectName.isEmpty()) { projectName = extractProjectNameFromUri(url); dataObject.getProject().setName(projectName); view.setProjectName(projectName); validateProjectName(); } updateDelegate.updateControls(); } @Inject  ZipImporterPagePresenter(ZipImporterPageView view, CoreLocalizationConstant locale); @Override void init(ImportProject dataObject); @Override boolean isCompleted(); @Override void projectNameChanged(@Nonnull String name); @Override void projectUrlChanged(@Nonnull String url); @Override void projectDescriptionChanged(@Nonnull String projectDescription); @Override void projectVisibilityChanged(boolean visible); @Override void skipFirstLevelChanged(boolean isSkipFirstLevel); @Override void go(AcceptsOneWidget container); }
ZipImporterPagePresenter extends AbstractWizardPage<ImportProject> implements ZipImporterPageView.ActionDelegate { @Override public void projectUrlChanged(@Nonnull String url) { dataObject.getSource().getProject().setLocation(url); isUrlCorrect(url); String projectName = view.getProjectName(); if (projectName.isEmpty()) { projectName = extractProjectNameFromUri(url); dataObject.getProject().setName(projectName); view.setProjectName(projectName); validateProjectName(); } updateDelegate.updateControls(); } @Inject  ZipImporterPagePresenter(ZipImporterPageView view, CoreLocalizationConstant locale); @Override void init(ImportProject dataObject); @Override boolean isCompleted(); @Override void projectNameChanged(@Nonnull String name); @Override void projectUrlChanged(@Nonnull String url); @Override void projectDescriptionChanged(@Nonnull String projectDescription); @Override void projectVisibilityChanged(boolean visible); @Override void skipFirstLevelChanged(boolean isSkipFirstLevel); @Override void go(AcceptsOneWidget container);  }