KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > transaction > containermanaged > stateless > TestSupportsRemoteSLSB


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: TestSupportsRemoteSLSB.java 980 2006-07-28 13:20:32Z studzine $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.transaction.containermanaged.stateless;
26
27 import java.sql.SQLException JavaDoc;
28
29 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.transaction.SLSBContainerTransactionSupports;
30 import org.objectweb.easybeans.tests.transaction.containermanaged.base.TestSupports;
31 import org.testng.annotations.BeforeClass;
32 import org.testng.annotations.BeforeMethod;
33 import org.testng.annotations.Test;
34
35 /**
36  * Verifies if the container-managed transaction in the stateless bean is
37  * following the JSR 220.The items covered in this test are: 12.6.2.3.
38  * @reference JSR 220-PROPOSED FINAL
39  * @requirement Application Server must be running; the bean
40  * org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.SLSBContainerTransactionSupports
41  * must be deployed.
42  * @setup gets the reference of SLSBContainerTransactionSupports and binds the
43  * databases specified in the EmbeddedTest.
44  * @author Gisele Pinheiro Souza
45  * @author Eduardo Studzinski Estima de Castro
46  */

47 public class TestSupportsRemoteSLSB extends TestSupports {
48
49     /**
50      * Creates a new instance of the bean.
51      * @throws Exception if a lookup error occurs.
52      */

53     @BeforeMethod
54     public void createBean() throws Exception JavaDoc {
55         super.createBean(SLSBContainerTransactionSupports.class);
56     }
57
58     /**
59      * @see org.objectweb.easybeans.tests.transaction.containermanaged.base.TestSupports
60      * @throws Exception if an error during the test startup occurs.
61      */

62     @BeforeClass
63     @Override JavaDoc
64     public void setup() throws Exception JavaDoc {
65         super.setup();
66     }
67
68
69     /**
70      * @see org.objectweb.easybeans.tests.transaction.containermanaged.base.TestSupports
71      * @throws Exception if an error during the tests occurs.
72      */

73     @Test(groups = {"supports attribute features"}, expectedExceptions = SQLException JavaDoc.class)
74     @Override JavaDoc
75     public void testUsingClientTrans() throws Exception JavaDoc {
76         super.testUsingClientTrans();
77     }
78
79     /**
80      * @see org.objectweb.easybeans.tests.transaction.containermanaged.base.TestSupports
81      * @throws Exception if an error during the test occurs.
82      */

83     @Test(groups = {"roll back"}, expectedExceptions = java.lang.IllegalStateException JavaDoc.class)
84     @Override JavaDoc
85     public void testSetRollbackOnly() throws Exception JavaDoc {
86         super.testSetRollbackOnly();
87     }
88
89     /**
90      * @see org.objectweb.easybeans.tests.transaction.containermanaged.base.TestSupports
91      * @throws Exception if an error during the test occurs.
92      */

93     @Test(groups = {"roll back"}, expectedExceptions = java.lang.IllegalStateException JavaDoc.class)
94     @Override JavaDoc
95     public void testGetRollbackOnly() throws Exception JavaDoc {
96         super.testGetRollbackOnly();
97     }
98
99     /**
100      * @see org.objectweb.easybeans.tests.transaction.containermanaged.base.TestSupports
101      */

102     @BeforeMethod
103     @Override JavaDoc
104     public void deleteTable() {
105         super.deleteTable();
106     }
107
108     /**
109      * @see org.objectweb.easybeans.tests.transaction.containermanaged.base.TestSupports
110      * @throws Exception if an error during the tests occurs.
111      */

112     @Test(groups = {"general attribute features"}, expectedExceptions = java.lang.IllegalStateException JavaDoc.class)
113     @Override JavaDoc
114     public void testGetUserTransactionWithEJBContext() throws Exception JavaDoc {
115         super.testGetUserTransactionWithEJBContext();
116     }
117
118     /**
119      * @see org.objectweb.easybeans.tests.transaction.containermanaged.base.TestSupports
120      * @throws Exception if an error during the tests occurs.
121      */

122     @Test(groups = {"general attribute features"}, expectedExceptions = javax.naming.NameNotFoundException JavaDoc.class)
123     @Override JavaDoc
124     public void testGetUserTransactionWithLookup() throws Exception JavaDoc {
125         super.testGetUserTransactionWithLookup();
126     }
127
128     /**
129      * Makes a rollback in the transaction actives.
130      * @throws Exception if a transaction exception occurs.
131      */

132     @BeforeMethod
133     @Override JavaDoc
134     public void cleanTransaction() throws Exception JavaDoc{
135         super.cleanTransaction();
136     }
137 }
138
Popular Tags