use of com.thoughtworks.go.config.Tabs in project gocd by gocd.
the class JobDetailServiceTest method setUp.
@Before
public void setUp() throws Exception {
artifactsService = context.mock(ArtifactsService.class);
configService = context.mock(GoConfigService.class);
jobInstanceDao = context.mock(JobInstanceDao.class);
jobDetailService = new JobDetailService(artifactsService, jobInstanceDao, configService);
final String jobName = "jobConfig1";
final int id = 1;
job = JobInstanceMother.completed(jobName, JobResult.Failed);
job.setId(id);
job.setIdentifier(new JobIdentifier("pipeline", "Label:1", "stage", "1", jobName));
final Tabs tabs = new Tabs();
customizedTab = new Tab("myArtifacts", "my/artifact/path");
tabs.add(customizedTab);
context.checking(new Expectations() {
{
one(configService).getCustomizedTabs("pipeline", "stage", jobName);
will(returnValue(tabs));
}
});
}
use of com.thoughtworks.go.config.Tabs in project gocd by gocd.
the class JobDetailPresentationModelJMockTest method setUp.
@Before
public void setUp() {
stubJobInstance = context.mock(JobInstance.class);
TrackingTool trackingTool = context.mock(TrackingTool.class);
artifactService = context.mock(ArtifactsService.class);
jobIdentifier = new JobIdentifier("pipeline", -1, "1", "stageName", "0", "build", 1L);
context.checking(new Expectations() {
{
allowing(stubJobInstance).getName();
will(returnValue("build"));
allowing(stubJobInstance).getId();
will(returnValue(1L));
allowing(stubJobInstance).getIdentifier();
will(returnValue(jobIdentifier));
}
});
Stage stage = StageMother.custom("stageName", stubJobInstance);
Pipeline pipeline = new Pipeline("pipeline", null, stage);
pipeline.setId(1L);
trackingTool = new TrackingTool();
jobDetailPresenter = new JobDetailPresentationModel(stubJobInstance, null, null, pipeline, new Tabs(), trackingTool, artifactService, new Properties(), null);
testFolder = TestFileUtil.createTempFolder("testFiles");
}
Aggregations