Package org.jboss.shrinkwrap.api.spec

Examples of org.jboss.shrinkwrap.api.spec.WebArchive


      super(name);
   }

   protected WebArchive createWebArchive(String name)
   {
      WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "test-weld.war");
      webArchive
         .addResource("org/jboss/test/deployers/as/support/webapp/" + name + ".xhtml", "/" + name + ".xhtml")
         .addResource("org/jboss/test/deployers/as/support/webapp/WEB-INF/web.xml", WEB_XML)
         .addResource("org/jboss/test/deployers/as/support/webapp/WEB-INF/faces-config.xml", FACES_CONFIG);
     
     
     
      getLog().debug(webArchive.toString(true));
     
      return webArchive;
   }
View Full Code Here


      return javaArchive;
   }

   protected URL createAndDeployWar(String name, Class<?>...classes) throws Exception
   {
      WebArchive webArchive = createWebArchive(name)
         .addResource("org/jboss/test/deployers/as/support/weld/META-INF/beans.xml", WEB_BEANS_XML)
         .addClasses(classes);
  
      return explodeArchiveAndDeploy(webArchive);
   }
View Full Code Here

      return explodeArchiveAndDeploy(webArchive);
   }

   protected URL createAndDeployWar(String name, String mcDescriptorPackageFragment, Class<?>...classes) throws Exception
   {
      WebArchive webArchive = createWebArchive(name)
      .addResource("org/jboss/test/deployers/as/support/weld/META-INF/beans.xml", WEB_BEANS_XML)
      .addResource("org/jboss/test/deployers/as/support/" + mcDescriptorPackageFragment + "/META-INF/jboss-beans.xml", JBOSS_BEANS_XML)
      .addClasses(classes);
  
      return explodeArchiveAndDeploy(webArchive);
View Full Code Here

      assertEmptyEnvironment();
   }

   public void testWar() throws Exception
   {
      WebArchive war = createWar(true);
      unit = assertDeploy(war);
     
      E environment = assertSingleEnvironment(WAR_NAME);
      assertExpectedClasses(environment, ServletWebBean.class);
      assertExpectedWarResources(environment, unit.getSimpleName(), true);
View Full Code Here

      assertExpectedWarResources(environment, unit.getSimpleName(), true);
   }

   public void testWarWithLib() throws Exception
   {
      WebArchive war = createWarWithLib(true, true);
      unit = assertDeploy(war);
     
      E environment = assertSingleEnvironment(WAR_NAME);
      assertExpectedClasses(environment, ServletWebBean.class, UIWebBean.class);
      assertExpectedWarResources(environment, unit.getSimpleName(), true, "lib.jar");
View Full Code Here

      assertExpectedWarResources(environment, unit.getSimpleName(), true, "lib.jar");
   }

   public void testWarWithLibs() throws Exception
   {
      WebArchive war = createWarWithLibs(true, true, true);
      unit = assertDeploy(war);
     
      E environment = assertSingleEnvironment(WAR_NAME);
      assertExpectedClasses(environment, ServletWebBean.class, UIWebBean.class, CrmWebBean.class);
      assertExpectedWarResources(environment, unit.getSimpleName(), true, "lib1.jar", "lib2.jar");
View Full Code Here

      assertExpectedWarResources(environment, unit.getSimpleName(), true, "lib1.jar", "lib2.jar");
   }

   public void testWarWithLibWithoutXml() throws Exception
   {
      WebArchive war = createWarWithLib(true, false);
      unit = assertDeploy(war);
     
      E environment = assertSingleEnvironment(WAR_NAME);
      assertExpectedClasses(environment, ServletWebBean.class);
      assertExpectedWarResources(environment, unit.getSimpleName(), true);
View Full Code Here

      assertExpectedWarResources(environment, unit.getSimpleName(), true);
   }

   public void testWarWithLibsWithoutXml() throws Exception
   {
      WebArchive war = createWarWithLibs(true, false, false);
      unit = assertDeploy(war);
     
      E environment = assertSingleEnvironment(WAR_NAME);
      assertExpectedClasses(environment, ServletWebBean.class);
      assertExpectedWarResources(environment, unit.getSimpleName(), true);
View Full Code Here

      assertExpectedWarResources(environment, unit.getSimpleName(), true);
   }

   public void testWarWithMixedLibs() throws Exception
   {
      WebArchive war = createWarWithLibs(true, true, false);
      unit = assertDeploy(war);
     
      E environment = assertSingleEnvironment(WAR_NAME);
      assertExpectedClasses(environment, ServletWebBean.class, UIWebBean.class);
      assertExpectedWarResources(environment, unit.getSimpleName(), true, "lib1.jar");
View Full Code Here

      assertExpectedWarResources(environment, unit.getSimpleName(), true, "lib1.jar");
   }

   public void testWarWithoutXmlWithLib() throws Exception
   {
      WebArchive war = createWarWithLib(false, true);
      unit = assertDeploy(war);
     
      E environment = assertSingleEnvironment(WAR_NAME);
      assertExpectedClasses(environment, UIWebBean.class);
      assertExpectedWarResources(environment, unit.getSimpleName(), false, "lib.jar");
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.api.spec.WebArchive

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.