1 25 package org.objectweb.easybeans.tests.transaction.containermanaged.stateful; 26 27 import java.sql.SQLException ; 28 29 import javax.ejb.EJBTransactionRequiredException ; 30 31 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionMandatory; 32 import org.objectweb.easybeans.tests.transaction.containermanaged.base.TestMandatory; 33 import org.testng.annotations.BeforeClass; 34 import org.testng.annotations.BeforeMethod; 35 import org.testng.annotations.Test; 36 37 49 public class TestMandatoryRemoteSFSB extends TestMandatory { 50 51 52 56 @BeforeMethod 57 public void createBean() throws Exception { 58 super.createBean(SFSBContainerTransactionMandatory.class); 59 } 60 61 65 @BeforeClass 66 @Override 67 public void setup() throws Exception { 68 super.setup(); 69 } 70 71 75 @Test(groups = {"mandatory attribute features"}, alwaysRun = true, expectedExceptions = SQLException .class) 76 @Override 77 public void testUsingClientTrans() throws Exception { 78 super.testUsingClientTrans(); 79 } 80 81 85 @Test(groups = {"rollback"}) 86 @Override 87 public void testSetRollbackOnlyWithUserTransaction() throws Exception { 88 super.testSetRollbackOnlyWithUserTransaction(); 89 } 90 91 95 @Test(groups = {"rollback"}, expectedExceptions = EJBTransactionRequiredException .class) 96 @Override 97 public void testSetRollbackOnlyWithoutUserTransaction() throws Exception { 98 super.testSetRollbackOnlyWithoutUserTransaction(); 99 } 100 101 105 @Test(groups = {"rollback"}) 106 @Override 107 public void testGetRollbackOnlyWithUserTransaction() throws Exception { 108 super.testGetRollbackOnlyWithUserTransaction(); 109 110 } 111 112 116 @Test(groups = {"rollback"}, expectedExceptions = EJBTransactionRequiredException .class) 117 @Override 118 public void testGetRollbackOnlyWithoutUserTransaction() throws Exception { 119 super.testGetRollbackOnlyWithoutUserTransaction(); 120 } 121 122 125 @BeforeMethod 126 @Override 127 public void deleteTable() { 128 super.deleteTable(); 129 } 130 131 135 @BeforeMethod 136 @Override 137 public void cleanTransaction() throws Exception { 138 super.cleanTransaction(); 139 } 140 141 145 @Test(groups = {"general attribute features"}, expectedExceptions = java.lang.IllegalStateException .class) 146 @Override 147 public void testGetUserTransactionWithEJBContext() throws Exception { 148 super.testGetUserTransactionWithEJBContext(); 149 } 150 151 155 @Test(groups = {"general attribute features"}, expectedExceptions = javax.naming.NameNotFoundException .class) 156 @Override 157 public void testGetUserTransactionWithLookup() throws Exception { 158 super.testGetUserTransactionWithLookup(); 159 } 160 } 161 | Popular Tags |