use of org.apache.openejb.config.sys.Resources in project tomee by apache.
the class CdiPasswordCipherTest method resources.
@Module
public Resources resources() {
final Resource resource = new Resource();
resource.setClassName(AResource.class.getName());
resource.setId("the");
resource.getProperties().setProperty("thePassword", "cipher:cdi:" + AdvancedAlgorithm.class.getName() + ":this");
final Resources resources = new Resources();
resources.getResource().add(resource);
return resources;
}
use of org.apache.openejb.config.sys.Resources in project tomee by apache.
the class AppContainerTest method resources.
@org.apache.openejb.testing.Module
public Resources resources() {
final Resources resources = new Resources();
final Container container = new Container();
container.setId("theMine");
container.setType("SINGLETON");
container.setClassName("org.apache.openejb.config.AppContainerTest$MySingletonContainer");
resources.getContainer().add(container);
return resources;
}
use of org.apache.openejb.config.sys.Resources in project tomee by apache.
the class ReadDescriptorsTest method testClassNotAvailable.
@Test
public void testClassNotAvailable() {
final Resource resource = new Resource();
resource.setClassName("not.a.real.Class");
final Resources resources = new Resources();
resources.add(resource);
final Resources checkedResources = ReadDescriptors.check(resources);
final Resource res = checkedResources.getResource().get(0);
Assert.assertEquals("true", res.getProperties().getProperty("Lazy"));
Assert.assertEquals("true", res.getProperties().getProperty("UseAppClassLoader"));
Assert.assertEquals("true", res.getProperties().getProperty("InitializeAfterDeployment"));
}
use of org.apache.openejb.config.sys.Resources in project tomee by apache.
the class ReadDescriptorsTest method testClassAvailable.
@Test
public void testClassAvailable() {
final Resource resource = new Resource();
resource.setClassName("org.apache.openejb.config.ReadDescriptorsTest");
final Resources resources = new Resources();
resources.add(resource);
final Resources checkedResources = ReadDescriptors.check(resources);
final Resource res = checkedResources.getResource().get(0);
Assert.assertNull(res.getProperties().getProperty("Lazy"));
Assert.assertNull(res.getProperties().getProperty("UseAppClassLoader"));
Assert.assertNull(res.getProperties().getProperty("InitializeAfterDeployment"));
}
use of org.apache.openejb.config.sys.Resources in project tomee by apache.
the class ReadDescriptorsTest method testClassAndTypeAvailable.
@Test
public void testClassAndTypeAvailable() {
final Resource resource = new Resource();
resource.setClassName("org.apache.openejb.config.ReadDescriptorsTest");
final Resources resources = new Resources();
resources.add(resource);
final Resources checkedResources = ReadDescriptors.check(resources);
final Resource res = checkedResources.getResource().get(0);
Assert.assertNull(res.getProperties().getProperty("Lazy"));
Assert.assertNull(res.getProperties().getProperty("UseAppClassLoader"));
Assert.assertNull(res.getProperties().getProperty("InitializeAfterDeployment"));
}
Aggregations