[jboss-cvs] JBossAS SVN: r76821 - in projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/bean: test and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Aug 8 07:27:53 EDT 2008
Author: adrian at jboss.org
Date: 2008-08-08 07:27:53 -0400 (Fri, 08 Aug 2008)
New Revision: 76821
Added:
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/bean/support/TestInstanceMetaDataBeanDeployer.java
Modified:
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/bean/test/KernelScopeUnitTestCase.java
Log:
[JBDEPLOY-69] - Add a test for a deployer setting up instance metadata - currently fails
Added: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/bean/support/TestInstanceMetaDataBeanDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/bean/support/TestInstanceMetaDataBeanDeployer.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/bean/support/TestInstanceMetaDataBeanDeployer.java 2008-08-08 11:27:53 UTC (rev 76821)
@@ -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.bean.support;
+
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * TestInstanceMetaDataBeanDeployer.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestInstanceMetaDataBeanDeployer extends AbstractDeployer
+{
+ public TestInstanceMetaDataBeanDeployer()
+ {
+ setInput(BeanMetaData.class);
+ setOutput(BeanMetaData.class);
+ setStage(DeploymentStages.REAL);
+ setComponentsOnly(true);
+ }
+
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ unit.getMutableMetaData().addMetaData("instance", this, TestInstanceMetaDataBeanDeployer.class);
+ }
+}
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/bean/test/KernelScopeUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/bean/test/KernelScopeUnitTestCase.java 2008-08-08 11:25:42 UTC (rev 76820)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/bean/test/KernelScopeUnitTestCase.java 2008-08-08 11:27:53 UTC (rev 76821)
@@ -44,6 +44,7 @@
import org.jboss.metadata.spi.scope.ScopeKey;
import org.jboss.test.deployers.vfs.deployer.AbstractDeployerUnitTest;
import org.jboss.test.deployers.vfs.deployer.bean.support.Simple;
+import org.jboss.test.deployers.vfs.deployer.bean.support.TestInstanceMetaDataBeanDeployer;
import org.jboss.test.deployers.vfs.deployer.bean.support.TestMetaDataBeanDeployer;
/**
@@ -61,6 +62,8 @@
protected TestMetaDataBeanDeployer testMetaDataDeployer;
+ protected TestInstanceMetaDataBeanDeployer testInstanceMetaDataDeployer;
+
public KernelScopeUnitTestCase(String name) throws Throwable
{
super(name);
@@ -70,9 +73,11 @@
protected void addDeployers(Kernel kernel)
{
testMetaDataDeployer = new TestMetaDataBeanDeployer();
+ testInstanceMetaDataDeployer = new TestInstanceMetaDataBeanDeployer();
KernelDeploymentDeployer kernelDeploymentDeployer = new KernelDeploymentDeployer();
BeanMetaDataDeployer beanMetaDataDeployer = new BeanMetaDataDeployer(kernel);
addDeployer(main, testMetaDataDeployer);
+ addDeployer(main, testInstanceMetaDataDeployer);
addDeployer(main, kernelDeploymentDeployer);
addDeployer(main, beanMetaDataDeployer);
}
@@ -103,6 +108,7 @@
MetaData md = ctx.getScopeInfo().getMetaData();
assertEquals(testMetaDataDeployer, md.getMetaData("test"));
+ assertEquals(testInstanceMetaDataDeployer, md.getMetaData("instance"));
assertUndeploy(context);
assertNull(controller.getContext("Test", null));
More information about the jboss-cvs-commits
mailing list