Search in sources :

Example 6 with ElementTransformer

use of uk.gov.gchq.gaffer.data.element.function.ElementTransformer in project Gaffer by gchq.

the class ViewElementDefinitionTest method shouldFailToBuildElementDefinitionWhenPostTransformFilterSpecifiedTwice.

@Test(expected = IllegalArgumentException.class)
public void shouldFailToBuildElementDefinitionWhenPostTransformFilterSpecifiedTwice() {
    // Given
    final ElementTransformer transformer = mock(ElementTransformer.class);
    final ElementFilter postFilter = mock(ElementFilter.class);
    // When
    final ViewElementDefinition elementDef = new ViewElementDefinition.Builder().transientProperty(TestPropertyNames.PROP_1, String.class).transientProperty(TestPropertyNames.PROP_2, String.class).transformer(transformer).postTransformFilter(postFilter).postTransformFilter(postFilter).build();
}
Also used : ElementTransformer(uk.gov.gchq.gaffer.data.element.function.ElementTransformer) ElementFilter(uk.gov.gchq.gaffer.data.element.function.ElementFilter) Test(org.junit.Test)

Aggregations

ElementTransformer (uk.gov.gchq.gaffer.data.element.function.ElementTransformer)6 Test (org.junit.Test)5 ElementFilter (uk.gov.gchq.gaffer.data.element.function.ElementFilter)5 View (uk.gov.gchq.gaffer.data.elementdefinition.view.View)2 ViewElementDefinition (uk.gov.gchq.gaffer.data.elementdefinition.view.ViewElementDefinition)2 ArrayList (java.util.ArrayList)1 Edge (uk.gov.gchq.gaffer.data.element.Edge)1 Element (uk.gov.gchq.gaffer.data.element.Element)1 MeanTransform (uk.gov.gchq.gaffer.example.gettingstarted.function.transform.MeanTransform)1 DataGenerator4 (uk.gov.gchq.gaffer.example.gettingstarted.generator.DataGenerator4)1 ExampleFilterFunction (uk.gov.gchq.gaffer.function.ExampleFilterFunction)1 ExampleTransformFunction (uk.gov.gchq.gaffer.function.ExampleTransformFunction)1 ConsumerFunctionContext (uk.gov.gchq.gaffer.function.context.ConsumerFunctionContext)1 ConsumerProducerFunctionContext (uk.gov.gchq.gaffer.function.context.ConsumerProducerFunctionContext)1 Graph (uk.gov.gchq.gaffer.graph.Graph)1 EntitySeed (uk.gov.gchq.gaffer.operation.data.EntitySeed)1 AddElements (uk.gov.gchq.gaffer.operation.impl.add.AddElements)1 GetEdges (uk.gov.gchq.gaffer.operation.impl.get.GetEdges)1 User (uk.gov.gchq.gaffer.user.User)1