[jboss-cvs] JBossAS SVN: r70774 - projects/jboss-deployers/trunk/deployers-structure-spi/src/tests/org/jboss/test/deployers/structure/structurebuilder.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 12 11:16:16 EDT 2008


Author: alesj
Date: 2008-03-12 11:16:16 -0400 (Wed, 12 Mar 2008)
New Revision: 70774

Modified:
   projects/jboss-deployers/trunk/deployers-structure-spi/src/tests/org/jboss/test/deployers/structure/structurebuilder/AbstractStructureBuilderTest.java
Log:
JBDEPLOY-11; removing artifical context.

Modified: projects/jboss-deployers/trunk/deployers-structure-spi/src/tests/org/jboss/test/deployers/structure/structurebuilder/AbstractStructureBuilderTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-structure-spi/src/tests/org/jboss/test/deployers/structure/structurebuilder/AbstractStructureBuilderTest.java	2008-03-12 15:03:58 UTC (rev 70773)
+++ projects/jboss-deployers/trunk/deployers-structure-spi/src/tests/org/jboss/test/deployers/structure/structurebuilder/AbstractStructureBuilderTest.java	2008-03-12 15:16:16 UTC (rev 70774)
@@ -56,13 +56,23 @@
 
    protected abstract String getDeploymentName();
 
+   protected Deployment createDeployment(DeploymentFactory factory)
+   {
+      Deployment deployment = createDeployment();
+      factory.addContext(deployment, "");
+      return deployment;
+   }
+
    public void testSimple() throws Exception
    {
       Deployment deployment = createDeployment();
       StructureMetaData structure = StructureMetaDataFactory.createStructureMetaData();
       MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
       attachments.addAttachment(StructureMetaData.class, structure);
-      
+
+      DeploymentFactory factory = getDeploymentFactory();
+      factory.addContext(deployment, "");
+
       DeploymentContext context = build(deployment);
       checkDeployment(context, deployment);
    }
@@ -74,7 +84,10 @@
       MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
       attachments.addAttachment(StructureMetaData.class, structure);
       attachments.addAttachment("test", "hello");
-      
+
+      DeploymentFactory factory = getDeploymentFactory();
+      factory.addContext(deployment, "");
+
       DeploymentContext context = build(deployment);
       checkDeployment(context, deployment);
    }
@@ -82,7 +95,7 @@
    public void testOneChild() throws Exception
    {
       DeploymentFactory factory = getDeploymentFactory();
-      Deployment deployment = createDeployment();
+      Deployment deployment = createDeployment(factory);
       factory.addContext(deployment, "child1");
       
       DeploymentContext context = build(deployment);
@@ -92,7 +105,7 @@
    public void testManyChildren() throws Exception
    {
       DeploymentFactory factory = getDeploymentFactory();
-      Deployment deployment = createDeployment();
+      Deployment deployment = createDeployment(factory);
       factory.addContext(deployment, "child1");
       factory.addContext(deployment, "child2");
       factory.addContext(deployment, "child3");
@@ -135,8 +148,7 @@
       checkDeployment(context, structure);
 
       ContextInfo contextInfo = structure.getContext("");
-      if (contextInfo == null)
-         contextInfo = StructureMetaDataFactory.createContextInfo();
+      assertNotNull(contextInfo);
       checkContextInfo(context, contextInfo);
    }
    




More information about the jboss-cvs-commits mailing list