use of uk.gov.gchq.gaffer.operation.impl.compare.Min.Builder in project Gaffer by gchq.
the class MinTest method builderShouldCreatePopulatedOperation.
@Test
@Override
public void builderShouldCreatePopulatedOperation() {
// Given
final Min min = new Builder().input(new Entity.Builder().group(TestGroups.ENTITY).property("property", 1).build(), new Entity.Builder().group(TestGroups.ENTITY).property("property", 2).build()).comparators(new ElementPropertyComparator() {
@Override
public int compare(final Element e1, final Element e2) {
return 0;
}
}).build();
// Then
assertThat(min.getInput()).hasSize(2);
List properties = Streams.toStream(min.getInput()).map(e -> e.getProperty("property")).collect(toList());
assertThat(properties).containsOnly(1, 2);
}
Aggregations