1 25 package org.objectweb.easybeans.tests.interceptors.business.stateless.containermanaged; 26 27 import static org.objectweb.easybeans.tests.common.helper.EJBHelper.getBeanRemoteInstance; 28 import static org.objectweb.easybeans.tests.common.helper.ExceptionHelper.checkCause; 29 30 import javax.ejb.EJBException ; 31 32 import org.objectweb.easybeans.tests.common.ejbs.base.ItfExceptions; 33 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.interceptorexception.SLSBInterceptorExceptions00; 34 import org.objectweb.easybeans.tests.common.exception.CustomException00; 35 import org.objectweb.easybeans.tests.common.exception.CustomException01; 36 import org.objectweb.easybeans.tests.interceptors.business.base.exception.BaseExceptions00; 37 import org.testng.annotations.BeforeMethod; 38 import org.testng.annotations.Test; 39 40 50 public class TestSLExceptions00 extends BaseExceptions00{ 51 52 56 @BeforeMethod 57 public void startUp() throws Exception { 58 ItfExceptions bean = getBeanRemoteInstance(SLSBInterceptorExceptions00.class, ItfExceptions.class); 59 super.setBean(bean); 60 } 61 62 66 @Override 67 @Test(groups = {"Exceptions"}, expectedExceptions = CustomException00.class) 68 public void testException00() throws Exception { 69 super.testException00(); 70 } 71 72 76 @Override 77 @Test(groups = {"Exceptions"}) 78 public void testException01() throws Exception { 79 try{ 80 super.testException01(); 81 }catch(EJBException e){ 82 checkCause(e, CustomException01.class); 83 } 84 85 } 86 87 91 @Override 92 @Test(groups = {"Exceptions"}) 93 public void testException02() throws Exception { 94 try{ 95 super.testException02(); 96 }catch(EJBException e){ 97 checkCause(e, CustomException01.class); 98 } 99 } 100 101 105 @Override 106 @Test(groups = {"Exceptions"}, expectedExceptions = {CustomException00.class, CustomException01.class}) 107 public void testException03() throws Exception { 108 super.testException03(); 109 } 110 } 111 | Popular Tags |