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: TestSimpleEnvironmentEntryMethodInjection.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.SLSBSimpleEnvEntryMethodInjection00;
030: import org.testng.annotations.BeforeMethod;
031: import org.testng.annotations.Test;
032:
033: /**
034: * Verifies if the simple environment entries injection using setXXX() method 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 TestSimpleEnvironmentEntryMethodInjection {
045:
046: /**
047: * Bean used in tests.
048: */
049: private ItfSimpleEnvEntry bean;
050:
051: /**
052: * Gets bean instances 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: SLSBSimpleEnvEntryMethodInjection00.class,
059: ItfSimpleEnvEntry.class);
060:
061: }
062:
063: /**
064: * Tests if a string value was correctly injected.
065: * @input -
066: * @output -
067: */
068: @Test
069: public void testString00() {
070: bean.checkString00();
071: }
072:
073: /**
074: * Tests if a character value was correctly injected.
075: * @input -
076: * @output -
077: */
078: @Test
079: public void testCharacter00() {
080: bean.checkCharacter00();
081: }
082:
083: /**
084: * Tests if an integer value was correctly injected.
085: * @input -
086: * @output -
087: */
088: @Test
089: public void testInteger00() {
090: bean.checkInteger00();
091: }
092:
093: /**
094: * Tests if a boolean value was correctly injected.
095: * @input -
096: * @output -
097: */
098: @Test
099: public void testBoolean00() {
100: bean.checkBoolean00();
101: }
102:
103: /**
104: * Tests if a double value was correctly injected.
105: * @input -
106: * @output -
107: */
108: @Test
109: public void testDouble00() {
110: bean.checkDouble00();
111: }
112:
113: /**
114: * Tests if a byte value was correctly injected.
115: * @input -
116: * @output -
117: */
118: @Test
119: public void testByte00() {
120: bean.checkByte00();
121: }
122:
123: /**
124: * Tests if a short value was correctly injected.
125: * @input -
126: * @output -
127: */
128: @Test
129: public void testShort00() {
130: bean.checkByte00();
131: }
132:
133: /**
134: * Tests if a byte value was correctly injected.
135: * @input -
136: * @output -
137: */
138: @Test
139: public void testLong00() {
140: bean.checkLong00();
141: }
142:
143: /**
144: * Tests if a float value was correctly injected.
145: * @input -
146: * @output -
147: */
148: @Test
149: public void testFloat00() {
150: bean.checkFloat00();
151: }
152:
153: }
|