Search in sources :

Example 1 with Match

use of uk.gov.gchq.gaffer.operation.impl.join.match.Match in project Gaffer by gchq.

the class JoinTest method builderShouldCreatePopulatedOperation.

@Test
@Override
public void builderShouldCreatePopulatedOperation() {
    // Given
    final Join op = new Join.Builder<>().input(Arrays.asList(1, 2, 3)).operation(new GetAllElements.Builder().build()).matchMethod(new TestMatchImpl()).matchKey(MatchKey.LEFT).joinType(JoinType.INNER).flatten(false).collectionLimit(10).build();
    // Then
    assertEquals(Arrays.asList(1, 2, 3), op.getInput());
    assertTrue(op.getOperation() instanceof GetAllElements);
    assertEquals(JoinType.INNER, op.getJoinType());
    assertTrue(op.getMatchMethod() instanceof Match);
    assertEquals(MatchKey.LEFT, op.getMatchKey());
    assertTrue(op.isFlatten() instanceof Boolean);
    assertTrue(op.getCollectionLimit().equals(10));
}
Also used : GetAllElements(uk.gov.gchq.gaffer.operation.impl.get.GetAllElements) Join(uk.gov.gchq.gaffer.operation.impl.join.Join) Match(uk.gov.gchq.gaffer.operation.impl.join.match.Match) OperationTest(uk.gov.gchq.gaffer.operation.OperationTest) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 OperationTest (uk.gov.gchq.gaffer.operation.OperationTest)1 GetAllElements (uk.gov.gchq.gaffer.operation.impl.get.GetAllElements)1 Join (uk.gov.gchq.gaffer.operation.impl.join.Join)1 Match (uk.gov.gchq.gaffer.operation.impl.join.match.Match)1