@Test public void shouldNotGetMavenDeveloperUrlIfNoCredentials() { when(mavenConf.getDeveloperUrl()).thenReturn("scm:svn:https:writable"); when(mavenConf.getUrl()).thenReturn("scm:svn:https:readonly"); assertThat(scmConfiguration.getUrl()).isEqualTo("scm:svn:https:readonly"); }
@Test public void shouldGetMavenDeveloperUrlIfCredentials() { when(mavenConf.getDeveloperUrl()).thenReturn("scm:svn:https:writable"); settings.setProperty(ScmActivityPlugin.USER, "godin"); settings.setProperty(ScmActivityPlugin.PASSWORD, "pass"); assertThat(scmConfiguration.getUrl()).isEqualTo("scm:svn:https:writable"); }