Package org.jboss.test.microcontainer.support.jndi

Examples of org.jboss.test.microcontainer.support.jndi.SimpleBean


      super.enableTrace("org.jboss");
      Properties env = new Properties();
      env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.test.microcontainer.support.jndi.MockInitialContextFactory");
      InitialContext ctx = new InitialContext(env);

      SimpleBean bean0 = (SimpleBean) ctx.lookup("beans/SimpleBean0");
      assertNotNull(bean0);
      assertEquals("bean0.prop1", bean0.getProp1());
      SimpleBean alias0 = (SimpleBean) ctx.lookup("beans/XmlAnnotatedSimpleBean0");
      assertNotNull(alias0);
      assertEquals("bean0.prop1", alias0.getProp1());
      SimpleBeanAnnotatedImpl bean1 = (SimpleBeanAnnotatedImpl) ctx.lookup("beans/SimpleBean1");
      assertEquals("bean1.prop1", bean1.getProp1());
      SimpleBean alias1 = (SimpleBean) ctx.lookup("beans/AnnotatedSimpleBean1");
      assertNotNull(alias1);
      assertEquals("bean1.prop1", alias1.getProp1());
   }
View Full Code Here


      super.enableTrace("org.jboss");
      Properties env = new Properties();
      env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.test.microcontainer.support.jndi.MockInitialContextFactory");
      InitialContext ctx = new InitialContext(env);

      SimpleBean bean0 = (SimpleBean) ctx.lookup("beans/SimpleBean0");
      assertNotNull(bean0);
      assertEquals("bean0.prop1", bean0.getProp1());
      SimpleBean alias0 = (SimpleBean) ctx.lookup("beans/XmlAnnotatedSimpleBean0");
      assertNotNull(alias0);
      assertEquals("bean0.prop1", alias0.getProp1());
      SimpleBeanAnnotatedImpl bean1 = (SimpleBeanAnnotatedImpl) ctx.lookup("beans/SimpleBean1");
      assertEquals("bean1.prop1", bean1.getProp1());
      SimpleBean alias1 = (SimpleBean) ctx.lookup("beans/AnnotatedSimpleBean1");
      assertNotNull(alias1);
      assertEquals("bean1.prop1", alias1.getProp1());
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.microcontainer.support.jndi.SimpleBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.