vmassol 2002/09/03 12:32:24
Modified: sample-servlet/src/unit/share/org/apache/cactus/unit
TestServletTestCase2.java
Log:
added new unit test
Revision Changes Path
1.10 +25 -3
jakarta-cactus/sample-servlet/src/unit/share/org/apache/cactus/unit/TestServletTestCase2.java
Index: TestServletTestCase2.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/sample-servlet/src/unit/share/org/apache/cactus/unit/TestServletTestCase2.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- TestServletTestCase2.java 1 Sep 2002 17:07:35 -0000 1.9
+++ TestServletTestCase2.java 3 Sep 2002 19:32:24 -0000 1.10
@@ -823,7 +823,7 @@
* @param theRequest the request object that serves to initialize the
* HTTP connection to the server redirector.
*/
- public void beginTestSeveralParameters(WebRequest theRequest)
+ public void beginSeveralParameters(WebRequest theRequest)
{
theRequest.addParameter("PostParameter1", "EMPLOYEE0145",
theRequest.POST_METHOD);
@@ -837,7 +837,7 @@
/**
* Verify we can set and retrieve several parameters.
*/
- public void testTestSeveralParameters()
+ public void testSeveralParameters()
{
assertEquals("parameter4", "/tas/ViewSchedule.esp",
request.getParameter("PostParameter4"));
@@ -847,4 +847,26 @@
assertEquals("parameter3", "07/08/2002",
request.getParameter("PostParameter3"));
}
+
+ //-------------------------------------------------------------------------
+
+ /**
+ * Verify we can set and retrieve the content type.
+ */
+ public void testSetContentType()
+ {
+ response.setContentType("text/xml");
+ }
+
+ /**
+ * Verify we can set and retrieve the content type.
+ *
+ * @param theResponse the response from the server side.
+ */
+ public void endSetContentType(WebResponse theResponse)
+ {
+ assertEquals("text/xml",
+ theResponse.getConnection().getContentType());
+ }
+
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>