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