1 22 package org.jboss.test.kernel.deployment.jboss.test; 23 24 import javax.naming.InitialContext ; 25 26 import junit.framework.Test; 27 28 import org.jboss.test.JBossTestCase; 29 import org.jboss.test.kernel.deployment.jboss.beans.simplepojo.SimplePOJO; 30 31 37 public class SimplePOJOUnitTestCase extends JBossTestCase 38 { 39 public void testSimplePOJO() throws Exception 40 { 41 InitialContext ctx = new InitialContext (); 42 SimplePOJO pojo = (SimplePOJO) ctx.lookup("test/kernel/deployment/simplepojo"); 43 assertEquals("()", pojo.getConstructorUsed()); 44 assertEquals("Something", pojo.getSomething()); 45 assertEquals(true, pojo.created); 46 assertEquals(true, pojo.started); 47 } 48 49 public SimplePOJOUnitTestCase(String test) 50 { 51 super(test); 52 } 53 54 public static Test suite() throws Exception 55 { 56 return getDeploySetup(SimplePOJOUnitTestCase.class, "testkernel-simplepojo.beans"); 57 } 58 } 59 | Popular Tags |