Search in sources :

Example 26 with StringAsset

use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.

the class MessageDestinationTestCase method getDeployment.

@Deployment
public static Archive getDeployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "MessageDestinationTestCase.jar");
    ejbJar.addPackage(MessageDestinationTestCase.class.getPackage());
    ejbJar.addPackage(JMSOperations.class.getPackage());
    ejbJar.addClass(JmsQueueSetup.class);
    ejbJar.addAsManifestResource(MessageDestinationTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml");
    ejbJar.addAsManifestResource(MessageDestinationTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml");
    ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr \n"), "MANIFEST.MF");
    return ejbJar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) JMSOperations(org.jboss.as.test.integration.common.jms.JMSOperations) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 27 with StringAsset

use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.

the class RunAsPrincipalTestCase method runAsStartupTransitiveDeployment.

@Deployment(name = STARTUP_SINGLETON_DEPLOYMENT, managed = false, testable = false)
public static Archive<?> runAsStartupTransitiveDeployment() {
    // using JavaArchive doesn't work, because of a bug in Arquillian, it only deploys wars properly
    final WebArchive war = ShrinkWrap.create(WebArchive.class, STARTUP_SINGLETON_DEPLOYMENT + ".war").addClass(WhoAmI.class).addClass(StatelessBBean.class).addClass(SingletonStartupBean.class).addPackage(Assert.class.getPackage()).addClass(Util.class).addClass(Entry.class).addClass(RunAsPrincipalTestCase.class).addClasses(AbstractSecurityDomainSetup.class, EjbSecurityDomainSetup.class).addAsWebInfResource(RunAsPrincipalTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF");
    war.addPackage(CommonCriteria.class.getPackage());
    return war;
}
Also used : Assert(org.junit.Assert) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) SingletonStartupBean(org.jboss.as.test.integration.ejb.security.runasprincipal.transitive.SingletonStartupBean) CommonCriteria(org.jboss.as.test.categories.CommonCriteria) AssumeTestGroupUtil(org.jboss.as.test.shared.util.AssumeTestGroupUtil) Util(org.jboss.as.test.shared.integration.ejb.security.Util) WhoAmI(org.jboss.as.test.integration.ejb.security.runasprincipal.WhoAmI) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 28 with StringAsset

use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.

the class SecurityDDOverrideTestCase method runAsDeployment.

@Deployment
public static Archive<?> runAsDeployment() {
    final Package currentPackage = SecurityDDOverrideTestCase.class.getPackage();
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "ejb3-security-partial-dd-test.jar").addPackage(PartialDDBean.class.getPackage()).addClass(Util.class).addClasses(AbstractSecurityDomainSetup.class, EjbSecurityDomainSetup.class).addAsResource(currentPackage, "users.properties", "users.properties").addAsResource(currentPackage, "roles.properties", "roles.properties").addAsManifestResource(currentPackage, "partial-ejb-jar.xml", "ejb-jar.xml").addAsManifestResource(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF").addAsManifestResource(currentPackage, "permissions.xml", "permissions.xml").addPackage(CommonCriteria.class.getPackage());
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) CommonCriteria(org.jboss.as.test.categories.CommonCriteria) Util(org.jboss.as.test.shared.integration.ejb.security.Util) PartialDDBean(org.jboss.as.test.integration.ejb.security.dd.override.PartialDDBean) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 29 with StringAsset

use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.

the class AsynchronousSecurityTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    final Package currentPackage = AsynchronousSecurityTestCase.class.getPackage();
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar").addPackage(currentPackage).addClass(AnnotationAuthorizationTestCase.class).addClasses(EjbSecurityDomainSetup.class, AbstractSecurityDomainSetup.class, ServerSetupTask.class, Util.class).addAsResource(currentPackage, "roles.properties", "roles.properties").addAsResource(currentPackage, "users.properties", "users.properties").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF").addAsManifestResource(currentPackage, "permissions.xml", "permissions.xml").addPackage(CommonCriteria.class.getPackage());
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) CommonCriteria(org.jboss.as.test.categories.CommonCriteria) Util(org.jboss.as.test.shared.integration.ejb.security.Util) EjbSecurityDomainSetup(org.jboss.as.test.integration.ejb.security.EjbSecurityDomainSetup) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) AbstractSecurityDomainSetup(org.jboss.as.test.integration.security.common.AbstractSecurityDomainSetup) ServerSetupTask(org.jboss.as.arquillian.api.ServerSetupTask) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 30 with StringAsset

use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.

the class ServletUnitTestCase method deployEjbs.

@Deployment(name = "ejb", order = 2)
public static Archive<?> deployEjbs() {
    JavaArchive jar = getEjbs("ejb3-servlet-ejbs.jar");
    jar.addAsManifestResource(new StringAsset("Dependencies: deployment.ejb3-servlet-client.jar \n"), "MANIFEST.MF");
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)306 Deployment (org.jboss.arquillian.container.test.api.Deployment)248 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)175 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)168 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)56 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)44 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)34 AbstractMgmtTestBase (org.jboss.as.test.integration.management.base.AbstractMgmtTestBase)24 PropertyPermission (java.util.PropertyPermission)17 ZipExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)15 File (java.io.File)14 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)14 JMSOperations (org.jboss.as.test.integration.common.jms.JMSOperations)11 CommonCriteria (org.jboss.as.test.categories.CommonCriteria)10 Util (org.jboss.as.test.shared.integration.ejb.security.Util)10 BeforeClass (org.junit.BeforeClass)8 SocketPermission (java.net.SocketPermission)7 Properties (java.util.Properties)7 TargetsContainer (org.jboss.arquillian.container.test.api.TargetsContainer)5 ServerPermission (org.jboss.as.server.security.ServerPermission)5