1 22 package org.jboss.ejb3.test.naming.unit; 23 24 import javax.naming.InitialContext ; 25 import org.jboss.test.JBossTestCase; 26 import org.jboss.ejb3.test.naming.bad.BadInjector; 27 28 34 public class BadInjectionsUnitTestCase extends JBossTestCase 35 { 36 41 public BadInjectionsUnitTestCase(String name) 42 { 43 super(name); 44 } 45 46 52 public void testFieldMethodCollision() throws Exception 53 { 54 log.info("+++ testFieldMethodCollision"); 55 super.redeploy("bad-field-method.jar"); 56 log.error("Should not have been able to deploy bad-field-method.jar"); 57 InitialContext ctx = getInitialContext(); 58 Object ref = ctx.lookup("BadFieldMethodBean/remote"); 59 log.info("Found BadInjector"); 60 BadInjector bean = (BadInjector) ref; 61 assertEquals("BadFieldMethodBean", bean.getKey()); 62 bean.remove(); 63 super.undeploy("bad-field-method.jar"); 64 } 65 } 66 | Popular Tags |