Search in sources :

Example 11 with StringAsset

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

the class EarPackagedMultiRarDeploymentTestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
@Deployment
public static EnterpriseArchive createDeployment() throws Exception {
    String deploymentName = "ear_packaged.ear";
    String subDeploymentName = "ear_packaged.rar";
    String subDeploymentName2 = "ear_packaged2.rar";
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, subDeploymentName);
    raa.addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "ironjacamar.xml", "ironjacamar.xml");
    ResourceAdapterArchive raa2 = ShrinkWrap.create(ResourceAdapterArchive.class, subDeploymentName2);
    raa2.addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "ra2.xml", "ra.xml").addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "ironjacamar2.xml", "ironjacamar.xml");
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, deploymentName);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(EarPackagedMultiRarDeploymentTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    ear.addAsLibrary(ja);
    ear.addAsModule(raa);
    ear.addAsModule(raa2);
    ear.addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "application.xml", "application.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) AbstractMgmtTestBase(org.jboss.as.test.integration.management.base.AbstractMgmtTestBase) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 12 with StringAsset

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

the class MultipleActivationTestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
    String deploymentName = "archive.rar";
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(MultipleActivationTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(MultipleActivationTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
    return raa;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) AbstractMgmtTestBase(org.jboss.as.test.integration.management.base.AbstractMgmtTestBase) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 13 with StringAsset

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

the class MultipleObjectActivationTestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
    String deploymentName = "archive_mult.rar";
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(MultipleObjectActivationTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(MultipleObjectActivationTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
    return raa;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) AbstractMgmtTestBase(org.jboss.as.test.integration.management.base.AbstractMgmtTestBase) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 14 with StringAsset

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

the class MultipleObjectPartialActivationTestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
    String deploymentName = "archive_multi_partial.rar";
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(MultipleObjectPartialActivationTestCase.class, AbstractMgmtTestBase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, MultipleObjectPartialActivationTestCaseSetup.class, AbstractMgmtServerSetupTask.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(MultipleObjectPartialActivationTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
    //org.apache.httpcomponents,
    return raa;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) AbstractMgmtTestBase(org.jboss.as.test.integration.management.base.AbstractMgmtTestBase) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 15 with StringAsset

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

the class ArtemisMessagingTestCase method createDeployment.

@Deployment
public static JavaArchive createDeployment() throws Exception {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "messaging-example.jar");
    jar.addAsManifestResource(new StringAsset("Manifest-Version: 1.0\n" + "Dependencies: org.apache.activemq.artemis, org.jboss.dmr, org.jboss.as.controller-client\n"), "MANIFEST.MF");
    jar.addClass(ArtemisMessagingTestCase.class);
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)319 Deployment (org.jboss.arquillian.container.test.api.Deployment)259 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)180 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)180 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)60 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)44 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)38 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)25 AbstractMgmtTestBase (org.jboss.as.test.integration.management.base.AbstractMgmtTestBase)24 File (java.io.File)17 PropertyPermission (java.util.PropertyPermission)17 ZipExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)15 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 Test (org.junit.Test)8 SocketPermission (java.net.SocketPermission)7 Properties (java.util.Properties)7 Runner (org.apache.openejb.arquillian.tests.Runner)7