Search in sources :

Example 46 with StringAsset

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

the class CustomBootstrapContextTestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, "bootstrap_archive_ij.rar");
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(CustomBootstrapContextTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, JcaMgmtServerSetupTask.class, JcaMgmtBase.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(CustomBootstrapContextTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(CustomBootstrapContextTestCase.class.getPackage(), "ironjacamar.xml", "ironjacamar.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli,org.jboss.as.connector \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 47 with StringAsset

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

the class ResourceAdapterCapacityPoliciesTestCase method createResourceAdapter.

@Deployment
public static Archive<?> createResourceAdapter() {
    ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, "capacity-policies-test.rar");
    rar.addAsManifestResource(LazyResourceAdapter.class.getPackage(), "ra-notx.xml", "ra.xml");
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "capacity-policies-test.jar");
    jar.addClass(LazyResourceAdapter.class).addClass(LazyManagedConnectionFactory.class).addClass(LazyManagedConnection.class).addClass(LazyConnection.class).addClass(LazyConnectionImpl.class).addClass(LazyXAResource.class).addClass(LazyLocalTransaction.class).addClass(LazyManagedConnectionMetaData.class).addClass(LazyConnectionFactory.class).addClass(LazyConnectionFactoryImpl.class);
    jar.addClasses(ResourceAdapterCapacityPoliciesTestCase.class, AbstractMgmtServerSetupTask.class, AbstractMgmtTestBase.class, JcaMgmtBase.class, ContainerResourceMgmtTestBase.class, MgmtOperationException.class, ManagementOperations.class, JcaTestsUtil.class);
    rar.addAsManifestResource(new StringAsset("Dependencies: javax.inject.api,org.jboss.as.connector," + "org.jboss.as.controller,org.jboss.dmr,org.jboss.as.cli,org.jboss.staxmapper," + "org.jboss.ironjacamar.impl, org.jboss.ironjacamar.jdbcadapters\n"), "MANIFEST.MF");
    rar.addAsLibrary(jar);
    return rar;
}
Also used : LazyManagedConnection(org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyManagedConnection) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) LazyResourceAdapter(org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyResourceAdapter) LazyLocalTransaction(org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyLocalTransaction) LazyConnectionFactory(org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyConnectionFactory) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) LazyConnectionImpl(org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyConnectionImpl) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 48 with StringAsset

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

the class EjbDeploymentTestCase method deployEar.

@Deployment(name = "ear", order = 2)
public static Archive<?> deployEar() {
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, deploymentName);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "lib.jar");
    ja.addClass(ITestStatelessEjb.class);
    ja.addClass(ITestStatelessEjbAO.class);
    ear.addAsLibraries(ja);
    ear.addAsModule(getRar());
    ear.addAsModule(getWar());
    ear.addAsModule(getEjb());
    //ear.addAsManifestResource(EjbDeploymentTestCase.class.getPackage(), "application.xml", "application.xml");
    ear.addAsManifestResource(new StringAsset("Dependencies: deployment." + rarDeploymentName + "\n"), "MANIFEST.MF");
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) 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)

Example 49 with StringAsset

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

the class BasicDeployment10TestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
    String deploymentName = "basic10.rar";
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(BasicDeployment10TestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, BasicDeploymentTestCaseSetup.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(BasicDeployment10TestCase.class.getPackage(), "ra10.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 50 with StringAsset

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

the class BasicDeployment15TestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
    String deploymentName = "basic15.rar";
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(BasicDeployment15TestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, BasicDeploymentTestCaseSetup.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(BasicDeployment15TestCase.class.getPackage(), "ra15.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)

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