KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > lock > test > EnterpriseEntityStressTestCase


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.test.lock.test;
23
24 import junit.framework.Test;
25 import junit.framework.TestCase;
26 import junit.framework.TestSuite;
27
28 import org.jboss.test.JBossTestCase;
29
30 /**
31  * #Description of the Class
32  */

33 public class EnterpriseEntityStressTestCase
34        extends JBossTestCase
35 {
36    /**
37     * Constructor for the EnterpriseEntityStressTestCase object
38     *
39     * @param name Description of Parameter
40     */

41    public EnterpriseEntityStressTestCase(String JavaDoc name)
42    {
43       super(name);
44    }
45
46    /**
47     * Setup the test suite.
48     *
49     * @return The test suite
50     */

51    public static Test suite() throws Exception JavaDoc
52    {
53       TestSuite suite = new TestSuite();
54
55
56       // Test ejb.plugins.lock.QueuedPessimisticEJBLock
57
suite.addTest(new TestSuite(Entity_Option_A_Test.class));
58       suite.addTest(new TestSuite(Entity_Option_B_Test.class));
59       suite.addTest(new TestSuite(Entity_Option_C_Test.class));
60       /* FIXME: These tests are broken
61       suite.addTest(new TestSuite(Entity_Option_D_Test.class));
62
63       suite.addTest(new TestSuite(Entity_Option_C_Multi_Test.class));
64       */

65
66       return getDeploySetup(suite, "locktest.jar");
67    }
68
69    /**
70     * #Description of the Class
71     */

72    public static class Entity_Option_A_Test
73           extends EnterpriseEntityTest
74    {
75       /**
76        * Constructor for the Entity_Option_A_Test object
77        *
78        * @param name Description of Parameter
79        */

80       public Entity_Option_A_Test(String JavaDoc name)
81       {
82          super(name, "EnterpriseEntity_A");
83       }
84    }
85
86    /**
87     * #Description of the Class
88     */

89    public static class Entity_Option_B_Test
90           extends EnterpriseEntityTest
91    {
92       /**
93        * Constructor for the Entity_Option_B_Test object
94        *
95        * @param name Description of Parameter
96        */

97       public Entity_Option_B_Test(String JavaDoc name)
98       {
99          super(name, "EnterpriseEntity_B");
100       }
101       
102       public void testB2B() throws Exception JavaDoc
103       {
104          // This test will not work with commit-option B, because
105
// all fields of the entity bean are nulled out on activation
106
}
107       
108    }
109
110    /**
111     * #Description of the Class
112     */

113    public static class Entity_Option_C_Test
114           extends EnterpriseEntityTest
115    {
116       /**
117        * Constructor for the Entity_Option_C_Test object
118        *
119        * @param name Description of Parameter
120        */

121       public Entity_Option_C_Test(String JavaDoc name)
122       {
123          super(name, "EnterpriseEntity_C");
124       }
125       public void testB2B() throws Exception JavaDoc
126       {
127          // This test will not work with commit-option C, because
128
// all fields of the entity bean are nulled out on activation
129
}
130    }
131
132    /**
133     * #Description of the Class
134     */

135    public static class Entity_Option_D_Test
136           extends EnterpriseEntityTest
137    {
138       // This test will not work a cache invalidation nulls the data
139

140       /**
141        * Constructor for the Entity_Option_D_Test object
142        *
143        * @param name Description of Parameter
144        */

145       public Entity_Option_D_Test(String JavaDoc name)
146       {
147          super(name, "EnterpriseEntity_D");
148       }
149    }
150
151    /**
152     * #Description of the Class
153     */

154    public static class Entity_Option_B_Multi_Test
155           extends EnterpriseEntityTest
156    {
157       /**
158        * Constructor for the Entity_Option_B_Multi_Test object
159        *
160        * @param name Description of Parameter
161        */

162       public Entity_Option_B_Multi_Test(String JavaDoc name)
163       {
164          super(name, "EnterpriseEntity_B_Multi");
165       }
166       public void testB2B() throws Exception JavaDoc
167       {
168          // This test will not work with commit-option B, because
169
// all fields of the entity bean are nulled out on activation
170
}
171    }
172
173    /**
174     * #Description of the Class
175     */

176    public static class Entity_Option_C_Multi_Test
177           extends EnterpriseEntityTest
178    {
179       /**
180        * Constructor for the Entity_Option_C_Multi_Test object
181        *
182        * @param name Description of Parameter
183        */

184       public Entity_Option_C_Multi_Test(String JavaDoc name)
185       {
186          super(name, "EnterpriseEntity_C_Multi");
187       }
188       public void testB2B() throws Exception JavaDoc
189       {
190          // This test will not work with commit-option C, because
191
// all fields of the entity bean are nulled out on activation
192
}
193    }
194
195 }
196
197
Popular Tags