Search in sources :

Example 1 with JobConfigs

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

the class BuildPlansTest method shouldBombIfABuildPlanWithSameNameWithDifferentCaseIsAdded.

@Test
public void shouldBombIfABuildPlanWithSameNameWithDifferentCaseIsAdded() throws Exception {
    JobConfigs jobConfigs = new JobConfigs();
    jobConfigs.add(jobConfig("Test"));
    try {
        jobConfigs.add(jobConfig("test"));
        fail("Should not be able to add build plan with the same name again");
    } catch (RuntimeException ignored) {
    }
}
Also used : JobConfigs(com.thoughtworks.go.config.JobConfigs) Test(org.junit.Test)

Example 2 with JobConfigs

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

the class BuildPlansTest method shouldFindBuildPlanByName.

@Test
public void shouldFindBuildPlanByName() {
    JobConfigs jobConfigs = new JobConfigs();
    jobConfigs.add(jobConfig("Test"));
    assertThat(jobConfigs.containsName(new CaseInsensitiveString("Poo")), is(false));
}
Also used : JobConfigs(com.thoughtworks.go.config.JobConfigs) CaseInsensitiveString(com.thoughtworks.go.config.CaseInsensitiveString) Test(org.junit.Test)

Example 3 with JobConfigs

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

the class BuildPlansTest method shouldBombIfABuildPlanWithSameNameIsAdded.

@Test
public void shouldBombIfABuildPlanWithSameNameIsAdded() throws Exception {
    JobConfigs jobConfigs = new JobConfigs();
    jobConfigs.add(jobConfig("Test"));
    try {
        jobConfigs.add(jobConfig("Test"));
        fail("Should not be able to add build plan with the same name again");
    } catch (RuntimeException ignored) {
    }
}
Also used : JobConfigs(com.thoughtworks.go.config.JobConfigs) Test(org.junit.Test)

Example 4 with JobConfigs

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

the class PipelineServiceTriangleDependencyTest method jobs.

private JobConfigs jobs() {
    JobConfigs configs = new JobConfigs();
    configs.add(new JobConfig("job"));
    return configs;
}
Also used : JobConfigs(com.thoughtworks.go.config.JobConfigs) JobConfig(com.thoughtworks.go.config.JobConfig)

Example 5 with JobConfigs

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

the class PipelineServiceTest method jobs.

private JobConfigs jobs() {
    JobConfigs configs = new JobConfigs();
    configs.add(new JobConfig("job"));
    return configs;
}
Also used : JobConfigs(com.thoughtworks.go.config.JobConfigs) JobConfig(com.thoughtworks.go.config.JobConfig)

Aggregations

JobConfigs (com.thoughtworks.go.config.JobConfigs)11 Test (org.junit.Test)7 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)5 JobConfig (com.thoughtworks.go.config.JobConfig)4 PipelineConfig (com.thoughtworks.go.config.PipelineConfig)3 PipelineTemplateConfig (com.thoughtworks.go.config.PipelineTemplateConfig)2 StageConfig (com.thoughtworks.go.config.StageConfig)2 DependencyMaterial (com.thoughtworks.go.config.materials.dependency.DependencyMaterial)2 DependencyMaterialRevision (com.thoughtworks.go.domain.materials.dependency.DependencyMaterialRevision)2 TemplatesConfig (com.thoughtworks.go.config.TemplatesConfig)1 Materials (com.thoughtworks.go.config.materials.Materials)1 DependencyMaterialConfig (com.thoughtworks.go.config.materials.dependency.DependencyMaterialConfig)1 HgMaterial (com.thoughtworks.go.config.materials.mercurial.HgMaterial)1 MaterialRevision (com.thoughtworks.go.domain.MaterialRevision)1 Modification (com.thoughtworks.go.domain.materials.Modification)1 PipelineInstanceModels (com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModels)1 PipelineConfigDependencyGraph (com.thoughtworks.go.server.domain.PipelineConfigDependencyGraph)1 Date (java.util.Date)1 Map (java.util.Map)1 Before (org.junit.Before)1