KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > environment > reference > simpleentry > TestSimpleEnvironmentEntryDeclaration


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: TestSimpleEnvironmentEntryDeclaration.java 978 2006-07-28 13:19:14Z studzine $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.environment.reference.simpleentry;
26
27 import static org.objectweb.easybeans.tests.common.helper.EJBHelper.getBeanRemoteInstance;
28
29 import org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry;
30 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.simpleentry.SLSBSimpleEnvEntryReference00;
31 import org.testng.annotations.BeforeMethod;
32 import org.testng.annotations.Test;
33
34 /**
35  * Verifies if the simple environment entries declaration is following the JSR 220.
36  * The items covered in this test are: 16.4
37  * @reference JSR 220-PROPOSED FINAL
38  * @requirement Application Server must be running; the bean
39  * org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.simpleentry.*
40  * must be deployed. (Ant task: install.jar.tests.simple.environment.session)
41  * @setup gets the reference of the bean
42  * @author Eduardo Studzinski Estima de Castro
43  * @author Gisele Pinheiro Souza
44  */

45 public class TestSimpleEnvironmentEntryDeclaration {
46
47     /**
48      * Bean used in tests.
49      */

50     private ItfSimpleEnvEntry bean;
51
52     /**
53      * Gets bean instance used in the tests.
54      * @throws Exception if there is a problem with the bean initialization.
55      */

56     @BeforeMethod
57     public void startUp() throws Exception JavaDoc {
58         bean = getBeanRemoteInstance(SLSBSimpleEnvEntryReference00.class, ItfSimpleEnvEntry.class);
59     }
60
61     /**
62      * Tests if a string value can be obtained from the environment. The
63      * environment entry was declared using @Resource on the bean class.
64      * @input -
65      * @output -
66      */

67     @Test
68     public void testString00() {
69         bean.checkString00();
70     }
71
72     /**
73      * Tests if a character value can be obtained from the environment. The
74      * environment entry was declared using @Resource on the bean class.
75      * @input -
76      * @output -
77      */

78     @Test
79     public void testCharacter00() {
80         bean.checkCharacter00();
81     }
82
83     /**
84      * Tests if an integer value can be obtained from the environment. The
85      * environment entry was declared using @Resource on the bean class.
86      * @input -
87      * @output -
88      */

89     @Test
90     public void testInteger00() {
91         bean.checkInteger00();
92     }
93
94     /**
95      * Tests if a boolean value can be obtained from the environment. The
96      * environment entry was declared using @Resource on the bean class.
97      * @input -
98      * @output -
99      */

100     @Test
101     public void testBoolean00() {
102         bean.checkBoolean00();
103     }
104
105     /**
106      * Tests if a double value can be obtained from the environment. The
107      * environment entry was declared using @Resource on the bean class.
108      * @input -
109      * @output -
110      */

111     @Test
112     public void testDouble00() {
113         bean.checkDouble00();
114     }
115
116     /**
117      * Tests if a byte value can be obtained from the environment. The
118      * environment entry was declared using @Resource on the bean class.
119      * @input -
120      * @output -
121      */

122     @Test
123     public void testByte00() {
124         bean.checkByte00();
125     }
126
127     /**
128      * Tests if a short value can be obtained from the environment. The
129      * environment entry was declared using @Resource on the bean class.
130      * @input -
131      * @output -
132      */

133     @Test
134     public void testShort00() {
135         bean.checkByte00();
136     }
137
138     /**
139      * Tests if a byte value can be obtained from the environment. The
140      * environment entry was declared using @Resource on the bean class.
141      * @input -
142      * @output -
143      */

144     @Test
145     public void testLong00() {
146         bean.checkLong00();
147     }
148
149     /**
150      * Tests if a float value can be obtained from the environment. The
151      * environment entry was declared using @Resource on the bean class.
152      * @input -
153      * @output -
154      */

155     @Test
156     public void testFloat00() {
157         bean.checkFloat00();
158     }
159 }
160
Popular Tags