1 22 package org.jboss.ejb3.test.xmlcfg.unit; 23 24 import org.jboss.ejb3.test.xmlcfg.Customer; 25 import org.jboss.ejb3.test.xmlcfg.EntityTest; 26 import org.jboss.test.JBossTestCase; 27 import junit.framework.Test; 28 29 35 36 public class EntityUnitTestCase 37 extends JBossTestCase 38 { 39 org.jboss.logging.Logger log = getLog(); 40 41 static boolean deployed = false; 42 static int test = 0; 43 44 public EntityUnitTestCase(String name) 45 { 46 47 super(name); 48 49 } 50 51 public void testAll() throws Exception 52 { 53 EntityTest tester = (EntityTest) getInitialContext().lookup("EntityTestBean/remote"); 54 Customer c = tester.createCustomer(); 55 c = tester.findByCustomerId(c.getId()); 56 57 assertEquals(c.getName(), "Bill"); 58 assertEquals(c.getState(), "MA"); 59 } 60 61 public static Test suite() throws Exception 62 { 63 return getDeploySetup(EntityUnitTestCase.class, "xmlcfg-test.jar"); 64 } 65 66 } 67 | Popular Tags |