[jboss-cvs] JBossAS SVN: r59661 - trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jan 15 17:17:24 EST 2007
Author: scott.stark at jboss.org
Date: 2007-01-15 17:17:22 -0500 (Mon, 15 Jan 2007)
New Revision: 59661
Modified:
trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/InstallMCToJMXUnitTestCase.java
Log:
Correct the order of the injection check
Modified: trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/InstallMCToJMXUnitTestCase.java
===================================================================
--- trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/InstallMCToJMXUnitTestCase.java 2007-01-15 22:13:38 UTC (rev 59660)
+++ trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/InstallMCToJMXUnitTestCase.java 2007-01-15 22:17:22 UTC (rev 59661)
@@ -23,6 +23,7 @@
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.test.system.controller.integration.support.SimpleBean;
+import org.jboss.test.system.controller.support.SimpleMBean;
import junit.framework.Test;
@@ -55,10 +56,10 @@
* Validate that:
*
* jboss.test:type=test mbean context exists
- * jboss.test:type=test target is not null
+ * jboss.test:type=test target is not null and an instanceof SimpleMBean
* Test bean context exists
* Test bean target is not null and an instanceof SimpleBean
- * That the Test.simpleBean property value injected was the jboss.test:type=test instance
+ * That the jboss.test:type=test.simpleBean property value injected was the Test instance
*
* @throws Throwable
*/
@@ -68,6 +69,7 @@
assertNotNull(mbeanContext);
Object mbean = mbeanContext.getTarget();
assertNotNull(mbean);
+ assertTrue(mbean instanceof SimpleMBean);
ControllerContext beanContext = getControllerContext("Test");
assertNotNull(beanContext);
@@ -75,11 +77,11 @@
assertNotNull(bean);
assertTrue(bean instanceof SimpleBean);
- SimpleBean simpleBean = (SimpleBean) bean;
+ SimpleMBean simpleMBean = (SimpleMBean) mbean;
- Object injected = simpleBean.getSimple();
+ Object injected = simpleMBean.getSimpleBean();
- assertTrue("MBean was not injected: ", mbean == injected);
+ assertTrue("Bean was not injected: ", bean == injected);
}
}
More information about the jboss-cvs-commits
mailing list