SubversionProjectImporterPresenter extends AbstractWizardPage<ImportProject> implements SubversionProjectImporterView.ActionDelegate { @Override public void onProjectVisibilityChanged() { dataObject.getProject().setVisibility(view.getProjectVisibility() ? PUBLIC_VISIBILITY : PRIVATE_VISIBILITY); updateDelegate.updateControls(); } @Inject  SubversionProjectImporterPresenter(SubversionProjectImporterView view); @Override void go(AcceptsOneWidget container); @Override void onProjectNameChanged(); @Override void onProjectUrlChanged(); @Override void onProjectRelativePathChanged(); @Override void onProjectDescriptionChanged(); @Override void onProjectVisibilityChanged(); @Override void onCredentialsChanged(); static final String PUBLIC_VISIBILITY; static final String PRIVATE_VISIBILITY; }
@Test public void testProjectVisibility() throws Exception { presenter.onProjectVisibilityChanged(); verify(dataObject.getProject()).setVisibility(eq(SubversionProjectImporterPresenter.PRIVATE_VISIBILITY)); verify(view, never()).setNameErrorVisibility(anyBoolean()); verify(updateDelegate).updateControls(); }