KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > interceptors > business > stateless > containermanaged > TestSLClassInterceptor00


1 /**
2  * EasyBeans
3  * Copyright (C) 2006 Bull S.A.S.
4  * Contact: easybeans@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: TestSLClassInterceptor00.java 360 2006-04-19 07:51:41Z studzine $
23  * --------------------------------------------------------------------------
24  */

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.ItfClassInterceptor;
30 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.interceptororder.SLSBClassInterceptorTest00;
31 import org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseClassInterceptor00;
32 import org.testng.annotations.BeforeMethod;
33 import org.testng.annotations.Test;
34
35 /**
36  * Verifies if the order to execute the class and method interceptors is
37  * correct. The correct order is:
38  * <li>Default Interceptor in the order of theirs specification.</li>
39  * <li>Interceptor Classes in the order of theirs specification.</li>
40  * <li>Interceptor Methods in the order of theirs specification.</li>
41  * <li>Interceptors annotated to a business method in the order of theirs specification.</li>
42  * <br> The bean used to the test has no interceptor class.
43  * @reference JSR 220 - EJB 3.0 Core - 12.3.1
44  * @requirement Application Server must be running; the bean
45  * org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.SLSBClassInterceptorTest00.java
46  * must be deployed.
47  * (Ant task: install.jar.tests.interceptor.business)
48  * @setup gets the reference of SLSBClassInterceptorTest00
49  * @author Gisele Pinheiro Souza
50  * @author Eduardo Studzinski Estima de Castro
51  */

52 public class TestSLClassInterceptor00 extends BaseClassInterceptor00{
53
54     /**
55      * Gets bean instance used in the tests.
56      * @throws Exception if there is a problem with the bean initialization.
57      */

58     @SuppressWarnings JavaDoc("unchecked")
59     @BeforeMethod
60     public void startUp() throws Exception JavaDoc {
61         ItfClassInterceptor<Integer JavaDoc> bean = getBeanRemoteInstance(SLSBClassInterceptorTest00.class, ItfClassInterceptor.class);
62         super.setBean(bean);
63     }
64
65     /**
66      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseClassInterceptor00
67      */

68     @Override JavaDoc
69     @Test(groups = {"onlyClassInterceptor"})
70     public void testClassInterCallOrder00() {
71         super.testClassInterCallOrder00();
72     }
73
74     /**
75      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseClassInterceptor00
76      */

77     @Override JavaDoc
78     @Test(groups = {"excludeDefaultInterceptor"})
79     public void testClassInterCallOrder01() {
80         super.testClassInterCallOrder01();
81     }
82
83     /**
84      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseClassInterceptor00
85      */

86     @Override JavaDoc
87     @Test(groups = {"excludeClassInterceptor", "onlyClassInterceptor"})
88     public void testClassInterCallOrder02() {
89         super.testClassInterCallOrder02();
90     }
91
92     /**
93      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseClassInterceptor00
94      */

95     @Override JavaDoc
96     @Test(groups = {"methodInterceptor", "excludeClassInterceptor"})
97     public void testClassInterCallOrder03() {
98         super.testClassInterCallOrder03();
99     }
100
101     /**
102      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseClassInterceptor00
103      */

104     @Override JavaDoc
105     @Test(groups = {"excludeDefaultInterceptor", "excludeClassInterceptor", "methodInterceptor", "withInheritance"})
106     public void testClassInterCallOrder04() {
107         super.testClassInterCallOrder04();
108     }
109
110     /**
111      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseClassInterceptor00
112      */

113     @Override JavaDoc
114     @Test(groups = {"methodInterceptor", "withInheritance"})
115     public void testClassInterCallOrder05() {
116         super.testClassInterCallOrder05();
117     }
118
119     /**
120      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseClassInterceptor00
121      */

122     @Override JavaDoc
123     @Test(groups = {"methodInterceptor"})
124     public void testClassInterCallOrder06() {
125         super.testClassInterCallOrder06();
126     }
127
128 }
129
Popular Tags