kevinross 2003/07/14 14:25:46
Modified: java/tests/src/org/apache/xindice IntegrationXmlRpcTests.java Log: formatted, added a main method for debugging Revision Changes Path 1.5 +13 -17 xml-xindice/java/tests/src/org/apache/xindice/IntegrationXmlRpcTests.java Index: IntegrationXmlRpcTests.java =================================================================== RCS file: /home/cvs/xml-xindice/java/tests/src/org/apache/xindice/IntegrationXmlRpcTests.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- IntegrationXmlRpcTests.java 30 May 2003 22:39:16 -0000 1.4 +++ IntegrationXmlRpcTests.java 14 Jul 2003 21:25:46 -0000 1.5 @@ -85,42 +85,38 @@ */ public class IntegrationXmlRpcTests { - public static Test suite() - throws Exception { + public static void main(java.lang.String[] args) throws Exception{ + junit.textui.TestRunner.run(suite()); + } + + public static Test suite() throws Exception { String url = "xmldb:xindice://"; - String hostport = System.getProperty( "test.xmlrpc.hostport"); + String hostport = System.getProperty("test.xmlrpc.hostport"); if (hostport != null) { url = url + hostport; } - return new TestSetup( - new XmlDbClientSetup( - IntegrationTests.testSuite("XmlRpc client integration tests"), - new XmlDbClient(url))) { + return new TestSetup(new XmlDbClientSetup(IntegrationTests.testSuite("XmlRpc client integration tests"), new XmlDbClient(url))) { private Database database; - public void setUp() - throws Exception { + public void setUp() throws Exception { String driver = "org.apache.xindice.client.xmldb.DatabaseImpl"; Class cls = Class.forName(driver); database = (Database) cls.newInstance(); - String serviceLocation = System.getProperty( - "test.xmlrpc.service-location"); + String serviceLocation = System.getProperty("test.xmlrpc.service-location"); if (serviceLocation != null) { database.setProperty("service-location", serviceLocation); } - String xmlrpcDriver = System.getProperty( - "test.xmlrpc.driver"); + String xmlrpcDriver = System.getProperty("test.xmlrpc.driver"); if (xmlrpcDriver != null) { database.setProperty("xmlrpc-driver", xmlrpcDriver); } DatabaseManager.registerDatabase(database); } - public void tearDown() - throws Exception { + public void tearDown() throws Exception { if (database != null) { DatabaseManager.deregisterDatabase(database); }