1 25 package org.objectweb.easybeans.tests.transaction.containermanaged.stateful; 26 27 import java.sql.SQLException ; 28 29 import javax.ejb.EJBTransactionRolledbackException ; 30 31 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransacRequiredApp01; 32 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransacRequiredApp02; 33 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionRequiredApp; 34 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionRequiredRollback; 35 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionRequiredRuntime; 36 import org.objectweb.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase; 37 import org.testng.annotations.BeforeMethod; 38 import org.testng.annotations.Test; 39 40 57 public class TestExceptionHandleRequired extends TestExceptionHandleBase{ 58 59 64 @BeforeMethod 65 @Override 66 public void setup() throws Exception { 67 super.setup(); 68 } 69 74 @Override 75 public void createBeanApp() throws Exception { 76 super.createBeanApp(SFSBContainerTransactionRequiredApp.class); 77 } 78 79 84 @Override 85 public void createBeanApp01() throws Exception { 86 super.createBeanApp01(SFSBContainerTransacRequiredApp01.class); 87 } 88 89 94 @Override 95 public void createBeanApp02() throws Exception { 96 super.createBeanApp02(SFSBContainerTransacRequiredApp02.class); 97 } 98 99 104 @Override 105 public void createBeanRollback() throws Exception { 106 super.createBeanRollback(SFSBContainerTransactionRequiredRollback.class); 107 } 108 109 113 @Override 114 public void createBeanRuntime() throws Exception { 115 super.createBeanRuntime(SFSBContainerTransactionRequiredRuntime.class); 116 } 117 118 128 @Test(groups = {"application exception tests"}) 129 @Override 130 public void testNotUsingClientTransWithAppException() throws Exception { 131 super.testNotUsingClientTransWithAppException(); 132 } 133 134 144 @Test(groups = {"application rollback exception tests"}, expectedExceptions = SQLException .class) 145 @Override 146 public void testNotUsingClientTransWithAppRollbackException() throws Exception { 147 super.testNotUsingClientTransWithAppRollbackException(); 148 } 149 150 160 @Test(groups = {"runtime exception tests"}, expectedExceptions = SQLException .class) 161 @Override 162 public void testNotUsingClientTransWithRuntimeException() throws Exception { 163 super.testNotUsingClientTransWithRuntimeException(); 164 } 165 166 176 @Test 177 @Override 178 public void testNotUsingClientTransWithAppRuntimeException() throws Exception { 179 super.testNotUsingClientTransWithAppRuntimeException(); 180 } 181 182 193 @Test(expectedExceptions = SQLException .class) 194 @Override 195 public void testNotUsingClientTransWithAppRuntimeRollbackException() throws Exception { 196 super.testNotUsingClientTransWithAppRuntimeRollbackException(); 197 } 198 199 209 @Override 210 @Test(groups = {"application exception tests"}) 211 public void testUsingClientTransWithAppException() throws Exception { 212 super.testUsingClientTransWithAppException(); 213 } 214 215 226 @Test(groups = {"application rollback exception tests"}, expectedExceptions = SQLException .class) 227 public void tesUsingClientTransWithAppRollbackException() throws Exception { 228 super.testUsingClientTransWithAppRollbackException(false); 229 } 230 231 241 @Test(groups = {"runtime exception tests"}) 242 public void testUsingClientTransWithRuntimeException() throws Exception { 243 super.testUsingClientTransWithRuntimeException(EJBTransactionRolledbackException .class, false); 244 } 245 246 256 @Override 257 @Test 258 public void testUsingClientTransWithAppRuntimeException() throws Exception { 259 super.testUsingClientTransWithAppRuntimeException(); 260 } 261 262 272 @Test(expectedExceptions = SQLException .class) 273 public void testUsingClientTransWithAppRuntimeRollbackException() throws Exception { 274 super.testUsingClientTransWithAppRuntimeRollbackException(false); 275 } 276 277 } 278 | Popular Tags |