use of uk.gov.gchq.gaffer.store.StoreProperties in project Gaffer by gchq.
the class StoreIT method shouldCreateStoreAndValidateSchemas.
@Test
public void shouldCreateStoreAndValidateSchemas() throws IOException, SchemaException, StoreException {
// Given
final TestStore testStore = new TestStore();
final Schema schema = Schema.fromJson(StreamUtil.schemas(getClass()));
// When
testStore.initialise(schema, new StoreProperties());
// Then
assertTrue(testStore.getSchema().getEdges().containsKey(TestGroups.EDGE));
assertTrue(testStore.getSchema().getEdges().containsKey(TestGroups.EDGE));
assertTrue(testStore.getSchema().getEntities().containsKey(TestGroups.ENTITY));
assertTrue(testStore.getSchema().getEntities().containsKey(TestGroups.ENTITY));
assertFalse(testStore.getSchema().getEdges().containsKey(TestGroups.EDGE_2));
assertFalse(testStore.getSchema().getEntities().containsKey(TestGroups.ENTITY_2));
assertFalse(testStore.getSchema().getEdges().containsKey(TestGroups.EDGE_2));
assertFalse(testStore.getSchema().getEntities().containsKey(TestGroups.ENTITY_2));
assertTrue(testStore.getSchema().validate());
}
Aggregations