KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > annotations > TestLocalAnnotation00


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: TestLocalAnnotation00.java 977 2006-07-28 13:18:26Z studzine $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.annotations;
26
27 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.local.SLSBTestLocalAnnotation00;
28 import org.objectweb.easybeans.tests.common.helper.EJBHelper;
29 import org.objectweb.easybeans.tests.common.interfaces.ItfTestLocalAnnotation00;
30 import org.testng.annotations.BeforeMethod;
31 import org.testng.annotations.Test;
32
33 /**
34  * Tests the Local annotation.
35  * @reference JSR 220-PROPOSED FINAL - SIMPLIFIED API - Chapter 10.2
36  * @requirement Application Server must be running; the beans
37  * S*LocalAnnotation* must be deployed.
38  * @setup gets the reference of S*LocalAnnotation*
39  * @author Eduardo Studzinski Estima de Castro
40  * @author Gisele Pinheiro Souza
41  */

42 public class TestLocalAnnotation00 implements ItfTestLocalAnnotation00{
43
44     /**
45      * Bean used in the tests.
46      */

47     private ItfTestLocalAnnotation00 bean;
48
49     /**
50      * Creates a bean and use a method.
51      * @input List with no values inside
52      * @output "JNDI" String.
53      * @throws Exception if a problem occurs.
54      */

55     @Test
56     public void testRun00() throws Exception JavaDoc{
57         bean.testRun00();
58     }
59
60     /**
61      * Creates a bean and use a method.
62      * @input List with no values inside
63      * @output "EJB" String.
64      * @throws Exception if a problem occurs.
65      */

66     @Test
67     public void testRun01() throws Exception JavaDoc{
68         bean.testRun01();
69     }
70
71     /**
72      * Creates a bean and use a method.
73      * @input List with no values inside
74      * @output "EJB" String.
75      * @throws Exception if a problem occurs.
76      */

77     @Test
78     public void testRun02() throws Exception JavaDoc{
79         bean.testRun02();
80     }
81
82     /**
83      * Gets bean instance used in the tests.
84      * @throws Exception if there is a problem with the bean initialization.
85      */

86     @BeforeMethod
87     public void startUp() throws Exception JavaDoc{
88         bean = EJBHelper.getBeanRemoteInstance(SLSBTestLocalAnnotation00.class, ItfTestLocalAnnotation00.class);
89     }
90 }
91
Popular Tags