Update of /cvsroot/jwebunit/jWebUnit/src/net/sourceforge/jwebunit
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30901/src/net/sourceforge/jwebunit
Modified Files:
HttpUnitDialog.java WebTester.java IJWebUnitDialog.java
Log Message:
more changes to get unit tests running for both testing engines.
Index: WebTester.java
===================================================================
RCS file:
/cvsroot/jwebunit/jWebUnit/src/net/sourceforge/jwebunit/WebTester.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** WebTester.java 15 Apr 2005 04:46:25 -0000 1.56
--- WebTester.java 11 May 2005 12:11:15 -0000 1.57
***************
*** 127,132 ****
* @param relativeURL
*/
! public void beginAt(String aRelativeURL) {
! getDialog().beginAt(createUrl(aRelativeURL), testContext);
}
--- 127,137 ----
* @param relativeURL
*/
! public void beginAt(String aRelativeURL) {
! try {
! getDialog().beginAt(createUrl(aRelativeURL),
testContext);
! } catch (TestingEngineResponseException
aTestingEngineResponseException) {
!
handleTestingEngineResponseException(aTestingEngineResponseException);
! }
!
}
Index: HttpUnitDialog.java
===================================================================
RCS file:
/cvsroot/jwebunit/jWebUnit/src/net/sourceforge/jwebunit/HttpUnitDialog.java,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** HttpUnitDialog.java 15 Apr 2005 04:46:25 -0000 1.52
--- HttpUnitDialog.java 11 May 2005 12:11:15 -0000 1.53
***************
*** 28,31 ****
--- 28,32 ----
import com.meterware.httpunit.GetMethodWebRequest;
import com.meterware.httpunit.HTMLElementPredicate;
+ import com.meterware.httpunit.HttpNotFoundException;
import com.meterware.httpunit.SubmitButton;
import com.meterware.httpunit.TableCell;
***************
*** 72,83 ****
* @param context
* contains context information for the test client.
*/
! public void beginAt(String initialURL, TestContext context) {
this.setTestContext(context);
initWebClient();
try {
resp = wc.getResponse(new
GetMethodWebRequest(initialURL));
! } catch (Exception e) {
! throw new
RuntimeException(ExceptionUtility.stackTraceToString(e));
}
}
--- 73,89 ----
* @param context
* contains context information for the test client.
+ * @throws TestingEngineResponseException
*/
! public void beginAt(String initialURL, TestContext context) throws
TestingEngineResponseException{
this.setTestContext(context);
initWebClient();
try {
resp = wc.getResponse(new
GetMethodWebRequest(initialURL));
! } catch (HttpNotFoundException aException) {
! //cant find requested page. most browsers will return
a page with 404 in the body or title.
! throw new
TestingEngineResponseException(ExceptionUtility.stackTraceToString(aException));
!
! } catch (Exception aException) {
! throw new
RuntimeException(ExceptionUtility.stackTraceToString(aException));
}
}
Index: IJWebUnitDialog.java
===================================================================
RCS file:
/cvsroot/jwebunit/jWebUnit/src/net/sourceforge/jwebunit/IJWebUnitDialog.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** IJWebUnitDialog.java 15 Apr 2005 04:46:25 -0000 1.5
--- IJWebUnitDialog.java 11 May 2005 12:11:15 -0000 1.6
***************
*** 35,39 ****
public abstract IJWebUnitDialog constructNewDialog(String url,
TestContext context);
! public abstract void beginAt(String aInitialURL, TestContext
aTestContext);
/**
--- 35,40 ----
public abstract IJWebUnitDialog constructNewDialog(String url,
TestContext context);
!
! public abstract void beginAt(String aInitialURL, TestContext
aTestContext) throws TestingEngineResponseException;
/**
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development