use of com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModel in project gocd by gocd.
the class PipelineHistoryGroupTest method shouldMatchSpecifiedItem.
@Test
public void shouldMatchSpecifiedItem() throws Exception {
PipelineInstanceGroupModel group = new PipelineInstanceGroupModel();
group.getStages().addAll(asList(new SimpleInfo("stage1", true), new SimpleInfo("stage2", false)));
PipelineInstanceModel pipelineInstanceModel = PipelineHistoryItemMother.custom(StageHistoryItemMother.custom("stage1", true), StageHistoryItemMother.custom("stage2", false));
assertThat(group.hasSameStagesAs(pipelineInstanceModel), is(true));
}
use of com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModel in project gocd by gocd.
the class PipelineHistoryGroupTest method shouldNotMatchSpecifiedItemIfApprovalTypeNotMatched.
@Test
public void shouldNotMatchSpecifiedItemIfApprovalTypeNotMatched() throws Exception {
PipelineInstanceGroupModel group = new PipelineInstanceGroupModel();
group.getStages().addAll(asList(new SimpleInfo("stage1", true), new SimpleInfo("stage2", false)));
PipelineInstanceModel pipelineInstanceModel = PipelineHistoryItemMother.custom(StageHistoryItemMother.custom("stage1", true), StageHistoryItemMother.custom("stage2", true));
assertThat(group.hasSameStagesAs(pipelineInstanceModel), is(false));
}
use of com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModel in project gocd by gocd.
the class PipelineHistoryGroupTest method shouldNotMatchSpecifiedItemIfSizeNotMatched.
@Test
public void shouldNotMatchSpecifiedItemIfSizeNotMatched() throws Exception {
PipelineInstanceGroupModel group = new PipelineInstanceGroupModel();
group.getStages().addAll(asList(new SimpleInfo("stage1", true), new SimpleInfo("stage2", false)));
PipelineInstanceModel pipelineInstanceModel = PipelineHistoryItemMother.custom(StageHistoryItemMother.custom("stage1", true), StageHistoryItemMother.custom("stage2", false), StageHistoryItemMother.custom("stage3", false));
assertThat(group.hasSameStagesAs(pipelineInstanceModel), is(false));
}
use of com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModel in project gocd by gocd.
the class PipelineHistoryGroupTest method emptyGroupShouldNotMatchAnyItem.
@Test
public void emptyGroupShouldNotMatchAnyItem() throws Exception {
PipelineInstanceGroupModel group = new PipelineInstanceGroupModel();
PipelineInstanceModel pipelineInstanceModel = PipelineHistoryItemMother.custom(StageHistoryItemMother.custom("stage1", true), StageHistoryItemMother.custom("stage2", false));
assertThat(group.hasSameStagesAs(pipelineInstanceModel), is(false));
}
use of com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModel in project gocd by gocd.
the class PipelineSqlMapDaoTest method pimFor.
private PipelineInstanceModel pimFor(String p1, int counter) {
PipelineInstanceModel model = new PipelineInstanceModel(p1, counter, String.valueOf(counter), BuildCause.createManualForced(), new StageInstanceModels());
model.setId(new Random().nextLong());
return model;
}
Aggregations