/** * main method for the junit testing. * * @param args - unused */ public static void main(String[] args) { junit.textui.TestRunner runner = new junit.textui.TestRunner(); System.exit( TestRunner.run( runner.getTest(uk.ac.shef.wit.simmetrics.arbitrators.TestSuite.class.getName())) .wasSuccessful() ? 0 : 1); }
/** * This method allows to easily run this unit test independent of the other unit tests, and * without dealing with Ant or unrelated test suites. */ public static void main(String[] sa) { if (sa.length > 0 && sa[0].startsWith("-g")) { junit.swingui.TestRunner.run(OdbcPacketOutputStreamTest.class); } else { junit.textui.TestRunner runner = new junit.textui.TestRunner(); junit.framework.TestResult result = runner.run(runner.getTest(OdbcPacketOutputStreamTest.class.getName())); System.exit(result.wasSuccessful() ? 0 : 1); } }
/** * This method allows to easily run this unit test independent of the other unit tests, and * without dealing with Ant or unrelated test suites. * * <p>Invoke like this: * * <PRE><CODE> * public static void main(String[] sa) { * staticRunner(TestOdbcService.class, sa); * } * </CODE></PRE> * * , but give your subclass name in place of <CODE>TestOdbcService</CODE> */ public static void staticRunner(Class c, String[] sa) { junit.textui.TestRunner runner = new junit.textui.TestRunner(); junit.framework.TestResult result = runner.run(runner.getTest(c.getName())); System.exit(result.wasSuccessful() ? 0 : 1); }