User: d_jencks
Date: 01/09/11 21:55:40
Added: src/main/org/jboss/test/readahead/test
ReadAheadUnitTestCase.java
Removed: src/main/org/jboss/test/readahead/test Main.java
Log:
Changed naming scheme of tests to *UnitTestCase.java for short running tests and
*StressTestCase.java for lengthy tests. Made tests-unit and tests-stress targets in
build.xml
Revision Changes Path
1.1
jbosstest/src/main/org/jboss/test/readahead/test/ReadAheadUnitTestCase.java
Index: ReadAheadUnitTestCase.java
===================================================================
package org.jboss.test.readahead.test;
import javax.naming.Context;
import javax.naming.InitialContext;
import junit.framework.TestCase;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.jboss.test.readahead.interfaces.CMPFindTestSessionHome;
import org.jboss.test.readahead.interfaces.CMPFindTestSessionRemote;
import org.jboss.test.util.Deploy;
/**
* TestCase driver for the readahead finder tests
*
* @author <a href="mailto:[EMAIL PROTECTED]">danch (Dan Christopherson</a>
* @version $Id: ReadAheadUnitTestCase.java,v 1.1 2001/09/12 04:55:40 d_jencks Exp $
*
* Revision:
*/
public class ReadAheadUnitTestCase extends TestCase {
CMPFindTestSessionRemote rem = null;
public ReadAheadUnitTestCase(String name) {
super(name);
}
protected void tearDown() throws Exception {
if (rem != null) {
System.out.println("Removing test data");
rem.removeTestData();
rem.remove();
rem = null;
}
}
protected void setUp()
throws Exception
{
if (rem != null)
return;
// System.out.println("Deploying");
// new org.jboss.jmx.client.Deployer().deploy("../deploy/readahead.jar");
System.out.println("Creating test data");
Context ctx = new InitialContext();
CMPFindTestSessionHome home =
(CMPFindTestSessionHome)ctx.lookup("CMPFindTestSession");
rem = home.create();
rem.createTestData();
}
public void testFindAll() throws Exception {
rem.testFinder();
}
public void testFindByCity() throws Exception {
rem.testByCity();
}
public void testAddressByCity() throws Exception {
rem.addressByCity();
}
/**
* Setup the test suite.
*/
public static Test suite() {
TestSuite suite = new TestSuite();
// add a test case to deploy our support applications
String filename = "readahead.jar";
suite.addTest(new Deploy.Deployer(filename));
suite.addTest(new TestSuite(ReadAheadUnitTestCase.class));
// add a test case to undeploy our support applications
suite.addTest(new Deploy.Undeployer(filename));
return suite;
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development