Update of /cvsroot/jwebunit/jWebUnit/test/net/sourceforge/jwebunit/userlist
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17315/test/net/sourceforge/jwebunit/userlist
Modified Files:
RajeshNairTest.java
Log Message:
migrating test cases to using jetty. slow and painful.
Index: RajeshNairTest.java
===================================================================
RCS file:
/cvsroot/jwebunit/jWebUnit/test/net/sourceforge/jwebunit/userlist/RajeshNairTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** RajeshNairTest.java 18 Oct 2004 21:45:20 -0000 1.3
--- RajeshNairTest.java 15 Apr 2005 04:48:44 -0000 1.4
***************
*** 7,11 ****
import junit.framework.Test;
import junit.framework.TestSuite;
! import net.sourceforge.jwebunit.WebTestCase;
import net.sourceforge.jwebunit.util.JettySetup;
--- 7,11 ----
import junit.framework.Test;
import junit.framework.TestSuite;
! import net.sourceforge.jwebunit.JWebUnitAPITestCase;
import net.sourceforge.jwebunit.util.JettySetup;
***************
*** 15,49 ****
* href="http://sourceforge.net/support/tracker.php?aid=1049592">1049592 </a>.
*/
! public class RajeshNairTest extends WebTestCase {
! /**
! * Create the testsuite decorated with the Jetty setup.
! *
! * @return the decorated testsuite.
! */
! public static Test suite() {
! return new JettySetup(new TestSuite(RajeshNairTest.class));
! }
! /**
! * This test gives a <code>NullPointerException</code> when the
! * <code>submit()</code> function is called. This is actually a bug in
! * HTTPUnit.
! *
! * @todo TODO confirm this bug has been solved in a new release of
HTTPUnit.
! */
! public void testSubmitForm() {
! getTestContext().setBaseUrl(
! "http://localhost:8081/jwebunit/Userlist/RajeshNair");
! beginAt("report.htm");
! try {
! // submit(); // gives NullPointerException.
! clickButton("submit_View_Report"); // works.
! } catch (RuntimeException e) {
! if (e.getMessage().startsWith("java.lang.NullPointerException")) {
! fail("NullPointerException caught");
! }
! throw e;
! }
! }
}
\ No newline at end of file
--- 15,48 ----
* href="http://sourceforge.net/support/tracker.php?aid=1049592">1049592 </a>.
*/
! public class RajeshNairTest extends JWebUnitAPITestCase {
! /**
! * Create the testsuite decorated with the Jetty setup.
! *
! * @return the decorated testsuite.
! */
! public static Test suite() {
! return new JettySetup(new TestSuite(RajeshNairTest.class));
! }
! /**
! * This test gives a <code>NullPointerException</code> when the
! * <code>submit()</code> function is called. This is actually a bug in
! * HTTPUnit.
! *
! * @todo TODO confirm this bug has been solved in a new release of
HTTPUnit.
! */
! public void testSubmitForm() {
! getTestContext().setBaseUrl(HOST_PATH + "/Userlist/RajeshNair");
! beginAt("report.htm");
! try {
! // submit(); // gives NullPointerException.
! clickButton("submit_View_Report"); // works.
! } catch (RuntimeException e) {
! if
(e.getMessage().startsWith("java.lang.NullPointerException")) {
! fail("NullPointerException caught");
! }
! throw e;
! }
! }
}
\ No newline at end of file
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development