001: /**
002: * EasyBeans
003: * Copyright (C) 2006 Bull S.A.S.
004: * Contact: easybeans@ow2.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: TestSimpleEnvironmentEntryDeclaration.java 1970 2007-10-16 11:49:25Z benoitf $
023: * --------------------------------------------------------------------------
024: */package org.ow2.easybeans.tests.environment.reference.simpleentry;
025:
026: import static org.ow2.easybeans.tests.common.helper.EJBHelper.getBeanRemoteInstance;
027:
028: import org.ow2.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry;
029: import org.ow2.easybeans.tests.common.ejbs.stateless.containermanaged.simpleentry.SLSBSimpleEnvEntryReference00;
030: import org.testng.annotations.BeforeMethod;
031: import org.testng.annotations.Test;
032:
033: /**
034: * Verifies if the simple environment entries declaration is following the JSR 220.
035: * The items covered in this test are: 16.4
036: * @reference JSR 220-PROPOSED FINAL
037: * @requirement Application Server must be running; the bean
038: * org.ow2.easybeans.tests.common.ejbs.stateless.containermanaged.simpleentry.*
039: * must be deployed. (Ant task: install.jar.tests.simple.environment.session)
040: * @setup gets the reference of the bean
041: * @author Eduardo Studzinski Estima de Castro
042: * @author Gisele Pinheiro Souza
043: */
044: public class TestSimpleEnvironmentEntryDeclaration {
045:
046: /**
047: * Bean used in tests.
048: */
049: private ItfSimpleEnvEntry bean;
050:
051: /**
052: * Gets bean instance used in the tests.
053: * @throws Exception if there is a problem with the bean initialization.
054: */
055: @BeforeMethod
056: public void startUp() throws Exception {
057: bean = getBeanRemoteInstance(
058: SLSBSimpleEnvEntryReference00.class,
059: ItfSimpleEnvEntry.class);
060: }
061:
062: /**
063: * Tests if a string value can be obtained from the environment. The
064: * environment entry was declared using @Resource on the bean class.
065: * @input -
066: * @output -
067: */
068: @Test
069: public void testString00() {
070: bean.checkString00();
071: }
072:
073: /**
074: * Tests if a character value can be obtained from the environment. The
075: * environment entry was declared using @Resource on the bean class.
076: * @input -
077: * @output -
078: */
079: @Test
080: public void testCharacter00() {
081: bean.checkCharacter00();
082: }
083:
084: /**
085: * Tests if an integer value can be obtained from the environment. The
086: * environment entry was declared using @Resource on the bean class.
087: * @input -
088: * @output -
089: */
090: @Test
091: public void testInteger00() {
092: bean.checkInteger00();
093: }
094:
095: /**
096: * Tests if a boolean value can be obtained from the environment. The
097: * environment entry was declared using @Resource on the bean class.
098: * @input -
099: * @output -
100: */
101: @Test
102: public void testBoolean00() {
103: bean.checkBoolean00();
104: }
105:
106: /**
107: * Tests if a double value can be obtained from the environment. The
108: * environment entry was declared using @Resource on the bean class.
109: * @input -
110: * @output -
111: */
112: @Test
113: public void testDouble00() {
114: bean.checkDouble00();
115: }
116:
117: /**
118: * Tests if a byte value can be obtained from the environment. The
119: * environment entry was declared using @Resource on the bean class.
120: * @input -
121: * @output -
122: */
123: @Test
124: public void testByte00() {
125: bean.checkByte00();
126: }
127:
128: /**
129: * Tests if a short value can be obtained from the environment. The
130: * environment entry was declared using @Resource on the bean class.
131: * @input -
132: * @output -
133: */
134: @Test
135: public void testShort00() {
136: bean.checkByte00();
137: }
138:
139: /**
140: * Tests if a byte value can be obtained from the environment. The
141: * environment entry was declared using @Resource on the bean class.
142: * @input -
143: * @output -
144: */
145: @Test
146: public void testLong00() {
147: bean.checkLong00();
148: }
149:
150: /**
151: * Tests if a float value can be obtained from the environment. The
152: * environment entry was declared using @Resource on the bean class.
153: * @input -
154: * @output -
155: */
156: @Test
157: public void testFloat00() {
158: bean.checkFloat00();
159: }
160: }
|