[Httpunit-commit] CVS: httpunit/test/com/meterware/servletunit HttpServletResponseTest.java,1.2,1.3
Brought to you by:
russgold
From: Russell G. <rus...@us...> - 2002-08-01 14:59:04
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/servletunit In directory usw-pr-cvs1:/tmp/cvs-serv9683/test/com/meterware/servletunit Modified Files: HttpServletResponseTest.java JUnitServletTest.java Log Message: Support link.click and form.submit Index: HttpServletResponseTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/servletunit/HttpServletResponseTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- HttpServletResponseTest.java 6 Jul 2001 17:11:04 -0000 1.2 +++ HttpServletResponseTest.java 1 Aug 2002 14:58:59 -0000 1.3 @@ -55,7 +55,7 @@ public void testDefaultResponse() throws Exception { ServletUnitHttpResponse servletResponse = new ServletUnitHttpResponse(); - WebResponse response = new ServletUnitWebResponse( "_self", null, servletResponse ); + WebResponse response = new ServletUnitWebResponse( null, "_self", null, servletResponse ); assertEquals( "Content type", "text/plain", response.getContentType() ); assertEquals( "Contents", "", response.getText() ); } @@ -67,7 +67,7 @@ PrintWriter pw = servletResponse.getWriter(); pw.println( "<html><head><title>Sample Page</title></head><body></body></html>" ); - WebResponse response = new ServletUnitWebResponse( "_self", null, servletResponse ); + WebResponse response = new ServletUnitWebResponse( null, "_self", null, servletResponse ); assertEquals( "Status code", HttpServletResponse.SC_OK, response.getResponseCode() ); assertEquals( "Content type", "text/html", response.getContentType() ); assertEquals( "Title", "Sample Page", response.getTitle() ); @@ -85,7 +85,7 @@ pw.print( page ); pw.close(); - WebResponse response = new ServletUnitWebResponse( "_self", null, servletResponse ); + WebResponse response = new ServletUnitWebResponse( null, "_self", null, servletResponse ); assertEquals( "Character set", "iso-8859-8", response.getCharacterSet() ); assertEquals( "Title", hebrewTitle, response.getTitle() ); } @@ -97,7 +97,7 @@ ServletOutputStream sos = servletResponse.getOutputStream(); sos.println( "<html><head><title>Sample Page</title></head><body></body></html>" ); - WebResponse response = new ServletUnitWebResponse( "_self", null, servletResponse ); + WebResponse response = new ServletUnitWebResponse( null, "_self", null, servletResponse ); assertEquals( "Status code", HttpServletResponse.SC_OK, response.getResponseCode() ); assertEquals( "Content type", "text/html", response.getContentType() ); assertEquals( "Title", "Sample Page", response.getTitle() ); Index: JUnitServletTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/servletunit/JUnitServletTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JUnitServletTest.java 4 Feb 2002 22:33:55 -0000 1.2 +++ JUnitServletTest.java 1 Aug 2002 14:58:59 -0000 1.3 @@ -2,7 +2,7 @@ /******************************************************************************************************************** * $Id$ * - * Copyright (c) 2001, Russell Gold + * Copyright (c) 2001-2002, Russell Gold * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation @@ -180,8 +180,8 @@ static class MyFactory implements InvocationContextFactory { private static ServletRunner _runner; - public InvocationContext newInvocation( WebRequest request, Cookie[] clientCookies, Dictionary clientHeaders, byte[] messageBody ) throws IOException, MalformedURLException { - return new InvocationContextImpl( _runner, request, clientCookies, clientHeaders, messageBody ); + public InvocationContext newInvocation( ServletUnitClient client, WebRequest request, Cookie[] clientCookies, Dictionary clientHeaders, byte[] messageBody ) throws IOException, MalformedURLException { + return new InvocationContextImpl( client, _runner, request, clientCookies, clientHeaders, messageBody ); } } } |