use of com.thoughtworks.go.domain.materials.mercurial.StringRevision in project gocd by gocd.
the class P4MaterialTestBase method shouldMapDirectoryInRepoToDirectoryUnderClientRoot.
@Test
public void shouldMapDirectoryInRepoToDirectoryUnderClientRoot() throws Exception {
P4Material p4Material = p4Fixture.material("//depot/lib/... //cws/release1/...");
updateMaterial(p4Material, new StringRevision("2"));
assertThat(getContainedFileNames(new File(clientFolder, "release1")), hasItem("junit.jar"));
}
use of com.thoughtworks.go.domain.materials.mercurial.StringRevision in project gocd by gocd.
the class TfsSDKCommandTest method shouldReturnChangeSetsFromAPreviouslyKnownRevisionUptilTheLatest.
@Test
public void shouldReturnChangeSetsFromAPreviouslyKnownRevisionUptilTheLatest() throws Exception {
Changeset[] changeSets = getChangeSets(42);
when(client.queryHistory(eq(TFS_PROJECT), any(ChangesetVersionSpec.class), anyInt())).thenReturn(changeSets);
TfsSDKCommand spy = spy(tfsCommand);
doReturn(null).when(spy).getModifiedFiles(changeSets[0]);
List<Modification> modifications = spy.modificationsSince(null, new StringRevision("2"));
assertThat(modifications.isEmpty(), is(false));
verify(client, times(2)).queryHistory(eq(TFS_PROJECT), any(ChangesetVersionSpec.class), anyInt());
}
Aggregations