Search in sources :

Example 11 with Configuration

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

the class AppComposerAsJUnitRuleTest 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 12 with Configuration

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

the class ReloadableEntityManagerFactoryTest method config.

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

Example 13 with Configuration

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

the class ResourceLocalCdiEmTest method config.

@Configuration
public Properties config() {
    // avoid linkage error on mac, only used for tests so don't need to add it in Core
    JULLoggerFactory.class.getName();
    final Properties p = new Properties();
    p.put("ResourceLocalCdiEmTest", "new://Resource?type=DataSource");
    p.put("ResourceLocalCdiEmTest.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.put("ResourceLocalCdiEmTest.JdbcUrl", "jdbc:hsqldb:mem:ResourceLocalCdiEmTest");
    p.put("ResourceLocalCdiEmTest.JtaManaged", "false");
    return p;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Example 14 with Configuration

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

the class ResourceLocalEmInjectionTest method config.

@Configuration
public Properties config() {
    // avoid linkage error on mac, only used for tests so don't need to add it in Core
    JULLoggerFactory.class.getName();
    final Properties p = new Properties();
    p.put("ResourceLocalEmInjectionTest", "new://Resource?type=DataSource");
    p.put("ResourceLocalEmInjectionTest.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.put("ResourceLocalEmInjectionTest.JdbcUrl", "jdbc:hsqldb:mem:ResourceLocalEmInjectionTest");
    return p;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Example 15 with Configuration

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

the class ClasspathAPITest method config.

@Configuration
public Properties config() {
    // using relative path avoids issue between IDE/surefire (. = target for surefire) and URI format
    final Path here = new File(".").getAbsoluteFile().toPath();
    final Path classes = jarLocation(ClasspathAPITest.class).getAbsoluteFile().toPath();
    return new PropertiesBuilder().p("r", "new://Resource?class-name=org.apache.openejb.resource.ClasspathAPITest$MyImpl&" + "classpath-api=java.util.concurrent.Callable&" + "classpath=" + classes.relativize(here).toString().replace(File.separator, "/")).build();
}
Also used : Path(java.nio.file.Path) File(java.io.File) PropertiesBuilder(org.apache.openejb.testng.PropertiesBuilder) 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