use of jetbrains.buildServer.serverSide.SQueuedBuild in project teamcity-rest by JetBrains.
the class ChangeStatusTest method testQueued.
public void testQueued() {
final BuildTypeImpl buildConf = registerBuildType("buildConf1", "project");
VcsRootInstance root1 = prepareSingleVscRoot(buildConf);
SVcsModification m20 = myFixture.addModification(modification().in(root1).version("20").parentVersions("10"));
SQueuedBuild queuedBuild = build().in(buildConf).onModifications(m20).addToQueue();
ChangeStatus status = new ChangeStatus(myFixture.getChangeStatusProvider().getMergedChangeStatus(m20), Fields.ALL_NESTED, getBeanContext(myFixture));
queuedBuild.removeFromQueue(myUser, "comment");
assertEquals(0, (int) status.getFinished());
assertEquals(0, (int) status.getSuccessful());
assertEquals(0, (int) status.getFailed());
assertEquals(0, (int) status.getPendingBuildTypes());
assertEquals(1, (int) status.getQueuedBuildsCount());
}
Aggregations