use of com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Changeset 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());
}
use of com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Changeset in project gocd by gocd.
the class TfsSDKCommandTest method getChangeSets.
private Changeset[] getChangeSets(int changeSetID) {
Changeset oneChangeSet = new Changeset("owner", "comment", null, null);
oneChangeSet.setChangesetID(changeSetID);
return new Changeset[] { oneChangeSet };
}
use of com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Changeset in project gocd by gocd.
the class TfsSDKCommandTest method getChangeSets.
private Changeset[] getChangeSets(int changeSetID) {
Changeset oneChangeSet = new Changeset("owner", "comment", null, null);
oneChangeSet.setChangesetID(changeSetID);
return new Changeset[] { oneChangeSet };
}
use of com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Changeset in project gocd by gocd.
the class TfsSDKCommandTest method shouldReturnChangeSetsFromAPreviouslyKnownRevisionUptilTheLatest.
@Test
void shouldReturnChangeSetsFromAPreviouslyKnownRevisionUptilTheLatest() {
Changeset[] changeSets = getChangeSets(42);
when(client.queryHistory(eq(TFS_PROJECT), or(isNull(), 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()).isFalse();
verify(client, times(2)).queryHistory(eq(TFS_PROJECT), or(isNull(), any(ChangesetVersionSpec.class)), anyInt());
}
Aggregations