1 25 package org.objectweb.easybeans.tests.transaction.containermanaged.stateless; 26 27 import java.sql.SQLException ; 28 29 import javax.ejb.EJBTransactionRequiredException ; 30 31 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.transaction.SLSBContainerTransactionMandatory; 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 TestMandatoryRemoteSLSB extends TestMandatory { 50 51 52 56 @BeforeMethod 57 public void createBean() throws Exception { 58 super.createBean(SLSBContainerTransactionMandatory.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 82 86 @Test(groups = {"rollback"}) 87 @Override 88 public void testSetRollbackOnlyWithUserTransaction() throws Exception { 89 super.testSetRollbackOnlyWithUserTransaction(); 90 } 91 92 96 @Test(groups = {"rollback"}, expectedExceptions = EJBTransactionRequiredException .class) 97 @Override 98 public void testSetRollbackOnlyWithoutUserTransaction() throws Exception { 99 super.testSetRollbackOnlyWithoutUserTransaction(); 100 } 101 102 106 @Test(groups = {"rollback"}) 107 @Override 108 public void testGetRollbackOnlyWithUserTransaction() throws Exception { 109 super.testGetRollbackOnlyWithUserTransaction(); 110 111 } 112 113 117 @Test(groups = {"rollback"}, expectedExceptions = EJBTransactionRequiredException .class) 118 @Override 119 public void testGetRollbackOnlyWithoutUserTransaction() throws Exception { 120 super.testGetRollbackOnlyWithoutUserTransaction(); 121 } 122 123 126 @BeforeMethod 127 @Override 128 public void deleteTable() { 129 super.deleteTable(); 130 } 131 132 136 @Test(groups = {"general attribute features"}, expectedExceptions = java.lang.IllegalStateException .class) 137 @Override 138 public void testGetUserTransactionWithEJBContext() throws Exception { 139 super.testGetUserTransactionWithEJBContext(); 140 } 141 142 146 @Test(groups = {"general attribute features"}, expectedExceptions = javax.naming.NameNotFoundException .class) 147 @Override 148 public void testGetUserTransactionWithLookup() throws Exception { 149 super.testGetUserTransactionWithLookup(); 150 } 151 152 156 @BeforeMethod 157 @Override 158 public void cleanTransaction() throws Exception { 159 super.cleanTransaction(); 160 } 161 } 162 | Popular Tags |