use of org.ff4j.property.store.JdbcPropertyStore in project ff4j by ff4j.
the class JdbcPropertyStoreErrorTest method testgetReadAll.
@Test(expected = PropertyAccessException.class)
public void testgetReadAll() throws SQLException {
DataSource mockDS = Mockito.mock(DataSource.class);
doThrow(new SQLException()).when(mockDS).getConnection();
JdbcPropertyStore jrepo = new JdbcPropertyStore(mockDS);
jrepo.setDataSource(mockDS);
jrepo.readAllProperties();
}
use of org.ff4j.property.store.JdbcPropertyStore in project ff4j by ff4j.
the class JdbcPropertyStoreSchemaTest method initStore.
/**
* {@inheritDoc}
*/
public void initStore() {
builder = new EmbeddedDatabaseBuilder();
db = builder.setType(EmbeddedDatabaseType.HSQL).build();
testedStore = new JdbcPropertyStore();
testedStore.setDataSource(db);
}
use of org.ff4j.property.store.JdbcPropertyStore in project ff4j by ff4j.
the class JdbcPropertyStoreTest method testClear.
@Test
public void testClear() {
EmbeddedDatabaseBuilder b2 = new EmbeddedDatabaseBuilder();
EmbeddedDatabase db2 = //
b2.setType(EmbeddedDatabaseType.HSQL).build();
JdbcPropertyStore jdbcStore2 = new JdbcPropertyStore(db2, "ff4j.xml");
Assert.assertNotNull(jdbcStore2);
}
use of org.ff4j.property.store.JdbcPropertyStore in project ff4j by ff4j.
the class JdbcPropertyStoreTest method initPropertyStore.
/**
* {@inheritDoc}
*/
@Override
protected PropertyStore initPropertyStore() {
builder = new EmbeddedDatabaseBuilder();
db = //
builder.setType(EmbeddedDatabaseType.HSQL).addScript(//
"classpath:schema-ddl.sql").addScript(//
"classpath:ff-store.sql").build();
return new JdbcPropertyStore(db);
}
Aggregations