[jboss-cvs] JBossAS SVN: r79609 - in projects/microcontainer/trunk/kernel/src/test: resources/org/jboss/test/kernel/deployment/test and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 16 16:45:06 EDT 2008
Author: alesj
Date: 2008-10-16 16:45:06 -0400 (Thu, 16 Oct 2008)
New Revision: 79609
Added:
projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/AliasInjectTestCase.java
projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/AliasInjectTestCase.xml
Modified:
projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/DeploymentTestSuite.java
Log:
AliasInject test case.
Copied: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/AliasInjectTestCase.java (from rev 79573, projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/MockEjb3DependsTestCase.java)
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/AliasInjectTestCase.java (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/AliasInjectTestCase.java 2008-10-16 20:45:06 UTC (rev 79609)
@@ -0,0 +1,57 @@
+/*
+* 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.kernel.deployment.test;
+
+import junit.framework.Test;
+import org.jboss.beans.metadata.api.annotations.Inject;
+import org.jboss.test.kernel.junit.MicrocontainerTest;
+
+/**
+ * AliasInjectTestCase
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class AliasInjectTestCase extends MicrocontainerTest
+{
+ private Object injectee;
+
+ public AliasInjectTestCase(String name) throws Throwable
+ {
+ super(name, true);
+ }
+
+ public static Test suite()
+ {
+ return suite(AliasInjectTestCase.class);
+ }
+
+ public void testDepends() throws Throwable
+ {
+ assertNotNull(injectee);
+ }
+
+ @Inject(bean = "InjecteeFactory", property = "serviceName")
+ public void setInjectee(Object injectee)
+ {
+ this.injectee = injectee;
+ }
+}
\ No newline at end of file
Modified: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/DeploymentTestSuite.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/DeploymentTestSuite.java 2008-10-16 20:14:22 UTC (rev 79608)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/DeploymentTestSuite.java 2008-10-16 20:45:06 UTC (rev 79609)
@@ -71,6 +71,7 @@
suite.addTest(MockEjb3DependsTestCase.suite());
suite.addTest(AnnotationUsageTestCase.suite());
suite.addTest(PropertyUsageTestCase.suite());
+ suite.addTest(AliasInjectTestCase.suite());
// bean container tests
suite.addTest(BeanContainerUsageTestCase.suite());
suite.addTest(BeanContainerUsageMDTestCase.suite());
Copied: projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/AliasInjectTestCase.xml (from rev 79511, projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/MockServiceBindingTestCase.xml)
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/AliasInjectTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/AliasInjectTestCase.xml 2008-10-16 20:45:06 UTC (rev 79609)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="SomeRealName" class="org.jboss.test.kernel.deployment.support.MockServiceBinding">
+ <alias>InjecteeFactory</alias>
+ <constructor>
+ <parameter>jboss.remoting:service=JMXConnectorServer,protocol=rmi</parameter>
+ <parameter>${jboss.bind.address}</parameter>
+ <parameter>1090</parameter>
+ </constructor>
+ </bean>
+
+</deployment>
More information about the jboss-cvs-commits
mailing list