1 22 package org.jboss.test.system.controller.integration.test; 23 24 import org.jboss.dependency.spi.ControllerContext; 25 import org.jboss.test.system.controller.integration.support.SimpleBean; 26 import org.jboss.test.system.controller.support.Simple; 27 28 34 public abstract class InjectJMXFromMCTest extends AbstractIntegrationTest 35 { 36 public InjectJMXFromMCTest(String name) 37 { 38 super(name); 39 } 40 41 public void checkInject() throws Throwable 42 { 43 Simple simple = getSimple(); 44 45 ControllerContext beanContext = getControllerContext("Test"); 46 assertNotNull(beanContext); 47 Object bean = beanContext.getTarget(); 48 assertNotNull(bean); 49 assertTrue(bean instanceof SimpleBean); 50 51 Object injected = simple.getSimpleBean(); 52 53 assertTrue("Bean was not injected: ", bean == injected); 54 } 55 } 56 | Popular Tags |