1 25 package org.objectweb.easybeans.tests.interceptors.business.stateless.containermanaged; 26 27 import static org.objectweb.easybeans.tests.common.helper.EJBHelper.getBeanRemoteInstance; 28 29 import org.objectweb.easybeans.tests.common.ejbs.base.ItfAccessEJB; 30 import org.objectweb.easybeans.tests.common.ejbs.base.ItfAccessEMFactory; 31 import org.objectweb.easybeans.tests.common.ejbs.base.ItfAccessEntityManager; 32 import org.objectweb.easybeans.tests.common.ejbs.base.ItfAccessJNDI; 33 import org.objectweb.easybeans.tests.common.ejbs.base.ItfAccessResourceManager; 34 import org.objectweb.easybeans.tests.common.ejbs.base.ItfAccessSessionContext; 35 import org.objectweb.easybeans.tests.common.ejbs.base.ItfAccessUserTransaction; 36 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.interceptoraccess.SLSBAccessInterceptorTest01; 37 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.interceptoraccess.SLSBAccessUserTxInterceptor01; 38 import org.objectweb.easybeans.tests.common.exception.CustomException00; 39 import org.objectweb.easybeans.tests.interceptors.business.base.access.BaseAccessOperationsInterceptor00; 40 import org.testng.annotations.BeforeClass; 41 import org.testng.annotations.Test; 42 43 44 55 public class TestSLAccessInterceptor01 extends BaseAccessOperationsInterceptor00{ 56 57 61 @BeforeClass 62 public void startUp() throws Exception { 63 ItfAccessJNDI bean00 = getBeanRemoteInstance(SLSBAccessInterceptorTest01.class, ItfAccessJNDI.class); 64 ItfAccessEJB bean01 = getBeanRemoteInstance(SLSBAccessInterceptorTest01.class, ItfAccessEJB.class); 65 ItfAccessResourceManager bean02 = getBeanRemoteInstance(SLSBAccessInterceptorTest01.class, 66 ItfAccessResourceManager.class); 67 ItfAccessEntityManager bean03 = getBeanRemoteInstance(SLSBAccessInterceptorTest01.class, ItfAccessEntityManager.class); 68 ItfAccessEMFactory bean04 = getBeanRemoteInstance(SLSBAccessInterceptorTest01.class, ItfAccessEMFactory.class); 69 ItfAccessSessionContext bean05 = getBeanRemoteInstance(SLSBAccessInterceptorTest01.class, ItfAccessSessionContext.class); 70 super.setBeans(bean00, bean01, bean02, bean03, bean04, bean05, null); 71 } 72 73 81 @Override 82 @Test(groups = {"java:comp/env access"}) 83 public void testJNDI00() throws Exception { 84 super.testJNDI00(); 85 } 86 87 95 @Override 96 @Test(groups = {"EJB access"}) 97 public void testEJB00() throws Exception { 98 super.testEJB00(); 99 } 100 101 109 @Override 110 @Test(groups = {"Resource access"}) 111 public void testResource00() throws Exception { 112 super.testResource00(); 113 } 114 115 123 @Override 124 @Test(groups = {"Entity Manager access"}) 125 public void testEntityManager00() throws Exception { 126 super.testEntityManager00(); 127 } 128 129 137 @Override 138 @Test(groups = {"Entity Factory access"}) 139 public void testEntityFactory00() throws Exception { 140 super.testEntityFactory00(); 141 } 142 143 151 @Override 152 @Test(groups = {"SessionContext access"}) 153 public void testSessionContext00() throws Exception { 154 super.testSessionContext00(); 155 } 156 157 165 @Override 166 @Test(groups = {"UserTransaction access"}, expectedExceptions = CustomException00.class) 167 @SuppressWarnings ("unused") 168 public void testUserTransaction00() throws Exception { 169 ItfAccessUserTransaction bean = getBeanRemoteInstance(SLSBAccessUserTxInterceptor01.class, 170 ItfAccessUserTransaction.class); 171 bean.accessUserTransaction(null); 172 } 173 174 } 175 | Popular Tags |