User: stark
Date: 01/02/27 09:28:28
Modified: src/main/org/jboss/test/bmp/test Main.java
Log:
Update this to be a junit.framework.TestCase subclass
Revision Changes Path
1.2 +22 -8 jbosstest/src/main/org/jboss/test/bmp/test/Main.java
Index: Main.java
===================================================================
RCS file: /products/cvs/ejboss/jbosstest/src/main/org/jboss/test/bmp/test/Main.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Main.java 2000/10/25 23:01:25 1.1
+++ Main.java 2001/02/27 17:28:28 1.2
@@ -7,14 +7,17 @@
import org.jboss.test.bmp.interfaces.*;
-public class Main
+public class Main extends junit.framework.TestCase
{
- public Main (String[] _args) throws Exception
+ private boolean deployed;
+
+ public Main(String name)
+ {
+ super(name);
+ }
+
+ public void testBMP() throws Exception
{
- System.out.print ("deploying beans...");
- new org.jboss.jmx.client.Deployer().deploy("../deploy/bmp.jar");
- System.out.println ("done.");
-
BMPHelperSessionHome sessionHome = (BMPHelperSessionHome)new InitialContext
().lookup ("bmp.BMPHelperSession");
BMPHelperSession session = sessionHome.create ();
@@ -118,10 +121,21 @@
}
-
+ protected void setUp() throws Exception
+ {
+ if (deployed) return;
+ String deployDir = System.getProperty("jbosstest.deploy.dir");
+ if( deployDir == null )
+ deployDir = "../deploy";
+ System.out.println("deployDir = "+deployDir);
+ new org.jboss.jmx.client.Deployer().deploy(deployDir+"/bmp.jar");
+ deployed = true;
+ }
public static void main (String[] _args) throws Exception
{
- new Main (_args);
+ Main m = new Main("main");
+ m.setUp();
+ m.testBMP();
}
}