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: TestEJBRefDeclaration.java 1970 2007-10-16 11:49:25Z benoitf $
023: * --------------------------------------------------------------------------
024: */package org.ow2.easybeans.tests.environment.reference.ejb;
025:
026: import static org.ow2.easybeans.tests.common.helper.EJBHelper.getBeanRemoteInstance;
027:
028: import org.ow2.easybeans.tests.common.ejbs.base.ItfEJBRef;
029: import org.ow2.easybeans.tests.common.ejbs.stateless.containermanaged.ejbref.SLSBEjbRefDeclaration;
030: import org.testng.annotations.BeforeMethod;
031: import org.testng.annotations.Test;
032:
033: /**
034: * Verifies if the ejb references injection is following the JSR 220.
035: * @reference JSR 220 - EJB 3.0 Core - 16.5
036: * @requirement Application Server must be running; the bean
037: * org.ow2.easybeans.tests.common.ejbs.stateless.containermanaged.ejbreference.*
038: * must be deployed.
039: * @setup gets the reference of the bean
040: * @author Eduardo Studzinski Estima de Castro
041: * @author Gisele Pinheiro Souza
042: */
043: public class TestEJBRefDeclaration {
044:
045: /**
046: * Bean used in tests.
047: */
048: private ItfEJBRef bean;
049:
050: /**
051: * Gets bean instances used in the tests.
052: * @throws Exception if there is a problem with the bean initialization.
053: */
054: @BeforeMethod
055: public void startUp() throws Exception {
056: bean = getBeanRemoteInstance(SLSBEjbRefDeclaration.class,
057: ItfEJBRef.class);
058: }
059:
060: /**
061: * Checks if the annotation @EJB is working properly.
062: */
063: @Test
064: public void test00() {
065: bean.check00();
066: }
067:
068: /**
069: * Checks if the annotation @EJB is working properly.
070: */
071: @Test
072: public void test01() {
073: bean.check01();
074: }
075:
076: /**
077: * Checks if the annotation @EJB is working properly.
078: */
079: @Test
080: public void test02() {
081: bean.check02();
082: }
083:
084: /**
085: * Checks if the annotation @EJB is working properly.
086: */
087: @Test
088: public void test03() {
089: bean.check03();
090: }
091:
092: /**
093: * Checks if the annotation @EJB is working properly.
094: */
095: @Test
096: public void test04() {
097: bean.check04();
098: }
099:
100: /**
101: * Checks if the annotation @EJB is working properly.
102: */
103: @Test
104: public void test05() {
105: bean.check05();
106: }
107:
108: /**
109: * Checks if the annotation @EJB is working properly.
110: */
111: @Test
112: public void test06() {
113: bean.check06();
114: }
115:
116: }
|