Search in sources :

Example 1 with AbstractMaterial

use of com.thoughtworks.go.config.materials.AbstractMaterial in project gocd by gocd.

the class AbstractMaterialTest method shouldReturnFullNameIfTheLengthIsLessThanGivenThreshold.

@Test
public void shouldReturnFullNameIfTheLengthIsLessThanGivenThreshold() throws Exception {
    AbstractMaterial material = new TestMaterial("foo_bar_baz_quuz_ban");
    assertThat(material.getTruncatedDisplayName()).isEqualTo("foo_bar_baz_quuz_ban");
}
Also used : AbstractMaterial(com.thoughtworks.go.config.materials.AbstractMaterial) Test(org.junit.jupiter.api.Test)

Example 2 with AbstractMaterial

use of com.thoughtworks.go.config.materials.AbstractMaterial in project gocd by gocd.

the class AbstractMaterialTest method shouldReturnTruncatedNameIfTheLengthIsGreaterThanGivenThreshold.

@Test
public void shouldReturnTruncatedNameIfTheLengthIsGreaterThanGivenThreshold() throws Exception {
    AbstractMaterial material = new TestMaterial("foo_bar_baz_quuz_ban_pavan");
    assertThat(material.getTruncatedDisplayName()).isEqualTo("foo_bar_ba..._ban_pavan");
}
Also used : AbstractMaterial(com.thoughtworks.go.config.materials.AbstractMaterial) Test(org.junit.jupiter.api.Test)

Example 3 with AbstractMaterial

use of com.thoughtworks.go.config.materials.AbstractMaterial in project gocd by gocd.

the class AbstractMaterialTest method shouldNotIgnoreForSchedulingByDefault_sinceItOnlyAppliesToDependencyMaterial.

@Test
public void shouldNotIgnoreForSchedulingByDefault_sinceItOnlyAppliesToDependencyMaterial() {
    AbstractMaterial material = new TestMaterial("salty_sumatran_rhinoceros");
    assertThat(material.ignoreForScheduling()).isFalse();
}
Also used : AbstractMaterial(com.thoughtworks.go.config.materials.AbstractMaterial) Test(org.junit.jupiter.api.Test)

Aggregations

AbstractMaterial (com.thoughtworks.go.config.materials.AbstractMaterial)3 Test (org.junit.jupiter.api.Test)3