01: /**
02: * EasyBeans
03: * Copyright (C) 2006 Bull S.A.S.
04: * Contact: easybeans@ow2.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * 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: TestLocalAnnotation00.java 1970 2007-10-16 11:49:25Z benoitf $
23: * --------------------------------------------------------------------------
24: */package org.ow2.easybeans.tests.annotations;
25:
26: import org.ow2.easybeans.tests.common.ejbs.stateless.containermanaged.local.SLSBTestLocalAnnotation00;
27: import org.ow2.easybeans.tests.common.helper.EJBHelper;
28: import org.ow2.easybeans.tests.common.interfaces.ItfTestLocalAnnotation00;
29: import org.testng.annotations.BeforeMethod;
30: import org.testng.annotations.Test;
31:
32: /**
33: * Tests the Local annotation.
34: * @reference JSR 220-PROPOSED FINAL - SIMPLIFIED API - Chapter 10.2
35: * @requirement Application Server must be running; the beans
36: * S*LocalAnnotation* must be deployed.
37: * @setup gets the reference of S*LocalAnnotation*
38: * @author Eduardo Studzinski Estima de Castro
39: * @author Gisele Pinheiro Souza
40: */
41: public class TestLocalAnnotation00 implements ItfTestLocalAnnotation00 {
42:
43: /**
44: * Bean used in the tests.
45: */
46: private ItfTestLocalAnnotation00 bean;
47:
48: /**
49: * Creates a bean and use a method.
50: * @input List with no values inside
51: * @output "JNDI" String.
52: * @throws Exception if a problem occurs.
53: */
54: @Test
55: public void testRun00() throws Exception {
56: bean.testRun00();
57: }
58:
59: /**
60: * Creates a bean and use a method.
61: * @input List with no values inside
62: * @output "EJB" String.
63: * @throws Exception if a problem occurs.
64: */
65: @Test
66: public void testRun01() throws Exception {
67: bean.testRun01();
68: }
69:
70: /**
71: * Creates a bean and use a method.
72: * @input List with no values inside
73: * @output "EJB" String.
74: * @throws Exception if a problem occurs.
75: */
76: @Test
77: public void testRun02() throws Exception {
78: bean.testRun02();
79: }
80:
81: /**
82: * Gets bean instance used in the tests.
83: * @throws Exception if there is a problem with the bean initialization.
84: */
85: @BeforeMethod
86: public void startUp() throws Exception {
87: bean = EJBHelper.getBeanRemoteInstance(
88: SLSBTestLocalAnnotation00.class,
89: ItfTestLocalAnnotation00.class);
90: }
91: }
|