use of com.thoughtworks.go.config.materials.svn.SvnMaterial in project gocd by gocd.
the class SvnMaterialTest method shouldReturnNotEqualsWhenUserNameIsChanged.
@Test
public void shouldReturnNotEqualsWhenUserNameIsChanged() throws Exception {
SvnMaterial material = MaterialsMother.svnMaterial("url", "svnDir", "userName", null, false, "*.txt");
SvnMaterial other = MaterialsMother.svnMaterial("url", "svnDir", "userName1", null, false, "*.txt");
assertThat(material, is(not(other)));
}
use of com.thoughtworks.go.config.materials.svn.SvnMaterial in project gocd by gocd.
the class SvnMaterialTest method shouldReturnEqualsWhenEverythingIsSame.
@Test
public void shouldReturnEqualsWhenEverythingIsSame() throws Exception {
SvnMaterial material = MaterialsMother.svnMaterial("URL", "dummy-folder", "userName", "password", true, "*.doc");
SvnMaterial other = MaterialsMother.svnMaterial("URL", "dummy-folder", "userName", "password", true, "*.doc");
assertThat(other, is(material));
}
use of com.thoughtworks.go.config.materials.svn.SvnMaterial in project gocd by gocd.
the class SvnMaterialTest method shouldAddTheForwardSlashAndApplyThePattern.
@Test
public void shouldAddTheForwardSlashAndApplyThePattern() throws Exception {
SvnMaterial material = MaterialsMother.svnMaterial();
assertThat(material.matches("/a.doc", "a.doc"), is(true));
assertThat(material.matches("a.doc", "a.doc"), is(false));
}
use of com.thoughtworks.go.config.materials.svn.SvnMaterial in project gocd by gocd.
the class SvnMaterialTest method shouldReturnNotEqualsWhenUrlIsChanged.
@Test
public void shouldReturnNotEqualsWhenUrlIsChanged() throws Exception {
SvnMaterial material = MaterialsMother.svnMaterial("A");
SvnMaterial other = MaterialsMother.svnMaterial("B");
assertThat(material, is(not(other)));
}
use of com.thoughtworks.go.config.materials.svn.SvnMaterial in project gocd by gocd.
the class SvnMaterialTest method shouldGenerateSqlCriteriaMapInSpecificOrder.
@Test
public void shouldGenerateSqlCriteriaMapInSpecificOrder() throws Exception {
SvnMaterial material = new SvnMaterial("url", "username", "password", true);
Map<String, Object> map = material.getSqlCriteria();
assertThat(map.size(), is(4));
Iterator<Map.Entry<String, Object>> iter = map.entrySet().iterator();
assertThat(iter.next().getKey(), is("type"));
assertThat(iter.next().getKey(), is("url"));
assertThat(iter.next().getKey(), is("username"));
assertThat(iter.next().getKey(), is("checkExternals"));
}
Aggregations