KickJava   Java API By Example, From Geeks To Geeks.

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


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

56 public class TestSLMiscInterceptor00 extends BaseMiscInterceptor00{
57
58     /**
59      * Gets bean instances used in the tests.
60      * @throws Exception if there is a problem with the bean initialization.
61      */

62     @SuppressWarnings JavaDoc("unchecked")
63     @BeforeMethod
64     public void startUp() throws Exception JavaDoc {
65         ItfSimpleBean<Integer JavaDoc> bean00 = getBeanRemoteInstance(SLSBSimpleInterceptorTest00.class, ItfSimpleBean.class);
66         ItfSimpleBean<Integer JavaDoc> bean01 = getBeanRemoteInstance(SLSBSimpleInterceptorTest01.class, ItfSimpleBean.class);
67         ItfSimpleBean<Integer JavaDoc> bean02 = getBeanRemoteInstance(SLSBSimpleInterceptorTest02.class, ItfSimpleBean.class);
68         ItfSimpleBean<Integer JavaDoc> bean03 = getBeanRemoteInstance(SLSBSimpleInterceptorTest03.class, ItfSimpleBean.class);
69         super.setBeans(bean00, bean01, bean02, bean03);
70     }
71
72     /**
73      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseMiscInterceptor00
74      */

75     @Override JavaDoc
76     @Test(groups = {"withInterceptor"})
77     public void testMiscPublicInterCallOrder() {
78         super.testMiscPublicInterCallOrder();
79     }
80
81     /**
82      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseMiscInterceptor00
83      */

84     @Override JavaDoc
85     @Test(groups = {"withInterceptor"})
86     public void testMiscProtectedInterCallOrder() {
87         super.testMiscProtectedInterCallOrder();
88     }
89
90     /**
91      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseMiscInterceptor00
92      */

93     @Override JavaDoc
94     @Test(groups = {"withInterceptor"})
95     public void testMiscPrivateInterCallOrder() {
96         super.testMiscPrivateInterCallOrder();
97     }
98
99     /**
100      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseMiscInterceptor00
101      */

102     @Override JavaDoc
103     @Test(groups = {"withInterceptor", "withInheritance"})
104     public void testMiscInheritanceInterCallOrder00() {
105         super.testMiscInheritanceInterCallOrder00();
106     }
107
108     /**
109      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseMiscInterceptor00
110      */

111     @Override JavaDoc
112     @Test(groups = {"withInterceptor", "withInheritance"})
113     public void testMiscInheritanceInterCallOrder01() {
114         super.testMiscInheritanceInterCallOrder01();
115     }
116
117     /**
118      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseMiscInterceptor00
119      */

120     @Override JavaDoc
121     @Test(groups = {"withInterceptor", "withInheritance"})
122     public void testMiscInheritanceInterCallOrder02() {
123         super.testMiscInheritanceInterCallOrder02();
124     }
125
126     /**
127      * @see org.objectweb.easybeans.tests.interceptors.business.base.invocationorder.BaseMiscInterceptor00
128      */

129     @Override JavaDoc
130     @Test(groups = {"withInterceptor"})
131     public void testMiscPackageInterCallOrder() {
132         super.testMiscPackageInterCallOrder();
133     }
134 }
135
Popular Tags