Update of /cvsroot/jwebunit/jWebUnit/fitplugin/src/net/sourceforge/jwebunit/fit
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1035/fitplugin/src/net/sourceforge/jwebunit/fit
Modified Files:
DirectoryRunner.java FitResultWriter.java RunnerUtility.java
Log Message:
Fixed a null pointer in DirectoryRunner when the directory does not exist.
Fixed the test so that it can run from the jwebunit project without a system
property. The files in the directory specified by the test are of type .fit, so
I don't see why ".fit.in.html" should be the default when using DirectoryRunner
from the test.
Index: RunnerUtility.java
===================================================================
RCS file:
/cvsroot/jwebunit/jWebUnit/fitplugin/src/net/sourceforge/jwebunit/fit/RunnerUtility.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RunnerUtility.java 29 Mar 2003 15:48:38 -0000 1.1
--- RunnerUtility.java 3 Jan 2006 10:38:36 -0000 1.2
***************
*** 2,5 ****
--- 2,6 ----
/**
+ * Used to tell the runners which kind of files they should expect for input.
* User: djoiner
* Date: Mar 17, 2003
***************
*** 7,12 ****
*/
public class RunnerUtility {
public static boolean useWikiParser() {
! return System.getProperty("wiki") != null;
}
--- 8,18 ----
*/
public class RunnerUtility {
+ static boolean overrideSystemPropertyAndUseWikiParser = false;
+ /**
+ * @return true if there is a system property named 'wiki' with any value.
+ */
public static boolean useWikiParser() {
! return overrideSystemPropertyAndUseWikiParser
! || System.getProperty("wiki") != null;
}
Index: FitResultWriter.java
===================================================================
RCS file:
/cvsroot/jwebunit/jWebUnit/fitplugin/src/net/sourceforge/jwebunit/fit/FitResultWriter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FitResultWriter.java 5 Nov 2002 18:41:05 -0000 1.1
--- FitResultWriter.java 3 Jan 2006 10:38:36 -0000 1.2
***************
*** 47,49 ****
--- 47,56 ----
return output;
}
+
+ /**
+ * @return the total number of executed tests
+ */
+ public int getTotal() {
+ return getRight() + getWrong() + getIgnores() + getExceptions();
+ }
}
Index: DirectoryRunner.java
===================================================================
RCS file:
/cvsroot/jwebunit/jWebUnit/fitplugin/src/net/sourceforge/jwebunit/fit/DirectoryRunner.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** DirectoryRunner.java 7 Dec 2003 15:49:57 -0000 1.12
--- DirectoryRunner.java 3 Jan 2006 10:38:36 -0000 1.13
***************
*** 38,41 ****
--- 38,44 ----
public void run() {
+ if (!inputDir.exists()) {
+ throw new RuntimeException("The input directory '" + inputDir +
"' does not exist.");
+ }
File[] files = inputDir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development