Search in sources :

Example 41 with Configuration

use of org.apache.openejb.testing.Configuration in project tomee by apache.

the class DataSourceDefinitionPlaceHolderTest method properties.

@Configuration
public Properties properties() {
    final Properties properties = new Properties();
    properties.setProperty("jndi", "java:comp/env/superDS");
    properties.setProperty("driver", "org.hsqldb.jdbc.JDBCDataSource");
    properties.setProperty("user", "sa");
    properties.setProperty("pwd", "");
    properties.setProperty("url", "jdbc:hsqldb:mem:superDS");
    return properties;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Example 42 with Configuration

use of org.apache.openejb.testing.Configuration in project tomee by apache.

the class BeanValidationTest method config.

@Configuration
public Properties config() {
    final Properties p = new Properties();
    p.put("bvalDatabase", "new://Resource?type=DataSource");
    p.put("bvalDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.put("bvalDatabase.JdbcUrl", "jdbc:hsqldb:mem:bval");
    return p;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Example 43 with Configuration

use of org.apache.openejb.testing.Configuration in project tomee by apache.

the class ProducedExtendedEmTest method config.

@Configuration
public Properties config() {
    final Properties p = new Properties();
    p.put("ProducedExtendedEmTest", "new://Resource?type=DataSource");
    p.put("ProducedExtendedEmTest.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.put("ProducedExtendedEmTest.JdbcUrl", "jdbc:hsqldb:mem:produce-em-cdi");
    return p;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Example 44 with Configuration

use of org.apache.openejb.testing.Configuration in project tomee by apache.

the class EntitiesScanningTest method config.

@Configuration
public Properties config() {
    final Properties p = new Properties();
    p.put("cczczczedc", "new://Resource?type=DataSource");
    p.put("cczczczedc.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.put("cczczczedc.JdbcUrl", "jdbc:hsqldb:mem:cczccdzcz");
    return p;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Aggregations

Configuration (org.apache.openejb.testing.Configuration)44 Properties (java.util.Properties)43 File (java.io.File)5 DbcpDataSourceCreator (org.apache.openejb.resource.jdbc.dbcp.DbcpDataSourceCreator)2 DataSourceCreator (org.apache.openejb.resource.jdbc.pool.DataSourceCreator)2 Path (java.nio.file.Path)1 PropertiesResourceProvider (org.apache.openejb.api.resource.PropertiesResourceProvider)1 OpenEjbConfiguration (org.apache.openejb.assembler.classic.OpenEjbConfiguration)1 IsDifferentXaDataSourceWrapper (org.apache.openejb.resource.jdbc.xa.IsDifferentXaDataSourceWrapper)1 PropertiesBuilder (org.apache.openejb.testng.PropertiesBuilder)1 org.hsqldb.jdbcDriver (org.hsqldb.jdbcDriver)1