Search in sources :

Example 16 with PipelineLabel

use of com.thoughtworks.go.domain.label.PipelineLabel in project gocd by gocd.

the class PipelineLabelTest method shouldCreateLabelIfTemplateIsProvided.

@Test
public void shouldCreateLabelIfTemplateIsProvided() {
    PipelineLabel label = PipelineLabel.create("Pipeline-${ABC}");
    assertThat(label, Is.is(new PipelineLabel("Pipeline-${ABC}")));
}
Also used : PipelineLabel(com.thoughtworks.go.domain.label.PipelineLabel) Test(org.junit.Test)

Example 17 with PipelineLabel

use of com.thoughtworks.go.domain.label.PipelineLabel in project gocd by gocd.

the class PipelineLabelTest method ensureLabelIsReplaced.

private void ensureLabelIsReplaced(String name) {
    PipelineLabel label = getReplacedLabelFor(name, String.format("release-${%s}", name));
    assertThat(label.toString(), is("release-" + ModificationsMother.currentRevision()));
}
Also used : PipelineLabel(com.thoughtworks.go.domain.label.PipelineLabel)

Example 18 with PipelineLabel

use of com.thoughtworks.go.domain.label.PipelineLabel in project gocd by gocd.

the class PipelineLabelTest method shouldIgnoreCaseInCountingTemplate.

@Test
public void shouldIgnoreCaseInCountingTemplate() throws Exception {
    PipelineLabel label = PipelineLabel.create(testingTemplate);
    label.updateLabel(getNamedRevision(2));
    assertThat(label.toString(), is("testing.2.label"));
}
Also used : PipelineLabel(com.thoughtworks.go.domain.label.PipelineLabel) Test(org.junit.Test)

Aggregations

PipelineLabel (com.thoughtworks.go.domain.label.PipelineLabel)18 Test (org.junit.Test)14 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)7 Modification (com.thoughtworks.go.domain.materials.Modification)3 ScmMaterial (com.thoughtworks.go.config.materials.ScmMaterial)2 HashMap (java.util.HashMap)2 HgMaterial (com.thoughtworks.go.config.materials.mercurial.HgMaterial)1 SvnMaterial (com.thoughtworks.go.config.materials.svn.SvnMaterial)1