Search in sources :

Example 41 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class WebSecurityJaspiTestCase method deployment.

@Deployment
public static WebArchive deployment() throws Exception {
    WebArchive war = ShrinkWrap.create(WebArchive.class, "web-secure-jaspi.war");
    war.addClass(SecuredServlet.class);
    war.addAsWebInfResource(WebSecurityBASICTestCase.class.getPackage(), "jboss-web.xml", "jboss-web.xml");
    war.addAsWebInfResource(WebSecurityBASICTestCase.class.getPackage(), "web.xml", "web.xml");
    war.addAsResource(WebSecurityBASICTestCase.class.getPackage(), "users.properties", "users.properties");
    war.addAsResource(WebSecurityBASICTestCase.class.getPackage(), "roles.properties", "roles.properties");
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) WebSecurityBASICTestCase(org.jboss.as.test.integration.web.security.basic.WebSecurityBASICTestCase) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 42 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class WebSecurityProgrammaticLoginTestCase method deployment.

@Deployment
public static WebArchive deployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, "web-secure-programmatic-login.war");
    war.addAsResource(WebSecurityProgrammaticLoginTestCase.class.getPackage(), "users.properties", "users.properties");
    war.addAsResource(WebSecurityProgrammaticLoginTestCase.class.getPackage(), "roles.properties", "roles.properties");
    war.addAsManifestResource(WebSecurityProgrammaticLoginTestCase.class.getPackage(), "MANIFEST.MF", "MANIFEST.MF");
    war.addAsWebInfResource(WebSecurityProgrammaticLoginTestCase.class.getPackage(), "jboss-web.xml", "jboss-web.xml");
    war.addAsWebInfResource(WebSecurityProgrammaticLoginTestCase.class.getPackage(), "web.xml", "web.xml");
    war.addClass(LoginServlet.class);
    war.addClass(SecuredServlet.class);
    war.addClass(AbstractSecurityDomainSetup.class);
    war.addPackage(CommonCriteria.class.getPackage());
    war.addAsManifestResource(createPermissionsXmlAsset(new RuntimePermission("org.jboss.security.*")), "permissions.xml");
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) CommonCriteria(org.jboss.as.test.categories.CommonCriteria) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 43 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class TransportGuaranteeTestCase method deployMixedWar.

@Deployment(name = TG_MIXED + WAR, order = 3, testable = false)
public static WebArchive deployMixedWar() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, TG_MIXED + WAR);
    war.addClass(TransportGuaranteeMixedServlet.class);
    war.addAsResource(TransportGuaranteeTestCase.class.getPackage(), "users.properties", "users.properties");
    war.addAsResource(TransportGuaranteeTestCase.class.getPackage(), "roles.properties", "roles.properties");
    war.setWebXML(TransportGuaranteeTestCase.class.getPackage(), "mixed-web.xml");
    war.addAsWebInfResource(TransportGuaranteeTestCase.class.getPackage(), "jboss-web.xml", "jboss-web.xml");
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 44 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class DefaultConcurrencyServletTestCase method deployment.

@Deployment
public static WebArchive deployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, DefaultConcurrencyServletTestCase.class.getSimpleName() + ".war");
    war.addClasses(HttpRequest.class, DefaultConcurrencyTestServlet.class);
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 45 with WebArchive

use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.

the class DefaultServletMultipartConfigTestCase method deploy2.

@Deployment
public static Archive<?> deploy2() throws Exception {
    WebArchive jar = ShrinkWrap.create(WebArchive.class, "multipathTest.war");
    jar.addClasses(MultipartFilter.class);
    jar.addAsWebInfResource(DefaultServletMultipartConfigTestCase.class.getPackage(), "web.xml", "web.xml");
    return jar;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)519 Deployment (org.jboss.arquillian.container.test.api.Deployment)421 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)170 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)110 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)89 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)80 HttpRequest (org.jboss.as.test.integration.common.HttpRequest)28 File (java.io.File)25 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)25 BatchTestHelper (org.javaee7.util.BatchTestHelper)13 PropertyPermission (java.util.PropertyPermission)11 ZipExporter (org.jboss.shrinkwrap.api.exporter.ZipExporter)11 SocketPermission (java.net.SocketPermission)10 ZipExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)10 CommonCriteria (org.jboss.as.test.categories.CommonCriteria)9 BeforeClass (org.junit.BeforeClass)9 Test (org.junit.Test)9 ClassLoaderAsset (org.jboss.shrinkwrap.api.asset.ClassLoaderAsset)8 Runner (org.apache.openejb.arquillian.tests.Runner)7 Util (org.jboss.as.test.shared.integration.ejb.security.Util)7