Search in sources :

Example 21 with CountGroups

use of uk.gov.gchq.gaffer.operation.impl.CountGroups in project Gaffer by gchq.

the class OperationServiceIT method shouldReturnChunkedOperationChainGroupCounts.

@Test
public void shouldReturnChunkedOperationChainGroupCounts() throws IOException {
    // Given
    client.addElements(DEFAULT_ELEMENTS);
    // When
    final Response response = client.executeOperationChainChunked(new OperationChain.Builder().first(new GetAllElements()).then(new CountGroups()).build());
    // Then
    final List<GroupCounts> results = readChunkedResults(response, new GenericType<ChunkedInput<GroupCounts>>() {
    });
    assertThat(results).hasSize(1);
    final GroupCounts groupCounts = results.get(0);
    verifyGroupCounts(groupCounts);
}
Also used : Response(javax.ws.rs.core.Response) ChunkedInput(org.glassfish.jersey.client.ChunkedInput) CountGroups(uk.gov.gchq.gaffer.operation.impl.CountGroups) GetAllElements(uk.gov.gchq.gaffer.operation.impl.get.GetAllElements) GroupCounts(uk.gov.gchq.gaffer.data.GroupCounts) Test(org.junit.jupiter.api.Test)

Aggregations

CountGroups (uk.gov.gchq.gaffer.operation.impl.CountGroups)21 GroupCounts (uk.gov.gchq.gaffer.data.GroupCounts)16 Context (uk.gov.gchq.gaffer.store.Context)13 Test (org.junit.jupiter.api.Test)12 GetAllElements (uk.gov.gchq.gaffer.operation.impl.get.GetAllElements)12 Test (org.junit.Test)9 Store (uk.gov.gchq.gaffer.store.Store)8 User (uk.gov.gchq.gaffer.user.User)8 GetElements (uk.gov.gchq.gaffer.operation.impl.get.GetElements)6 Operation (uk.gov.gchq.gaffer.operation.Operation)5 OperationChain (uk.gov.gchq.gaffer.operation.OperationChain)5 DiscardOutput (uk.gov.gchq.gaffer.operation.impl.DiscardOutput)5 SplitStoreFromFile (uk.gov.gchq.gaffer.operation.impl.SplitStoreFromFile)5 GetAdjacentIds (uk.gov.gchq.gaffer.operation.impl.get.GetAdjacentIds)5 Response (javax.ws.rs.core.Response)4 CloseableIterable (uk.gov.gchq.gaffer.commonutil.iterable.CloseableIterable)4 Element (uk.gov.gchq.gaffer.data.element.Element)4 Builder (uk.gov.gchq.gaffer.operation.OperationChain.Builder)4 Count (uk.gov.gchq.gaffer.operation.impl.Count)4 Validate (uk.gov.gchq.gaffer.operation.impl.Validate)4