use of uk.gov.gchq.gaffer.operation.impl.GetWalks in project Gaffer by gchq.
the class GetWalksIT method shouldGetPathsWithSimpleGraphHook_1.
@Test
public void shouldGetPathsWithSimpleGraphHook_1() throws Exception {
// Given
final AddOperationsToChain graphHook = new AddOperationsToChain();
graphHook.setEnd(Lists.newArrayList(new Limit.Builder<>().resultLimit(1).build()));
final GraphConfig config = new GraphConfig.Builder().addHook(graphHook).graphId("integrationTest").build();
createGraph(config);
addDefaultElements();
final GetElements operation = new GetElements.Builder().directedType(DirectedType.DIRECTED).view(new View.Builder().edge(TestGroups.EDGE, new ViewElementDefinition.Builder().properties(TestPropertyNames.COUNT).build()).build()).inOutType(SeededGraphFilters.IncludeIncomingOutgoingType.OUTGOING).build();
final GetWalks op = new GetWalks.Builder().input(seedA).operations(operation, operation).build();
// When
final Iterable<Walk> results = graph.execute(op, getUser());
// Then
assertThat(Lists.newArrayList(results)).hasSize(1);
}
Aggregations