Permalink
Browse files

ARQ-196 Change to expose Deployment related state in DeploymentContext

  • Loading branch information...
1 parent 4580ef2 commit b72401a3127debfd05e3618760555fc6b19ad663 @aslakknutsen aslakknutsen committed Feb 2, 2011
@@ -26,7 +26,7 @@
import org.jboss.arquillian.spi.client.protocol.ProtocolDescription;
import org.jboss.arquillian.spi.client.protocol.metadata.ProtocolMetaData;
import org.jboss.arquillian.spi.core.InstanceProducer;
-import org.jboss.arquillian.spi.core.annotation.ClassScoped;
+import org.jboss.arquillian.spi.core.annotation.DeploymentScoped;
import org.jboss.arquillian.spi.core.annotation.Inject;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.descriptor.api.Descriptor;
@@ -45,14 +45,13 @@
*/
public class WeldSEContainer implements DeployableContainer<WeldSEConfiguration>
{
- // TODO: these should be DeploymentScoped, but TestEnrich is currently happening outside a DeploymentScope.
- @Inject @ClassScoped // @DeploymentScoped
+ @Inject @DeploymentScoped
private InstanceProducer<ContextClassLoaderManager> classLoaderManagerProducer;
- @Inject @ClassScoped // @DeploymentScoped
+ @Inject @DeploymentScoped
private InstanceProducer<WeldManager> weldManagerProducer;
- @Inject @ClassScoped // @DeploymentScoped
+ @Inject @DeploymentScoped
private InstanceProducer<WeldBootstrap> weldBootstrapProducer;
public ProtocolDescription getDefaultProtocol()
@@ -26,6 +26,7 @@
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -47,7 +48,7 @@ public static JavaArchive createdeployment()
WeldEmbeddedIntegrationTestCase.class,
MyBean.class)
.addManifestResource(
- new ByteArrayAsset("<beans/>".getBytes()), ArchivePaths.create("beans.xml"));
+ EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
}
@Inject

0 comments on commit b72401a

Please sign in to comment.