use of uk.gov.gchq.gaffer.accumulostore.MiniAccumuloStore in project Gaffer by gchq.
the class TableUtilsTest method shouldThrowExceptionIfTableNameIsNotSpecifiedWhenCreatingTable.
@Test
public void shouldThrowExceptionIfTableNameIsNotSpecifiedWhenCreatingTable() throws StoreException, TableExistsException {
// Given
final Schema schema = new Schema.Builder().type("int", Integer.class).type("string", String.class).type("boolean", Boolean.class).edge("EDGE", new SchemaEdgeDefinition.Builder().source("string").destination("string").directed("boolean").build()).build();
final AccumuloProperties properties = new AccumuloProperties();
properties.setStoreClass(PROPERTIES.getStoreClass());
properties.setZookeepers((PROPERTIES.getZookeepers()));
final AccumuloStore store = new MiniAccumuloStore();
assertThatIllegalArgumentException().isThrownBy(() -> store.initialise(null, schema, properties));
// When
assertThatExceptionOfType(AccumuloRuntimeException.class).isThrownBy(() -> TableUtils.createTable(store));
}
use of uk.gov.gchq.gaffer.accumulostore.MiniAccumuloStore in project Gaffer by gchq.
the class TableUtilsTest method shouldThrowExceptionIfTableNameIsNotSpecified.
@Test
public void shouldThrowExceptionIfTableNameIsNotSpecified() throws StoreException {
// Given
final Schema schema = new Schema.Builder().type("int", Integer.class).type("string", String.class).type("boolean", Boolean.class).edge("EDGE", new SchemaEdgeDefinition.Builder().source("string").destination("string").directed("boolean").build()).build();
final AccumuloProperties properties = new AccumuloProperties();
properties.setStoreClass(PROPERTIES.getStoreClass());
properties.setZookeepers(PROPERTIES.getZookeepers());
final AccumuloStore store = new MiniAccumuloStore();
assertThatIllegalArgumentException().isThrownBy(() -> store.initialise(null, schema, properties));
// When
assertThatExceptionOfType(AccumuloRuntimeException.class).isThrownBy(() -> TableUtils.ensureTableExists(store));
}
Aggregations