use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project ff4j by ff4j.
the class JdbcPropertyStoreTest method initJdbcPropertyStore.
@Test
public void initJdbcPropertyStore() {
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 JdbcFeatureStoreCoreTest 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();
JdbcFeatureStore jdbcStore = new JdbcFeatureStore();
jdbcStore.setDataSource(db);
return jdbcStore;
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project ff4j by ff4j.
the class JdbcFeatureStorePrefixTest method initStore.
/**
* {@inheritDoc}
*/
@Override
protected FeatureStore initStore() {
builder = new EmbeddedDatabaseBuilder();
db = builder.setType(//
EmbeddedDatabaseType.HSQL).addScript(//
"classpath:ddl-prefix-schema.sql").addScript("classpath:ddl-prefix-data.sql").build();
JdbcFeatureStore jdbcStore = new JdbcFeatureStore();
jdbcStore.setQueryBuilder(new JdbcQueryBuilder("T_FF4J_", "_01"));
jdbcStore.setDataSource(db);
return jdbcStore;
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project ff4j by ff4j.
the class JdbcFeatureStoreTestInvalidData method setUp.
/**
* {@inheritDoc}
*/
@Before
public void setUp() throws Exception {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
db = builder.setType(//
EmbeddedDatabaseType.HSQL).addScript(//
"classpath:schema-ddl.sql").addScript("classpath:ff-invalidstore.sql").build();
jdbcStore = new JdbcFeatureStore();
jdbcStore.setDataSource(db);
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project ff4j by ff4j.
the class SpringJdbcEmbedDataSourceStoreTest 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