use of org.apache.openejb.assembler.classic.EnterpriseBeanInfo in project tomee by apache.
the class BusinessInterfacesTest method testLemonStrict.
public void testLemonStrict() throws Exception {
setUp();
strict(true);
final Map<String, EnterpriseBeanInfo> beans = deploy(LemonOneBean.class, LemonTwoBean.class, LemonThreeBean.class, LemonFourBean.class, LemonFiveBean.class, LemonSixBean.class);
EnterpriseBeanInfo beanInfo;
beanInfo = beans.get("LemonOneBean");
assertEquals(list(), sort(beanInfo.businessLocal));
assertEquals(list(), sort(beanInfo.businessRemote));
assertTrue(beanInfo.localbean);
beanInfo = beans.get("LemonTwoBean");
assertEquals(list(), sort(beanInfo.businessLocal));
assertEquals(list(), sort(beanInfo.businessRemote));
assertTrue(beanInfo.localbean);
beanInfo = beans.get("LemonThreeBean");
assertEquals(list(), sort(beanInfo.businessLocal));
assertEquals(list(), sort(beanInfo.businessRemote));
assertTrue(beanInfo.localbean);
beanInfo = beans.get("LemonFourBean");
assertEquals(list(), sort(beanInfo.businessLocal));
assertEquals(list(), sort(beanInfo.businessRemote));
assertTrue(beanInfo.localbean);
beanInfo = beans.get("LemonFiveBean");
assertEquals(list(), sort(beanInfo.businessLocal));
assertEquals(list(), sort(beanInfo.businessRemote));
assertTrue(beanInfo.localbean);
beanInfo = beans.get("LemonSixBean");
assertEquals(list(), sort(beanInfo.businessLocal));
assertEquals(list(), sort(beanInfo.businessRemote));
assertTrue(beanInfo.localbean);
}
use of org.apache.openejb.assembler.classic.EnterpriseBeanInfo in project tomee by apache.
the class BusinessInterfacesTest method testOrangeNotStrict.
public void testOrangeNotStrict() throws Exception {
strict(false);
final Map<String, EnterpriseBeanInfo> beans = deploy(OrangeOneBean.class, OrangeTwoBean.class);
EnterpriseBeanInfo beanInfo = beans.get("OrangeOneBean");
assertEquals(list(OrangeOneLocal.class, OrangeOneBoth.class), sort(beanInfo.businessLocal));
assertEquals(list(OrangeOneRemote.class, OrangeOneBoth.class), sort(beanInfo.businessRemote));
beanInfo = beans.get("OrangeTwoBean");
assertEquals(list(OrangeTwoLocal.class, OrangeTwoBoth.class), sort(beanInfo.businessLocal));
assertEquals(list(OrangeTwoRemote.class, OrangeTwoBoth.class), sort(beanInfo.businessRemote));
}
use of org.apache.openejb.assembler.classic.EnterpriseBeanInfo in project tomee by apache.
the class BusinessInterfacesTest method testGreen.
public void testGreen() throws Exception {
// Results should be the same with strict on or off
for (final boolean strict : Arrays.asList(false, true)) {
setUp();
strict(strict);
final Map<String, EnterpriseBeanInfo> beans = deploy(GreenOneBean.class, GreenTwoBean.class);
EnterpriseBeanInfo beanInfo;
beanInfo = beans.get("GreenOneBean");
assertEquals(list(GreenOneLocal.class), sort(beanInfo.businessLocal));
assertEquals(list(GreenOneRemote.class), sort(beanInfo.businessRemote));
beanInfo = beans.get("GreenTwoBean");
assertEquals(list(GreenTwoLocal.class), sort(beanInfo.businessLocal));
assertEquals(list(GreenTwoRemote.class), sort(beanInfo.businessRemote));
}
}
use of org.apache.openejb.assembler.classic.EnterpriseBeanInfo in project tomee by apache.
the class BusinessInterfacesTest method testRedNotStrict.
/**
* Definition in the bean class wins over the
*
* @throws Exception
*/
public void testRedNotStrict() throws Exception {
strict(false);
final Map<String, EnterpriseBeanInfo> beans = deploy(RedOneBean.class, RedTwoBean.class);
EnterpriseBeanInfo beanInfo = beans.get("RedOneBean");
assertEquals(list(RedOneLocal.class), sort(beanInfo.businessLocal));
assertEquals(list(RedOneRemote.class, RedOneOverridden.class), sort(beanInfo.businessRemote));
beanInfo = beans.get("RedTwoBean");
assertEquals(list(RedTwoLocal.class, RedTwoOverridden.class), sort(beanInfo.businessLocal));
assertEquals(list(RedTwoRemote.class), sort(beanInfo.businessRemote));
}
use of org.apache.openejb.assembler.classic.EnterpriseBeanInfo in project tomee by apache.
the class BusinessInterfacesTest method testMagenta.
public void testMagenta() throws Exception {
// Results should be the same with strict on or off
for (final boolean strict : Arrays.asList(false, true)) {
setUp();
strict(strict);
final Map<String, EnterpriseBeanInfo> beans = deploy(MagentaOneBean.class, MagentaTwoBean.class, MagentaThreeBean.class, MagentaFourBean.class, MagentaFiveBean.class);
EnterpriseBeanInfo beanInfo;
beanInfo = beans.get("MagentaOneBean");
assertEquals(list(MagentaOneLocal.class), sort(beanInfo.businessLocal));
assertEquals(list(), sort(beanInfo.businessRemote));
assertTrue(beanInfo.localbean);
beanInfo = beans.get("MagentaTwoBean");
assertEquals(list(), sort(beanInfo.businessLocal));
assertEquals(list(MagentaTwoRemote.class), sort(beanInfo.businessRemote));
assertTrue(beanInfo.localbean);
beanInfo = beans.get("MagentaThreeBean");
assertEquals(list(), sort(beanInfo.businessLocal));
assertEquals(list(), sort(beanInfo.businessRemote));
assertTrue(beanInfo.localbean);
beanInfo = beans.get("MagentaFourBean");
assertEquals(list(MagentaFourLocal.class), sort(beanInfo.businessLocal));
assertEquals(list(), sort(beanInfo.businessRemote));
assertTrue(beanInfo.localbean);
beanInfo = beans.get("MagentaFiveBean");
assertEquals(list(), sort(beanInfo.businessLocal));
assertEquals(list(MagentaFiveRemote.class), sort(beanInfo.businessRemote));
assertTrue(beanInfo.localbean);
}
}
Aggregations