Update of /cvsroot/jwebunit/jWebUnit/fitplugin/test/net/sourceforge/jwebunit/fit
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1035/fitplugin/test/net/sourceforge/jwebunit/fit
Modified Files:
WebFixtureTest.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: WebFixtureTest.java
===================================================================
RCS file:
/cvsroot/jwebunit/jWebUnit/fitplugin/test/net/sourceforge/jwebunit/fit/WebFixtureTest.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** WebFixtureTest.java 28 Apr 2003 20:46:58 -0000 1.16
--- WebFixtureTest.java 3 Jan 2006 10:38:36 -0000 1.17
***************
*** 10,13 ****
--- 10,15 ----
public class WebFixtureTest extends TestCase {
+ public static final int MINIMUM_TESTS = 50;
+
public WebFixtureTest(String s) {
super(s);
***************
*** 16,19 ****
--- 18,24 ----
public void testWebFixture() throws Exception {
new PseudoWebApp();
+ // avoid the need of the system property, always use .fit files for
input
+ RunnerUtility.overrideSystemPropertyAndUseWikiParser = true;
+ // run the tests
DirectoryRunner testRunner =
DirectoryRunner.parseArgs(new String[]
***************
*** 22,28 ****
testRunner.run();
testRunner.getResultWriter().write();
! assertEquals("Failures detected.", 0,
testRunner.getResultWriter().getCounts().wrong);
! assertEquals("Exceptions detected.", 0,
testRunner.getResultWriter().getCounts().exceptions);
}
--- 27,38 ----
testRunner.run();
testRunner.getResultWriter().write();
! // sanity check
! assertTrue("Should find at least " + MINIMUM_TESTS + " tests",
! 0 < testRunner.getResultWriter().getTotal());
! // report failures to JUnit
! String resultsUrl = "fitplugin/test/testOutput/index.html";
! assertEquals("Failures detected. Check " + resultsUrl + ".", 0,
testRunner.getResultWriter().getCounts().wrong);
! assertEquals("Exceptions detected. Check " + resultsUrl + ".", 0,
testRunner.getResultWriter().getCounts().exceptions);
}
-------------------------------------------------------
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