1 22 package org.jboss.ejb3.test.bmt.unit; 23 24 import org.jboss.test.JBossTestCase; 25 import org.jboss.ejb3.test.bmt.TesterRemote; 26 import org.jboss.ejb3.test.bmt.DeploymentDescriptorTesterRemote; 27 import junit.framework.Test; 28 29 34 35 public class BMTUnitTestCase 36 extends JBossTestCase 37 { 38 org.jboss.logging.Logger log = getLog(); 39 40 static boolean deployed = false; 41 static int test = 0; 42 43 public BMTUnitTestCase(String name) 44 { 45 46 super(name); 47 48 } 49 50 public void testStateless() throws Exception 51 { 52 TesterRemote tester = (TesterRemote)getInitialContext().lookup("TesterBean/remote"); 53 tester.testStatelessWithoutTx(); 54 tester.testStatelessWithTx(); 55 } 56 57 public void testStateful() throws Exception 58 { 59 TesterRemote tester = (TesterRemote)getInitialContext().lookup("TesterBean/remote"); 60 tester.testStatefulWithoutTx(); 61 tester.testStatefulWithTx(); 62 } 63 64 public void testDeploymentDescriptorStateless() throws Exception 65 { 66 DeploymentDescriptorTesterRemote tester = (DeploymentDescriptorTesterRemote)getInitialContext().lookup("DeploymentDescriptorTester/remote"); 67 tester.testStatelessWithoutTx(); 68 tester.testStatelessWithTx(); 69 } 70 71 public void testDeploymentDescriptorStateful() throws Exception 72 { 73 DeploymentDescriptorTesterRemote tester = (DeploymentDescriptorTesterRemote)getInitialContext().lookup("DeploymentDescriptorTester/remote"); 74 tester.testStatefulWithoutTx(); 75 tester.testStatefulWithTx(); 76 } 77 78 public static Test suite() throws Exception 79 { 80 return getDeploySetup(BMTUnitTestCase.class, "bmt-test.jar"); 81 } 82 83 } 84 | Popular Tags |