KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > testbeancluster > test > SingleRetryInterceptorUnitTestCase


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
23 package org.jboss.test.testbeancluster.test;
24
25 import junit.framework.Test;
26 import junit.framework.TestSuite;
27
28 /**
29  * Tests the SingleRetryInterceptor.
30  *
31  * @author <a HREF="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
32  * @version $Revision$
33  */

34 public class SingleRetryInterceptorUnitTestCase extends RetryInterceptorUnitTestCase
35 {
36    // NOTE: these variables must be static as apparently a separate instance
37
// of this class is created for each test.
38
private static boolean deployed0 = false;
39    private static boolean deployed1 = false;
40    
41    /**
42     * Create a new SingleRetryInterceptorUnitTestCase.
43     *
44     * @param name
45     */

46    public SingleRetryInterceptorUnitTestCase(String JavaDoc name)
47    {
48       super(name);
49    }
50
51
52    public static Test suite() throws Exception JavaDoc
53    {
54       TestSuite suite = new TestSuite();
55       suite.addTest(new TestSuite(SingleRetryInterceptorUnitTestCase.class));
56
57       // Create an initializer for the test suite
58
DBSetup wrapper = new DBSetup(suite);
59       return wrapper;
60    }
61    
62
63    /**
64     * Override the superclass to not expect recovery.
65     */

66    public void testDeferredRecovery() throws Exception JavaDoc
67    {
68       deferredRecoveryTest(false);
69       }
70       
71    protected String JavaDoc getJndiSuffix()
72    {
73       return "_SingleRetry";
74    }
75
76    protected boolean isDeployed0()
77    {
78       return deployed0;
79    }
80    
81    protected void setDeployed0(boolean deployed)
82    {
83       deployed0 = deployed;
84    }
85    
86    protected boolean isDeployed1()
87    {
88       return deployed1;
89    }
90    
91    protected void setDeployed1(boolean deployed)
92    {
93       deployed1 = deployed;
94    }
95    
96 }
Popular Tags