Search in sources :

Example 1 with Tab

use of com.thoughtworks.go.config.Tab 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));
        }
    });
}
Also used : Expectations(org.jmock.Expectations) Tab(com.thoughtworks.go.config.Tab) Tabs(com.thoughtworks.go.config.Tabs) JobIdentifier(com.thoughtworks.go.domain.JobIdentifier) JobInstanceDao(com.thoughtworks.go.server.dao.JobInstanceDao) Before(org.junit.Before)

Example 2 with Tab

use of com.thoughtworks.go.config.Tab in project gocd by gocd.

the class TabConfigRepresenter method fromJSON.

public static Tab fromJSON(JsonReader jsonReader) {
    Tab tab = new Tab();
    jsonReader.readStringIfPresent("name", tab::setName);
    jsonReader.readStringIfPresent("path", tab::setPath);
    return tab;
}
Also used : Tab(com.thoughtworks.go.config.Tab)

Example 3 with Tab

use of com.thoughtworks.go.config.Tab in project gocd by gocd.

the class TabConfigRepresenter method fromJSON.

public static Tab fromJSON(JsonReader jsonReader) {
    Tab tab = new Tab();
    jsonReader.readStringIfPresent("name", tab::setName);
    jsonReader.readStringIfPresent("path", tab::setPath);
    return tab;
}
Also used : Tab(com.thoughtworks.go.config.Tab)

Example 4 with Tab

use of com.thoughtworks.go.config.Tab in project gocd by gocd.

the class TabConfigRepresenter method fromJSON.

public static Tab fromJSON(JsonReader jsonReader) {
    Tab tab = new Tab();
    jsonReader.readStringIfPresent("name", tab::setName);
    jsonReader.readStringIfPresent("path", tab::setPath);
    return tab;
}
Also used : Tab(com.thoughtworks.go.config.Tab)

Aggregations

Tab (com.thoughtworks.go.config.Tab)4 Tabs (com.thoughtworks.go.config.Tabs)1 JobIdentifier (com.thoughtworks.go.domain.JobIdentifier)1 JobInstanceDao (com.thoughtworks.go.server.dao.JobInstanceDao)1 Expectations (org.jmock.Expectations)1 Before (org.junit.Before)1