Search in sources :

Example 16 with Resources

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

the class ResourcesTest method shouldCompareBasedOnResourceListItHas.

@Test
public void shouldCompareBasedOnResourceListItHas() {
    Resources resourcesA = new Resources();
    Resources resourcesB = new Resources();
    resourcesA.add(new Resource("xyz"));
    resourcesA.add(new Resource("aaa"));
    resourcesB.add(new Resource("xyz"));
    resourcesB.add(new Resource("bbb"));
    assertThat(resourcesA.compareTo(resourcesB), is(lessThan(0)));
    assertThat(resourcesB.compareTo(resourcesA), is(greaterThan(0)));
}
Also used : Resource(com.thoughtworks.go.config.Resource) Resources(com.thoughtworks.go.config.Resources) Test(org.junit.Test)

Aggregations

Resources (com.thoughtworks.go.config.Resources)16 Test (org.junit.Test)16 Resource (com.thoughtworks.go.config.Resource)13 Agents (com.thoughtworks.go.config.Agents)2 AgentConfig (com.thoughtworks.go.config.AgentConfig)1 PipelineConfig (com.thoughtworks.go.config.PipelineConfig)1 ArrayList (java.util.ArrayList)1