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)));
}
Aggregations