[Httpunit-commit] CVS: httpunit/test/com/meterware/pseudoserver PseudoServerTest.java,1.1,1.2
Brought to you by:
russgold
From: Russell G. <rus...@us...> - 2002-08-15 00:06:35
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/pseudoserver In directory usw-pr-cvs1:/tmp/cvs-serv13563/test/com/meterware/pseudoserver Modified Files: PseudoServerTest.java Log Message: Handle embedded spaces in URL Index: PseudoServerTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/pseudoserver/PseudoServerTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- PseudoServerTest.java 24 Jul 2002 17:28:57 -0000 1.1 +++ PseudoServerTest.java 15 Aug 2002 00:06:32 -0000 1.2 @@ -124,6 +124,20 @@ } + public void testFunkyGet() throws Exception { + String resourceName = "ID=03.019c010101010001.00000001.a202000000000019. 0d09/login/"; + String resourceValue = "the desired content"; + + defineResource( resourceName, resourceValue ); + + WebConversation wc = new WebConversation(); + WebRequest request = new GetMethodWebRequest( getHostPath() + '/' + resourceName ); + WebResponse response = wc.getResponse( request ); + assertEquals( "requested resource", resourceValue, response.getText().trim() ); + assertEquals( "content type", "text/html", response.getContentType() ); + } + + private String asBytes( String s ) { StringBuffer sb = new StringBuffer(); char[] chars = s.toCharArray(); |