1 22 package org.jboss.ejb3.test.regression.unit; 23 24 import org.jboss.ejb3.test.regression.FootballTeam; 25 import org.jboss.ejb3.test.regression.InheritanceSession; 26 import org.jboss.test.JBossTestCase; 27 import junit.framework.Test; 28 29 36 37 public class InheritanceUnitTestCase 38 extends JBossTestCase 39 { 40 org.jboss.logging.Logger log = getLog(); 41 42 static boolean deployed = false; 43 static int test = 0; 44 45 public InheritanceUnitTestCase(String name) 46 { 47 48 super(name); 49 50 } 51 52 public void testInheritance() throws Exception 53 { 54 InheritanceSession remote = (InheritanceSession) getInitialContext().lookup("InheritanceSessionBean/remote"); 55 long branchId = remote.createBranch(); 56 FootballTeam team = (FootballTeam) remote.getBranch(branchId); 57 assertEquals(team.getEmployees().size(), 2); 58 assertEquals(remote.getContacts().size(), 3); 59 } 60 61 public static Test suite() throws Exception 62 { 63 return getDeploySetup(InheritanceUnitTestCase.class, "regression-test.jar"); 64 } 65 66 } 67 | Popular Tags |