use of uk.gov.gchq.gaffer.types.TypeSubTypeValue in project Gaffer by gchq.
the class TypeSubTypeValueToTupleTest method shouldGetAndSetUsingCompositeFunction.
@Test
public void shouldGetAndSetUsingCompositeFunction() {
// Given
final TypeSubTypeValue typeSubTypeValue = new TypeSubTypeValue("type", "subType", "value");
final Function<Object, Object> compositeFunction = new FunctionComposite(Lists.newArrayList(new TypeSubTypeValueToTuple(), new TupleAdaptedFunctionComposite.Builder().select(new String[] { "value" }).execute(new FunctionComposite(Arrays.asList(new Length(), new ToString()))).project(new String[] { "type" }).build()));
// When
compositeFunction.apply(typeSubTypeValue);
// Then
assertEquals(new TypeSubTypeValue("5", "subType", "value"), typeSubTypeValue);
}
Aggregations