use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder 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.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder 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);
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project ff4j by ff4j.
the class JdbcFeatureStoreSchemaTest method initStore.
/**
* {@inheritDoc}
* @throws SQLException
*/
public void initStore() throws SQLException {
builder = new EmbeddedDatabaseBuilder();
db = builder.setType(EmbeddedDatabaseType.HSQL).build();
PreparedStatement prepareStatement = db.getConnection().prepareStatement("CREATE SCHEMA FF4J");
prepareStatement.executeUpdate();
prepareStatement = db.getConnection().prepareStatement("CREATE SCHEMA FF4J_2");
prepareStatement.executeUpdate();
testedStore = new JdbcFeatureStore();
testedStore.setDataSource(db);
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project ff4j by ff4j.
the class JdbcFeatureStoreXmlTest method initStore.
/**
* {@inheritDoc}
*/
@Override
protected FeatureStore initStore() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
db = builder.setType(EmbeddedDatabaseType.HSQL).addScript("classpath:schema-ddl.sql").build();
return new JdbcFeatureStore(db, "ff4j.xml");
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project ff4j by ff4j.
the class SpringJdbcFeatureStoreTestInitXml method initStore.
/**
* {@inheritDoc}
*/
@Override
protected FeatureStore initStore() {
builder = new EmbeddedDatabaseBuilder();
db = //
builder.setType(EmbeddedDatabaseType.HSQL).addScript(//
"classpath:schema-ddl.sql").addScript(//
"classpath:ff-store.sql").build();
FeatureStoreSpringJdbc jdbcStore = new FeatureStoreSpringJdbc();
jdbcStore.setDataSource(db);
jdbcStore.getJdbcTemplate();
return jdbcStore;
}
Aggregations