[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit PseudoServerTest.java,1.20,1.21
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2002-02-11 14:33:57
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory usw-pr-cvs1:/tmp/cvs-serv330/test/com/meterware/httpunit
Modified Files:
PseudoServerTest.java
Log Message:
Moved control of exceptionsThrownOnErrorStatus into WebClient
Index: PseudoServerTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/PseudoServerTest.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- PseudoServerTest.java 28 Jan 2002 18:43:25 -0000 1.20
+++ PseudoServerTest.java 11 Feb 2002 14:33:53 -0000 1.21
@@ -117,12 +117,16 @@
ps.setErrorResource( "error.htm", 501, "Internal error" );
int port = ps.getConnectedPort();
- HttpUnitOptions.setExceptionsThrownOnErrorStatus( false );
- WebConversation wc = new WebConversation();
- WebRequest request = new GetMethodWebRequest( "http://localhost:" + port + "/error.htm" );
- WebResponse response = wc.getResponse( request );
- assertEquals( "Response code", 501, response.getResponseCode() );
- assertEquals( "Message contents", "Internal error", response.getText().trim() );
+ try {
+ WebConversation wc = new WebConversation();
+ wc.setExceptionsThrownOnErrorStatus( false );
+ WebRequest request = new GetMethodWebRequest( "http://localhost:" + port + "/error.htm" );
+ WebResponse response = wc.getResponse( request );
+ assertEquals( "Response code", 501, response.getResponseCode() );
+ assertEquals( "Message contents", "Internal error", response.getText().trim() );
+ } finally {
+ ps.shutDown();
+ }
}
|