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.SFSBContainerTransacDefaultApp01; 32 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransacDefaultApp02; 33 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionDefaultApp; 34 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionDefaultRollback; 35 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionDefaultRuntime; 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 TestExceptionHandleDefault extends TestExceptionHandleBase { 58 59 64 @BeforeMethod 65 @Override 66 public void setup() throws Exception { 67 super.setup(); 68 } 69 70 75 @Override 76 public void createBeanApp() throws Exception { 77 super.createBeanApp(SFSBContainerTransactionDefaultApp.class); 78 79 } 80 81 86 @Override 87 public void createBeanApp01() throws Exception { 88 super.createBeanApp01(SFSBContainerTransacDefaultApp01.class); 89 } 90 91 96 @Override 97 public void createBeanApp02() throws Exception { 98 super.createBeanApp02(SFSBContainerTransacDefaultApp02.class); 99 } 100 101 106 @Override 107 public void createBeanRollback() throws Exception { 108 super.createBeanRollback(SFSBContainerTransactionDefaultRollback.class); 109 } 110 111 115 @Override 116 public void createBeanRuntime() throws Exception { 117 super.createBeanRuntime(SFSBContainerTransactionDefaultRuntime.class); 118 } 119 120 130 @Test(groups = {"application exception tests"}) 131 @Override 132 public void testNotUsingClientTransWithAppException() throws Exception { 133 super.testNotUsingClientTransWithAppException(); 134 } 135 136 146 @Test(groups = {"application rollback exception tests"}, expectedExceptions = SQLException .class) 147 @Override 148 public void testNotUsingClientTransWithAppRollbackException() throws Exception { 149 super.testNotUsingClientTransWithAppRollbackException(); 150 } 151 152 162 @Test(groups = {"runtime exception tests"}, expectedExceptions = SQLException .class) 163 @Override 164 public void testNotUsingClientTransWithRuntimeException() throws Exception { 165 super.testNotUsingClientTransWithRuntimeException(); 166 } 167 168 178 @Test 179 @Override 180 public void testNotUsingClientTransWithAppRuntimeException() throws Exception { 181 super.testNotUsingClientTransWithAppRuntimeException(); 182 } 183 184 195 @Test(expectedExceptions = SQLException .class) 196 @Override 197 public void testNotUsingClientTransWithAppRuntimeRollbackException() throws Exception { 198 super.testNotUsingClientTransWithAppRuntimeRollbackException(); 199 } 200 201 211 @Override 212 @Test(groups = {"application exception tests"}) 213 public void testUsingClientTransWithAppException() throws Exception { 214 super.testUsingClientTransWithAppException(); 215 } 216 217 228 @Test(groups = {"application rollback exception tests"}, expectedExceptions = SQLException .class) 229 public void tesUsingClientTransWithAppRollbackException() throws Exception { 230 super.testUsingClientTransWithAppRollbackException(false); 231 } 232 233 243 @Test(groups = {"runtime exception tests"}) 244 public void testUsingClientTransWithRuntimeException() throws Exception { 245 super.testUsingClientTransWithRuntimeException(EJBTransactionRolledbackException .class, false); 246 } 247 248 258 @Override 259 @Test 260 public void testUsingClientTransWithAppRuntimeException() throws Exception { 261 super.testUsingClientTransWithAppRuntimeException(); 262 } 263 264 274 @Test(expectedExceptions = SQLException .class) 275 public void testUsingClientTransWithAppRuntimeRollbackException() throws Exception { 276 super.testUsingClientTransWithAppRuntimeRollbackException(false); 277 } 278 279 } 280 | Popular Tags |