User: starksm
Date: 01/07/08 18:06:06
Modified: src/main/org/jboss/test/testbean/test Tag: Branch_2_4
Main.java
Log:
Merge latest changes from main to the 2.4 branch
Revision Changes Path
No revision
No revision
1.7.2.1 +37 -2 jbosstest/src/main/org/jboss/test/testbean/test/Main.java
Index: Main.java
===================================================================
RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/testbean/test/Main.java,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- Main.java 2001/05/03 22:36:25 1.7
+++ Main.java 2001/07/09 01:06:06 1.7.2.1
@@ -17,6 +17,10 @@
import java.util.Iterator;
import java.util.Enumeration;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
import org.jboss.test.testbean.interfaces.StatelessSessionHome;
import org.jboss.test.testbean.interfaces.StatelessSession;
import org.jboss.test.testbean.interfaces.StatefulSessionHome;
@@ -43,15 +47,15 @@
import org.jboss.test.bmp.interfaces.BMPHelperSessionHome;
import org.jboss.test.bmp.interfaces.SimpleBMP;
import org.jboss.test.bmp.interfaces.SimpleBMPHome;
-
+import org.jboss.test.util.Deploy;
/**
* Sample client for the jboss container.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Hugo Pinto</a>
-* @version $Id: Main.java,v 1.7 2001/05/03 22:36:25 user57 Exp $
+* @version $Id: Main.java,v 1.7.2.1 2001/07/09 01:06:06 starksm Exp $
*/
public class Main
extends junit.framework.TestCase
@@ -1064,6 +1068,7 @@
protected void setUp()
throws Exception
{
+ /*
if (deployed) return;
System.out.println("_____________________________________________");
@@ -1082,9 +1087,39 @@
new org.jboss.jmx.client.Deployer().deploy("../deploy/testbean2.jar");
deployed = true;
System.out.println("done!");
+ */
}
protected void tearDown() throws Exception {
restoreValidNamingProperties();
+ }
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ try {
+ String[] filenames = {
+ "bmp.jar",
+ "testbean.jar",
+ "testbean2.jar"
+ };
+
+ System.out.println("Deploying...");
+ for (int i=0; i<filenames.length; i++) {
+ Deploy.deploy(filenames[i]);
+ }
+
+ suite.addTest(new TestSuite(Main.class));
+
+ // add a test cases to undeploy our support applications
+ for (int i=0; i<filenames.length; i++) {
+ suite.addTest(new Deploy.Undeployer(filenames[i]));
+ }
+ }
+ catch (Throwable t) {
+ t.printStackTrace();
+ System.exit(0);
+ }
+ return suite;
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development