assertExpectedClasses(bda, ServletWebBean.class, UIWebBean.class);
}
public void testMultipleArchives() throws Exception
{
WebArchive war1 = createWar("web1.war", true, ServletWebBean.class);
DeploymentUnit war1Unit = assertDeploy(war1);
Deployment war1Deployment = initializeDeploymentBean(war1Unit);
BeanDeploymentArchive war1BDA = war1Deployment.getBeanDeploymentArchives().iterator().next();
assertBDAId(war1BDA, "web1.war");
assertExpectedClasses(war1BDA, ServletWebBean.class);
Class<?> servletWebBeanWar1Class = getClass(ServletWebBean.class, war1Unit);
WebArchive war2 = createWar("web2.war", true, NotWBJsfBean.class);
createLib(war2, "crm.jar", false, CrmWebBean.class);
DeploymentUnit war2Unit = assertDeploy(war2);
Deployment war2Deployment = initializeDeploymentBean(war2Unit);
BeanDeploymentArchive war2BDA = war2Deployment.getBeanDeploymentArchives().iterator().next();
assertBDAId(war2BDA, "web2.war");
assertExpectedClasses(war2BDA, NotWBJsfBean.class);
Class<?> notWBJsfBeanWar2Class = getClass(NotWBJsfBean.class, war2Unit);
Class<?> crmWebBeanWar2Class = getClass(CrmWebBean.class, war2Unit);
JavaArchive ejbJar = createEjbJar("ejb.jar", true, BusinessInterface.class);
DeploymentUnit ejbJarUnit = assertDeploy(ejbJar);
Deployment ejbJarDeployment = initializeDeploymentBean(ejbJarUnit);
BeanDeploymentArchive ejbJarBDA = ejbJarDeployment.getBeanDeploymentArchives().iterator().next();
assertBDAId(ejbJarBDA, "ejb.jar");
assertExpectedClasses(ejbJarBDA, BusinessInterface.class);
Class<?> businessInterfaceClass = getClass(BusinessInterface.class, ejbJarUnit);
EnterpriseArchive ear1 = ShrinkWrap.create(EnterpriseArchive.class, "full.ear");
WebArchive warInEar1 = createWarWithLibs(false, true, true);
ear1.addModule(warInEar1);
ear1.addModule(war2);
JavaArchive ejbJarInEar1 = createEjbJar("ejbInFullEar.jar", false, MySLSBean.class);
ear1.addModule(ejbJarInEar1);
createLib(ear1, "lib1.jar", false, ExternalWebBean.class);