Search in sources :

Example 1 with SingleUseMapStore

use of uk.gov.gchq.gaffer.mapstore.SingleUseMapStore in project Gaffer by gchq.

the class AddElementsHandlerTest method shouldAddWithNoGroupByProperties.

@Test
public void shouldAddWithNoGroupByProperties() throws OperationException, StoreException {
    // Given
    final AddElements addElements = mock(AddElements.class);
    given(addElements.getInput()).willReturn((Iterable) Arrays.asList(new Edge("group1")));
    final Context context = mock(Context.class);
    final MapStore store = new SingleUseMapStore();
    store.initialise("graphId1", new Schema(), new MapStoreProperties());
    final AddElementsHandler handler = new AddElementsHandler();
    // When / Then - should not throw NPE
    handler.doOperation(addElements, context, store);
}
Also used : AddElements(uk.gov.gchq.gaffer.operation.impl.add.AddElements) Context(uk.gov.gchq.gaffer.store.Context) SingleUseMapStore(uk.gov.gchq.gaffer.mapstore.SingleUseMapStore) Schema(uk.gov.gchq.gaffer.store.schema.Schema) MapStore(uk.gov.gchq.gaffer.mapstore.MapStore) SingleUseMapStore(uk.gov.gchq.gaffer.mapstore.SingleUseMapStore) Edge(uk.gov.gchq.gaffer.data.element.Edge) MapStoreProperties(uk.gov.gchq.gaffer.mapstore.MapStoreProperties) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 Edge (uk.gov.gchq.gaffer.data.element.Edge)1 MapStore (uk.gov.gchq.gaffer.mapstore.MapStore)1 MapStoreProperties (uk.gov.gchq.gaffer.mapstore.MapStoreProperties)1 SingleUseMapStore (uk.gov.gchq.gaffer.mapstore.SingleUseMapStore)1 AddElements (uk.gov.gchq.gaffer.operation.impl.add.AddElements)1 Context (uk.gov.gchq.gaffer.store.Context)1 Schema (uk.gov.gchq.gaffer.store.schema.Schema)1