From: Anjo K. <an...@us...> - 2002-04-19 21:50:15
|
Update of /cvsroot/wonder/ProjectWonder/Frameworks/ERExtensionsJava In directory usw-pr-cvs1:/tmp/cvs-serv13836/ProjectWonder/Frameworks/ERExtensionsJava Modified Files: ERXCompilerProxy.java ERXTestRunner.java ERXWOTestInterface.java WOCollapsibleComponentContent.java Log Message: Added CompilerProxy support to tests. Improved Date component a bit Index: ERXCompilerProxy.java =================================================================== RCS file: /cvsroot/wonder/ProjectWonder/Frameworks/ERExtensionsJava/ERXCompilerProxy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ERXCompilerProxy.java 27 Mar 2002 11:56:04 -0000 1.1 --- ERXCompilerProxy.java 19 Apr 2002 21:50:12 -0000 1.2 *************** *** 33,37 **** String _destinationPath; ! static ERXCompilerProxy defaultProxy() { if(_defaultProxy == null) _defaultProxy = new ERXCompilerProxy(); --- 33,37 ---- String _destinationPath; ! public static ERXCompilerProxy defaultProxy() { if(_defaultProxy == null) _defaultProxy = new ERXCompilerProxy(); *************** *** 70,73 **** --- 70,77 ---- } return projectPaths; + } + + public Class classForName(String className) { + return com.webobjects.foundation._NSUtilities.classWithName(className); } Index: ERXTestRunner.java =================================================================== RCS file: /cvsroot/wonder/ProjectWonder/Frameworks/ERExtensionsJava/ERXTestRunner.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ERXTestRunner.java 5 Feb 2002 20:11:31 -0000 1.1.1.1 --- ERXTestRunner.java 19 Apr 2002 21:50:12 -0000 1.2 *************** *** 14,17 **** --- 14,18 ---- import junit.runner.*; import org.apache.log4j.Category; + import er.extensions.*; public class ERXTestRunner extends BaseTestRunner { *************** *** 59,62 **** --- 60,68 ---- protected void clearStatus() { externalListener.clearStatus(); + } + + /** Get the freshest loaded class. Uses the CompilerProxy to get it. */ + public Test getTest(String testClass) { + return new TestSuite(ERXCompilerProxy.defaultProxy().classForName(testClass)); } } Index: ERXWOTestInterface.java =================================================================== RCS file: /cvsroot/wonder/ProjectWonder/Frameworks/ERExtensionsJava/ERXWOTestInterface.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ERXWOTestInterface.java 11 Feb 2002 22:09:09 -0000 1.2 --- ERXWOTestInterface.java 19 Apr 2002 21:50:12 -0000 1.3 *************** *** 23,35 **** // bind to a WOTextField ! protected String theTest; // bind to a WOString ! protected String errorMessage; // bind to a WOCheckbox ! protected Boolean showExceptions; ! protected ERXTestRunner aTestRunner; ! protected ERXTestResult testResult; ! protected long runTime; public ERXWOTestInterface(WOContext context) { --- 23,35 ---- // bind to a WOTextField ! public String theTest; // bind to a WOString ! public String errorMessage; // bind to a WOCheckbox ! public Boolean showExceptions; ! public ERXTestRunner aTestRunner; ! public ERXTestResult testResult; ! public long runTime; public ERXWOTestInterface(WOContext context) { *************** *** 61,65 **** // Starts a test run. Analyzes the command line arguments (test) and runs the given test suite. ! protected ERXTestResult start() throws Exception { if (theTest.equals("")) { throw new Exception("You need to provide the name of a class to use as the TestCase for this run."); --- 61,65 ---- // Starts a test run. Analyzes the command line arguments (test) and runs the given test suite. ! public ERXTestResult start() throws Exception { if (theTest.equals("")) { throw new Exception("You need to provide the name of a class to use as the TestCase for this run."); *************** *** 74,78 **** } ! protected ERXTestResult doRun(Test suite) { testResult.addListener(this); long startTime = System.currentTimeMillis(); --- 74,78 ---- } ! public ERXTestResult doRun(Test suite) { testResult.addListener(this); long startTime = System.currentTimeMillis(); Index: WOCollapsibleComponentContent.java =================================================================== RCS file: /cvsroot/wonder/ProjectWonder/Frameworks/ERExtensionsJava/WOCollapsibleComponentContent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WOCollapsibleComponentContent.java 4 Apr 2002 22:24:22 -0000 1.4 --- WOCollapsibleComponentContent.java 19 Apr 2002 21:50:12 -0000 1.5 *************** *** 126,130 **** aLabel = (String)valueForBinding("closedLabel"); } - return aLabel; } --- 126,129 ---- |