[jboss-cvs] JBossAS SVN: r75253 - in projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers: vfs/deployer/jaxp and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jul 1 05:31:09 EDT 2008


Author: alesj
Date: 2008-07-01 05:31:09 -0400 (Tue, 01 Jul 2008)
New Revision: 75253

Added:
   projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/JAXPDeployerTestSuite.java
   projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/ValidateDeployerTestSuite.java
   projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/StructureOMFDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/test/ObjectMFDTestCase.java
Removed:
   projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/VFSDeployerTestSuite.java
Modified:
   projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/DeployersVFSTestSuite.java
Log:
[JBDEPLOY-15]; test object model factory deployer.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/DeployersVFSTestSuite.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/DeployersVFSTestSuite.java	2008-07-01 09:21:04 UTC (rev 75252)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/DeployersVFSTestSuite.java	2008-07-01 09:31:09 UTC (rev 75253)
@@ -27,9 +27,10 @@
 import org.jboss.test.deployers.vfs.classloader.ClassLoaderTestSuite;
 import org.jboss.test.deployers.vfs.deployer.bean.BeanDeployerTestSuite;
 import org.jboss.test.deployers.vfs.deployer.facelets.FaceletsTestSuite;
-import org.jboss.test.deployers.vfs.deployer.jaxp.VFSDeployerTestSuite;
+import org.jboss.test.deployers.vfs.deployer.jaxp.JAXPDeployerTestSuite;
 import org.jboss.test.deployers.vfs.deployer.merge.MergeDeployerTestSuite;
 import org.jboss.test.deployers.vfs.deployer.nonmetadata.NonMetadataDeployersTestSuite;
+import org.jboss.test.deployers.vfs.deployer.validate.ValidateDeployerTestSuite;
 import org.jboss.test.deployers.vfs.deploymentfactory.VFSDeploymentFactoryTestSuite;
 import org.jboss.test.deployers.vfs.managed.VFSManagedTestSuite;
 import org.jboss.test.deployers.vfs.matchers.VFSMatchersTestSuite;
@@ -59,7 +60,7 @@
       suite.addTest(VFSStructureBuilderTestSuite.suite());
       suite.addTest(VFSStructureTestSuite.suite());
       suite.addTest(VFSMetaDataTestSuite.suite());
-      suite.addTest(VFSDeployerTestSuite.suite());
+      suite.addTest(JAXPDeployerTestSuite.suite());
       suite.addTest(BeanDeployerTestSuite.suite());
       suite.addTest(VFSManagedTestSuite.suite());
       suite.addTest(NonMetadataDeployersTestSuite.suite());
@@ -68,6 +69,7 @@
       suite.addTest(JBossXBDeployersTestSuite.suite());
       suite.addTest(MergeDeployerTestSuite.suite());
       suite.addTest(FaceletsTestSuite.suite());
+      suite.addTest(ValidateDeployerTestSuite.suite());
 
       return suite;
    }

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/JAXPDeployerTestSuite.java (from rev 75153, projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/VFSDeployerTestSuite.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/JAXPDeployerTestSuite.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/JAXPDeployerTestSuite.java	2008-07-01 09:31:09 UTC (rev 75253)
@@ -0,0 +1,50 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.deployer.jaxp;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+import org.jboss.test.deployers.vfs.deployer.jaxp.test.JAXPDeployerUnitTestCase;
+
+/**
+ * JAXPDeployerTestSuite.
+ * 
+ * @author <a href="adrian at jboss.org">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JAXPDeployerTestSuite extends TestSuite
+{
+   public static void main(String[] args)
+   {
+      TestRunner.run(suite());
+   }
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("JAXP Deployer Tests");
+
+      suite.addTest(JAXPDeployerUnitTestCase.suite());
+
+      return suite;
+   }
+}

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/VFSDeployerTestSuite.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/VFSDeployerTestSuite.java	2008-07-01 09:21:04 UTC (rev 75252)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/VFSDeployerTestSuite.java	2008-07-01 09:31:09 UTC (rev 75253)
@@ -1,53 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.deployers.vfs.deployer.jaxp;
-
-import org.jboss.test.deployers.vfs.deployer.jaxp.test.JAXPDeployerUnitTestCase;
-import org.jboss.test.deployers.vfs.deployer.validate.test.DeployersValidateInputTestCase;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-/**
- * VFSDeployerTestSuite.
- * 
- * @author <a href="adrian at jboss.org">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class VFSDeployerTestSuite extends TestSuite
-{
-   public static void main(String[] args)
-   {
-      TestRunner.run(suite());
-   }
-
-   public static Test suite()
-   {
-      TestSuite suite = new TestSuite("VFS Deployer Tests");
-
-      suite.addTest(JAXPDeployerUnitTestCase.suite());
-      suite.addTest(DeployersValidateInputTestCase.suite());
-
-      return suite;
-   }
-}

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/ValidateDeployerTestSuite.java (from rev 75153, projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/VFSDeployerTestSuite.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/ValidateDeployerTestSuite.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/ValidateDeployerTestSuite.java	2008-07-01 09:31:09 UTC (rev 75253)
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.deployer.validate;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+import org.jboss.test.deployers.vfs.deployer.validate.test.DeployersValidateInputTestCase;
+import org.jboss.test.deployers.vfs.deployer.validate.test.ObjectMFDTestCase;
+
+/**
+ * ValidateDeployerTestSuite.
+ *
+ * @author <a href="ales.justin at jboss.org">Ales Justin</a>
+ */
+public class ValidateDeployerTestSuite extends TestSuite
+{
+   public static void main(String[] args)
+   {
+      TestRunner.run(suite());
+   }
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("Validate Deployers Tests");
+
+      suite.addTest(DeployersValidateInputTestCase.suite());
+      suite.addTest(ObjectMFDTestCase.suite());
+
+      return suite;
+   }
+}
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/StructureOMFDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/StructureOMFDeployer.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/StructureOMFDeployer.java	2008-07-01 09:31:09 UTC (rev 75253)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.deployer.validate.support;
+
+import org.jboss.deployers.spi.structure.StructureMetaData;
+import org.jboss.deployers.vfs.spi.deployer.ObjectModelFactoryDeployer;
+import org.jboss.deployers.vfs.plugins.structure.explicit.StructureMetaDataObjectFactory;
+import org.jboss.xb.binding.ObjectModelFactory;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class StructureOMFDeployer extends ObjectModelFactoryDeployer<StructureMetaData>
+{
+   public StructureOMFDeployer()
+   {
+      super(StructureMetaData.class);
+      setName("jboss-structure.xml");
+   }
+
+   protected ObjectModelFactory getObjectModelFactory(StructureMetaData root)
+   {
+      return new StructureMetaDataObjectFactory();
+   }
+}

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/test/ObjectMFDTestCase.java (from rev 75153, projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/test/ObjectMFDTestCase.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/test/ObjectMFDTestCase.java	2008-07-01 09:31:09 UTC (rev 75253)
@@ -0,0 +1,73 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.deployer.validate.test;
+
+import java.util.Collections;
+
+import junit.framework.Test;
+import org.jboss.deployers.spi.deployer.Deployer;
+import org.jboss.deployers.spi.structure.StructureMetaData;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.test.deployers.BaseDeployersVFSTest;
+import org.jboss.test.deployers.vfs.deployer.validate.support.StructureOMFDeployer;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * Validate omfd deployer.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ObjectMFDTestCase extends BaseDeployersVFSTest
+{
+   public ObjectMFDTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite()
+   {
+      return suite(ObjectMFDTestCase.class);
+   }
+
+   public void testDeployer() throws Exception
+   {
+      VirtualFile file = getVirtualFile("/structure/explicit", "complex.deployer");
+      VFSDeploymentContext deployment = new AbstractVFSDeploymentContext(file, "");
+      deployment.setMetaDataPath(Collections.singletonList("META-INF"));
+      VFSDeploymentUnit unit = new AbstractVFSDeploymentUnit(deployment);
+      Deployer deployer = new StructureOMFDeployer();
+
+      deployer.deploy(unit);
+      try
+      {
+         StructureMetaData metaData = unit.getAttachment(StructureMetaData.class);
+         assertNotNull(metaData);
+      }
+      finally
+      {
+         deployer.undeploy(unit);
+      }
+   }
+}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list