use of com.thoughtworks.go.server.dao.JobInstanceDao 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.server.dao.JobInstanceDao in project gocd by gocd.
the class ArtifactsControllerTest method setUp.
@BeforeEach
public void setUp() {
consoleActivityMonitor = mock(ConsoleActivityMonitor.class);
restfulService = mock(RestfulService.class);
artifactService = mock(ArtifactsService.class);
consoleService = mock(ConsoleService.class);
jobInstanceDao = mock(JobInstanceDao.class);
systemEnvironment = mock(SystemEnvironment.class);
artifactsController = new ArtifactsController(artifactService, restfulService, mock(ZipArtifactCache.class), jobInstanceDao, consoleActivityMonitor, consoleService, systemEnvironment);
request = new MockHttpServletRequest();
}
use of com.thoughtworks.go.server.dao.JobInstanceDao in project gocd by gocd.
the class JobControllerTest method setUp.
@BeforeEach
public void setUp() throws Exception {
jobInstanceService = mock(JobInstanceService.class);
jobInstanceDao = mock(JobInstanceDao.class);
jobConfigService = mock(GoConfigService.class);
agentService = mock(AgentService.class);
stageService = mock(StageService.class);
response = new MockHttpServletResponse();
systemEnvironment = mock(SystemEnvironment.class);
pipelineService = mock(PipelineService.class);
restfulService = mock(RestfulService.class);
jobAgentMetadataDao = mock(JobAgentMetadataDao.class);
securityService = mock(SecurityService.class);
jobController = new JobController(jobInstanceService, agentService, jobInstanceDao, jobConfigService, pipelineService, restfulService, null, stageService, jobAgentMetadataDao, systemEnvironment, securityService);
}
Aggregations