KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > timerservice > timeout > stateless > beanmanaged > TestSLBeanManagedTimeoutAccess


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: TestSLBeanManagedTimeoutAccess.java 979 2006-07-28 13:19:50Z studzine $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.timerservice.timeout.stateless.beanmanaged;
26
27 import static org.objectweb.easybeans.tests.common.helper.EJBHelper.getBeanRemoteInstance;
28
29 import org.objectweb.easybeans.tests.common.ejbs.base.timer.ItfCreateTimer;
30 import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType;
31 import org.objectweb.easybeans.tests.common.ejbs.stateless.beanmanaged.timer.SLSBBMTTimeoutCallbackAccess00;
32 import org.objectweb.easybeans.tests.timerservice.timeout.base.BaseTestTimeout;
33 import org.testng.annotations.AfterMethod;
34 import org.testng.annotations.BeforeClass;
35 import org.testng.annotations.BeforeMethod;
36 import org.testng.annotations.Test;
37
38
39 /**
40  * Verifies if the timeout callback can perform the operations defined by the specification.
41  * @reference JSR 220 - EJB 3.0 Core - Chapter 4 - Table 2
42  * @requirement Application Server must be running.<br>
43  * (Ant task: install.jar.tests.timerservice)
44  * @author Eduardo Studzinski Estima de Castro
45  * @author Gisele Pinheiro Souza
46  */

47 public class TestSLBeanManagedTimeoutAccess extends BaseTestTimeout{
48
49     /**
50      * Bean.
51      */

52     private ItfCreateTimer bean;
53
54     /**
55      * Startup.
56      * @throws Exception if there is a problem.
57      */

58     @Override JavaDoc
59     @BeforeClass
60     public void startUp() throws Exception JavaDoc {
61         super.startUp();
62     }
63
64     /**
65      * Creates a bean instance.
66      * @throws Exception if there is a problem.
67      */

68     @BeforeMethod
69     public void startBean() throws Exception JavaDoc {
70         bean = getBeanRemoteInstance(SLSBBMTTimeoutCallbackAccess00.class, ItfCreateTimer.class);
71     }
72
73     /**
74      * Gets the name of the bean where the timer was started.
75      * @return name
76      */

77     @Override JavaDoc
78     public String JavaDoc getBeanName() {
79         return SLSBBMTTimeoutCallbackAccess00.class.getName();
80     }
81
82     /**
83      * Starts the timer.
84      * @param type operation type
85      */

86     @Override JavaDoc
87     public void requestStartTimer(final OperationType type) {
88         bean.startTimer(ItfCreateTimer.DURATION, type);
89     }
90
91     /**
92      * Tests if a timeout callback method is allowed to access an EJB.
93      * @throws Exception if a problem occurs.
94      */

95     @Override JavaDoc
96     @Test
97     public void testAccessEJB00() throws Exception JavaDoc {
98         super.testAccessEJB00();
99     }
100
101     /**
102      * Tests if a timeout callback method is allowed to access the Resource
103      * Manager.
104      * @throws Exception if a problem occurs.
105      */

106     @Override JavaDoc
107     @Test
108     public void testAccessResourceManager00() throws Exception JavaDoc {
109         super.testAccessResourceManager00();
110     }
111
112     /**
113      * Tests if a timeout callback method is allowed to access the Entity
114      * Manager.
115      * @throws Exception if a problem occurs.
116      */

117     @Override JavaDoc
118     @Test
119     public void testAccessEntityManager00() throws Exception JavaDoc {
120         super.testAccessEntityManager00();
121     }
122
123     /**
124      * Tests if a timeout callback method is allowed to access the Entity
125      * Manager Factory.
126      * @throws Exception if a problem occurs.
127      */

128     @Override JavaDoc
129     @Test
130     public void testAccessEntityManagerFactory00() throws Exception JavaDoc {
131         super.testAccessEntityManagerFactory00();
132     }
133
134     /**
135      * Tests if a timeout callback method is allowed to access the Timer
136      * Service.
137      * @throws Exception if a problem occurs.
138      */

139     @Override JavaDoc
140     @Test
141     public void testAccessTimerService00() throws Exception JavaDoc {
142         super.testAccessTimerService00();
143     }
144
145     /**
146      * Tests if a timeout callback method is allowed to access the
147      * UserTransaction.
148      * @throws Exception if a problem occurs.
149      */

150     @Override JavaDoc
151     @Test
152     public void testAccessUserTransaction00() throws Exception JavaDoc {
153         super.testAccessUserTransaction00();
154     }
155
156     /**
157      * Clears logs.
158      * @throws Exception if a problem occurs.
159      */

160     @Override JavaDoc
161     @AfterMethod
162     public void tearDownMethod() throws Exception JavaDoc {
163         super.tearDownMethod();
164     }
165
166 }
167
Popular Tags