Search in sources :

Example 36 with EmbeddedDatabaseBuilder

use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project camel by apache.

the class ElSqlConsumerDeleteTest method setUp.

@Before
public void setUp() throws Exception {
    db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase.sql").build();
    jdbcTemplate = new JdbcTemplate(db);
    super.setUp();
}
Also used : EmbeddedDatabaseBuilder(org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder) JdbcTemplate(org.springframework.jdbc.core.JdbcTemplate) Before(org.junit.Before)

Example 37 with EmbeddedDatabaseBuilder

use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project camel by apache.

the class ElSqlDataSourceTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    // this is the database we create with some initial data for our unit test
    db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase.sql").build();
    jndi.bind("dataSource", db);
    return jndi;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) EmbeddedDatabaseBuilder(org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder)

Example 38 with EmbeddedDatabaseBuilder

use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project camel by apache.

the class ElSqlProducerBatchTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    // this is the database we create with some initial data for our unit test
    db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase.sql").build();
    jndi.bind("dataSource", db);
    return jndi;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) EmbeddedDatabaseBuilder(org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder)

Example 39 with EmbeddedDatabaseBuilder

use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project camel by apache.

the class ElSqlProducerBodySimpleTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    // this is the database we create with some initial data for our unit test
    db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase.sql").build();
    jndi.bind("dataSource", db);
    return jndi;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) EmbeddedDatabaseBuilder(org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder)

Example 40 with EmbeddedDatabaseBuilder

use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project camel by apache.

the class ElSqlProducerStreamListTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    // this is the database we create with some initial data for our unit test
    db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase.sql").build();
    jndi.bind("dataSource", db);
    return jndi;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) EmbeddedDatabaseBuilder(org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder)

Aggregations

EmbeddedDatabaseBuilder (org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder)67 Before (org.junit.Before)17 JdbcTemplate (org.springframework.jdbc.core.JdbcTemplate)15 EmbeddedDatabase (org.springframework.jdbc.datasource.embedded.EmbeddedDatabase)15 JndiRegistry (org.apache.camel.impl.JndiRegistry)11 Bean (org.springframework.context.annotation.Bean)9 JdbcPropertyStore (org.ff4j.property.store.JdbcPropertyStore)5 FeatureStoreSpringJdbc (org.ff4j.springjdbc.store.FeatureStoreSpringJdbc)5 JdbcFeatureStore (org.ff4j.store.JdbcFeatureStore)5 JdbcQueryBuilder (org.ff4j.store.JdbcQueryBuilder)4 Test (org.junit.Test)4 PropertyStoreSpringJdbc (org.ff4j.springjdbc.store.PropertyStoreSpringJdbc)3 BeforeClass (org.junit.BeforeClass)3 Test (org.junit.jupiter.api.Test)3 PreparedStatement (java.sql.PreparedStatement)2 DefaultCamelContext (org.apache.camel.impl.DefaultCamelContext)2 JdbcEventRepository (org.ff4j.audit.repository.JdbcEventRepository)2 Connection (java.sql.Connection)1 Map (java.util.Map)1 Properties (java.util.Properties)1