use of uk.gov.gchq.gaffer.store.operation.add.AddStorePropertiesToLibrary.Builder in project Gaffer by gchq.
the class AddStorePropertiesToLibraryTest method setUp.
@BeforeAll
public static void setUp() throws Exception {
storeProperties = new StoreProperties();
op = new Builder().storeProperties(storeProperties).parentPropertiesId(VALUE_1).id(TEST_ID).build();
}
use of uk.gov.gchq.gaffer.store.operation.add.AddStorePropertiesToLibrary.Builder in project Gaffer by gchq.
the class AddStorePropertiesToLibraryHandlerTest method shouldAddSchemaWithGraphLibrary.
@Test
public void shouldAddSchemaWithGraphLibrary() throws Exception {
HashMapGraphLibrary library = new HashMapGraphLibrary();
store.setGraphLibrary(library);
store.initialise(TEST_STORE_ID, new Schema(), new StoreProperties());
store.execute(new Builder().storeProperties(props).id(TEST_PROPS_ID).build(), new Context(StoreUser.blankUser()));
StoreProperties actualProps = library.getProperties(TEST_PROPS_ID);
assertEquals(props.getProperties(), actualProps.getProperties());
}
use of uk.gov.gchq.gaffer.store.operation.add.AddStorePropertiesToLibrary.Builder in project Gaffer by gchq.
the class AddStorePropertiesToLibraryHandlerTest method shouldThrowWithNoGraphLibrary.
@Test
public void shouldThrowWithNoGraphLibrary() throws Exception {
store.initialise(TEST_STORE_ID, new Schema(), new StoreProperties());
assertThatExceptionOfType(Exception.class).isThrownBy(() -> store.execute(new Builder().storeProperties(props).id(TEST_PROPS_ID).build(), new Context(StoreUser.blankUser()))).withMessage(String.format("Operation class %s is not supported by the %s.", AddStorePropertiesToLibrary.class.getName(), TestAddToGraphLibraryImpl.class.getSimpleName()));
}
Aggregations