1 25 package org.objectweb.easybeans.tests.interceptors.business.base.exception; 26 27 import org.objectweb.easybeans.tests.common.ejbs.base.ItfExceptions; 28 import org.objectweb.easybeans.tests.common.exception.CustomException00; 29 import org.objectweb.easybeans.tests.common.exception.CustomException01; 30 import org.testng.annotations.Test; 31 32 37 public class BaseExceptions00 { 38 39 42 private ItfExceptions clBean; 43 44 48 @Test(groups = {"Exceptions"}, expectedExceptions = CustomException00.class) 49 public void testException00() throws Exception { 50 clBean.throwsOneException00(); 51 } 52 53 57 @Test(groups = {"Exceptions"}, expectedExceptions = CustomException01.class) 58 public void testException01() throws Exception { 59 clBean.throwsOneException01(); 60 } 61 62 66 @Test(groups = {"Exceptions"}, expectedExceptions = CustomException01.class) 67 public void testException02() throws Exception { 68 try { 69 clBean.throwsOneException00(); 70 } catch (CustomException00 e) { 71 clBean.throwsOneException01(); 72 } 73 } 74 75 79 @Test(groups = {"Exceptions"}, expectedExceptions = CustomException00.class) 80 public void testException03() throws Exception { 81 clBean.throwsTwoExceptions(); 82 } 83 84 88 public void setBean(final ItfExceptions bean){ 89 this.clBean = bean; 90 } 91 } 92 | Popular Tags |