vmassol 01/08/19 09:50:28
Modified: cactus/src/sample/share/org/apache/commons/cactus/sample
SampleServlet.java SampleServletConfig.java
TestSampleServlet.java TestSampleServletConfig.java
cactus/src/sample/share/org/apache/commons/cactus/sample/unit
TestJspTestCase.java TestServletTestCase1.java
TestServletTestCase1_ExceptionNotSerializable.java
TestServletTestCase1_ExceptionSerializable.java
TestServletTestCase1_InterceptorServletTestCase.java
TestServletTestCase2.java TestServletTestCase3.java
TestServletTestCase4.java TestServletTestCase5.java
TestServletTestCase5_InterceptorServletTestCase.java
TestServletTestCase_TestResult.java
Log:
align with coding conventions
Revision Changes Path
1.3 +16 -7
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/SampleServlet.java
Index: SampleServlet.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/SampleServlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SampleServlet.java 2001/05/05 14:37:17 1.2
+++ SampleServlet.java 2001/08/19 16:50:27 1.3
@@ -64,7 +64,9 @@
* different test cases as possible rather than implementing a meaningful
* business logic.
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: SampleServlet.java,v 1.3 2001/08/19 16:50:27 vmassol Exp $
*/
public class SampleServlet extends HttpServlet
{
@@ -76,7 +78,8 @@
* @param theRequest the HTTP request
* @param theResponse the HTTP response
*/
- public void doGet(HttpServletRequest theRequest, HttpServletResponse
theResponse) throws IOException
+ public void doGet(HttpServletRequest theRequest,
+ HttpServletResponse theResponse) throws IOException
{
PrintWriter pw = theResponse.getWriter();
@@ -113,7 +116,8 @@
public void setSessionVariable(HttpServletRequest theRequest)
{
HttpSession session = theRequest.getSession(false);
- session.setAttribute("name_setSessionVariable", "value_setSessionVariable");
+ session.setAttribute("name_setSessionVariable",
+ "value_setSessionVariable");
}
/**
@@ -123,7 +127,8 @@
*/
public void setRequestAttribute(HttpServletRequest theRequest)
{
- theRequest.setAttribute("name_setRequestAttribute",
"value_setRequestAttribute");
+ theRequest.setAttribute("name_setRequestAttribute",
+ "value_setRequestAttribute");
}
/**
@@ -188,7 +193,8 @@
*/
public void setResponseCookie(HttpServletResponse theResponse)
{
- Cookie cookie = new Cookie("responsecookie", "this is a response cookie");
+ Cookie cookie = new Cookie("responsecookie",
+ "this is a response cookie");
cookie.setDomain("jakarta.apache.org");
theResponse.addCookie(cookie);
}
@@ -202,9 +208,12 @@
* @param theResponse the HTTP response
* @param theConfig the servlet config object
*/
- public void doForward(HttpServletRequest theRequest, HttpServletResponse
theResponse, ServletConfig theConfig) throws IOException, ServletException
+ public void doForward(HttpServletRequest theRequest,
+ HttpServletResponse theResponse, ServletConfig theConfig)
+ throws IOException, ServletException
{
- RequestDispatcher rd =
theConfig.getServletContext().getRequestDispatcher("/test/test.jsp");
+ RequestDispatcher rd = theConfig.getServletContext().
+ getRequestDispatcher("/test/test.jsp");
rd.forward(theRequest, theResponse);
}
1.2 +3 -1
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/SampleServletConfig.java
Index: SampleServletConfig.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/SampleServletConfig.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SampleServletConfig.java 2001/04/09 11:52:38 1.1
+++ SampleServletConfig.java 2001/08/19 16:50:27 1.2
@@ -64,7 +64,9 @@
* <code>log()</code>, ... (i.e. methods inherited from
* <code>GenericServlet</code>).
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: SampleServletConfig.java,v 1.2 2001/08/19 16:50:27 vmassol Exp $
*/
public class SampleServletConfig extends HttpServlet
{
1.4 +17 -8
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/TestSampleServlet.java
Index: TestSampleServlet.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/TestSampleServlet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestSampleServlet.java 2001/08/11 16:42:06 1.3
+++ TestSampleServlet.java 2001/08/19 16:50:27 1.4
@@ -68,7 +68,9 @@
/**
* Tests of the <code>SampleServlet</code> servlet class.
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestSampleServlet.java,v 1.4 2001/08/19 16:50:27 vmassol Exp $
*/
public class TestSampleServlet extends ServletTestCase
{
@@ -89,7 +91,8 @@
*/
public static void main(String[] theArgs)
{
- junit.ui.TestRunner.main(new String[] {TestSampleServlet.class.getName()});
+ junit.ui.TestRunner.main(new String[] {
+ TestSampleServlet.class.getName()});
}
/**
@@ -120,7 +123,8 @@
* server redirector. It contains the returned HTTP
* response.
*/
- public void endReadServletOutputStream(HttpURLConnection theConnection) throws
IOException
+ public void endReadServletOutputStream(HttpURLConnection theConnection)
+ throws IOException
{
String expected = "<html><head/><body>A GET request</body></html>";
String result = AssertUtils.getResponseAsString(theConnection);
@@ -174,7 +178,8 @@
servlet.setSessionVariable(request);
assert(session != null);
- assertEquals("value_setSessionVariable",
session.getAttribute("name_setSessionVariable"));
+ assertEquals("value_setSessionVariable",
+ session.getAttribute("name_setSessionVariable"));
}
/**
@@ -185,7 +190,8 @@
SampleServlet servlet = new SampleServlet();
servlet.setRequestAttribute(request);
- assertEquals("value_setRequestAttribute",
request.getAttribute("name_setRequestAttribute"));
+ assertEquals("value_setRequestAttribute",
+ request.getAttribute("name_setRequestAttribute"));
}
//-------------------------------------------------------------------------
@@ -318,7 +324,8 @@
*/
public void endReceiveHeader(HttpURLConnection theConnection)
{
- assertEquals("this is a response header",
theConnection.getHeaderField("responseheader"));
+ assertEquals("this is a response header",
+ theConnection.getHeaderField("responseheader"));
}
//-------------------------------------------------------------------------
@@ -374,10 +381,12 @@
* server redirector. It contains the returned HTTP
* response.
*/
- public void endRequestDispatcher(HttpURLConnection theConnection) throws
IOException
+ public void endRequestDispatcher(HttpURLConnection theConnection)
+ throws IOException
{
StringBuffer sb = new StringBuffer();
- BufferedReader input = new BufferedReader(new
InputStreamReader(theConnection.getInputStream()));
+ BufferedReader input = new BufferedReader(
+ new InputStreamReader(theConnection.getInputStream()));
String str;
while (null != ((str = input.readLine()))) {
sb.append(str);
1.2 +5 -2
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/TestSampleServletConfig.java
Index: TestSampleServletConfig.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/TestSampleServletConfig.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestSampleServletConfig.java 2001/04/09 11:52:38 1.1
+++ TestSampleServletConfig.java 2001/08/19 16:50:27 1.2
@@ -72,7 +72,9 @@
* have been inherited from <code>GenericServlet</code>) can be unit-tested
* with Cactus.
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestSampleServletConfig.java,v 1.2 2001/08/19 16:50:27 vmassol Exp
$
*/
public class TestSampleServletConfig extends ServletTestCase
{
@@ -93,7 +95,8 @@
*/
public static void main(String[] theArgs)
{
- junit.ui.TestRunner.main(new String[]
{TestSampleServletConfig.class.getName()});
+ junit.ui.TestRunner.main(new String[] {
+ TestSampleServletConfig.class.getName()});
}
/**
1.3 +5 -2
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestJspTestCase.java
Index: TestJspTestCase.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestJspTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestJspTestCase.java 2001/08/11 16:42:06 1.2
+++ TestJspTestCase.java 2001/08/19 16:50:27 1.3
@@ -73,7 +73,9 @@
* package here for convenience. They can also be read by end-users to
* understand how Cactus work.
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestJspTestCase.java,v 1.3 2001/08/19 16:50:27 vmassol Exp $
*/
public class TestJspTestCase extends JspTestCase
{
@@ -94,7 +96,8 @@
*/
public static void main(String[] theArgs)
{
- junit.ui.TestRunner.main(new String[] {TestJspTestCase.class.getName()});
+ junit.ui.TestRunner.main(new String[] {
+ TestJspTestCase.class.getName()});
}
/**
1.3 +11 -5
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase1.java
Index: TestServletTestCase1.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestServletTestCase1.java 2001/08/11 13:33:07 1.2
+++ TestServletTestCase1.java 2001/08/19 16:50:27 1.3
@@ -80,9 +80,12 @@
* exception handling in our unit test cases so we must not let these exceptions
* get through to JUnit (otherwise the test will appear as failed).
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestServletTestCase1.java,v 1.3 2001/08/19 16:50:27 vmassol Exp $
*/
-public class TestServletTestCase1 extends
TestServletTestCase1_InterceptorServletTestCase
+public class TestServletTestCase1
+ extends TestServletTestCase1_InterceptorServletTestCase
{
/**
* Defines the testcase name for JUnit.
@@ -101,7 +104,8 @@
*/
public static void main(String[] theArgs)
{
- junit.ui.TestRunner.main(new String[]
{TestServletTestCase1.class.getName()});
+ junit.ui.TestRunner.main(new String[] {
+ TestServletTestCase1.class.getName()});
}
/**
@@ -143,7 +147,8 @@
public void testExceptionNotSerializable()
throws TestServletTestCase1_ExceptionNotSerializable
{
- throw new TestServletTestCase1_ExceptionNotSerializable("test non
serializable exception");
+ throw new TestServletTestCase1_ExceptionNotSerializable(
+ "test non serializable exception");
}
//-------------------------------------------------------------------------
@@ -161,7 +166,8 @@
public void testExceptionSerializable()
throws TestServletTestCase1_ExceptionSerializable
{
- throw new TestServletTestCase1_ExceptionSerializable("test serializable
exception");
+ throw new TestServletTestCase1_ExceptionSerializable(
+ "test serializable exception");
}
}
1.2 +3 -1
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase1_ExceptionNotSerializable.java
Index: TestServletTestCase1_ExceptionNotSerializable.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase1_ExceptionNotSerializable.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestServletTestCase1_ExceptionNotSerializable.java 2001/04/09 11:52:39
1.1
+++ TestServletTestCase1_ExceptionNotSerializable.java 2001/08/19 16:50:27
1.2
@@ -57,7 +57,9 @@
* Used by <code>TestServletTestCase1</code> to test the case where
* a non serializable exception is returned by a test method.
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestServletTestCase1_ExceptionNotSerializable.java,v 1.2
2001/08/19 16:50:27 vmassol Exp $
* @see TestServletTestCase1
*/
public class TestServletTestCase1_ExceptionNotSerializable extends Exception
1.2 +5 -2
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase1_ExceptionSerializable.java
Index: TestServletTestCase1_ExceptionSerializable.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase1_ExceptionSerializable.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestServletTestCase1_ExceptionSerializable.java 2001/04/09 11:52:39 1.1
+++ TestServletTestCase1_ExceptionSerializable.java 2001/08/19 16:50:27 1.2
@@ -59,10 +59,13 @@
* Used by <code>TestServletTestCase1</code> to test the case where
* a serializable exception is raised by a test method.
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestServletTestCase1_ExceptionSerializable.java,v 1.2 2001/08/19
16:50:27 vmassol Exp $
* @see TestServletTestCase1
*/
-public class TestServletTestCase1_ExceptionSerializable extends Exception
implements Serializable
+public class TestServletTestCase1_ExceptionSerializable
+ extends Exception implements Serializable
{
/**
* @param theMessage the exception message.
1.3 +10 -4
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase1_InterceptorServletTestCase.java
Index: TestServletTestCase1_InterceptorServletTestCase.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase1_InterceptorServletTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestServletTestCase1_InterceptorServletTestCase.java 2001/08/11 13:33:07
1.2
+++ TestServletTestCase1_InterceptorServletTestCase.java 2001/08/19 16:50:27
1.3
@@ -64,7 +64,9 @@
* unit test cases we must not let these exceptions get through to JUnit
* (otherwise the test will appear as failed).
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestServletTestCase1_InterceptorServletTestCase.java,v 1.3
2001/08/19 16:50:27 vmassol Exp $
* @see TestServletTestCase1
*/
public class TestServletTestCase1_InterceptorServletTestCase
@@ -107,8 +109,10 @@
// and contains the text "test non serializable exception", then
// the test is ok.
if (name().equals("testExceptionNotSerializable")) {
- if
(e.instanceOf(TestServletTestCase1_ExceptionNotSerializable.class)) {
- assertEquals("test non serializable exception",
+ if (e.instanceOf(
+ TestServletTestCase1_ExceptionNotSerializable.class)) {
+
+ assertEquals("test non serializable exception",
e.getMessage());
return;
}
@@ -119,7 +123,9 @@
// and contains the text "test serializable exception", then
// the test is ok.
if (name().equals("testExceptionSerializable")) {
-
assert(e.instanceOf(TestServletTestCase1_ExceptionSerializable.class));
+ assert(e.instanceOf(
+ TestServletTestCase1_ExceptionSerializable.class));
+
assertEquals("test serializable exception", e.getMessage());
return;
}
1.8 +3 -1
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase2.java
Index: TestServletTestCase2.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase2.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TestServletTestCase2.java 2001/08/11 16:42:06 1.7
+++ TestServletTestCase2.java 2001/08/19 16:50:27 1.8
@@ -74,7 +74,9 @@
* package here for convenience. They can also be read by end-users to
* understand how Cactus work.
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestServletTestCase2.java,v 1.8 2001/08/19 16:50:27 vmassol Exp $
*/
public class TestServletTestCase2 extends ServletTestCase
{
1.4 +5 -2
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase3.java
Index: TestServletTestCase3.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase3.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestServletTestCase3.java 2001/08/11 16:42:06 1.3
+++ TestServletTestCase3.java 2001/08/19 16:50:27 1.4
@@ -75,7 +75,9 @@
* package here for convenience. They can also be read by end-users to
* understand how Cactus work.
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestServletTestCase3.java,v 1.4 2001/08/19 16:50:27 vmassol Exp $
*/
public class TestServletTestCase3 extends ServletTestCase
{
@@ -96,7 +98,8 @@
*/
public static void main(String[] theArgs)
{
- junit.ui.TestRunner.main(new String[]
{TestServletTestCase3.class.getName()});
+ junit.ui.TestRunner.main(new String[] {
+ TestServletTestCase3.class.getName()});
}
/**
1.5 +3 -1
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase4.java
Index: TestServletTestCase4.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase4.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TestServletTestCase4.java 2001/08/11 16:42:06 1.4
+++ TestServletTestCase4.java 2001/08/19 16:50:27 1.5
@@ -73,7 +73,9 @@
* package here for convenience. They can also be read by end-users to
* understand how Cactus work.
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestServletTestCase4.java,v 1.5 2001/08/19 16:50:27 vmassol Exp $
*/
public class TestServletTestCase4 extends ServletTestCase
{
1.3 +3 -1
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase5.java
Index: TestServletTestCase5.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase5.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestServletTestCase5.java 2001/08/11 16:42:06 1.2
+++ TestServletTestCase5.java 2001/08/19 16:50:27 1.3
@@ -80,7 +80,9 @@
* exception handling in our unit test cases so we must not let these exceptions
* get through to JUnit (otherwise the test will appear as failed).
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestServletTestCase5.java,v 1.3 2001/08/19 16:50:27 vmassol Exp $
*/
public class TestServletTestCase5
extends TestServletTestCase5_InterceptorServletTestCase
1.2 +5 -2
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase5_InterceptorServletTestCase.java
Index: TestServletTestCase5_InterceptorServletTestCase.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase5_InterceptorServletTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestServletTestCase5_InterceptorServletTestCase.java 2001/06/18 08:19:06
1.1
+++ TestServletTestCase5_InterceptorServletTestCase.java 2001/08/19 16:50:27
1.2
@@ -64,10 +64,13 @@
* unit test cases we must not let these exceptions get through to JUnit
* (otherwise the test will appear as failed).
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestServletTestCase5_InterceptorServletTestCase.java,v 1.2
2001/08/19 16:50:27 vmassol Exp $
* @see TestServletTestCase1
*/
-public class TestServletTestCase5_InterceptorServletTestCase extends ServletTestCase
+public class TestServletTestCase5_InterceptorServletTestCase
+ extends ServletTestCase
{
/**
* Constructs a test case with the given name.
1.2 +5 -2
jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase_TestResult.java
Index: TestServletTestCase_TestResult.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cactus/src/sample/share/org/apache/commons/cactus/sample/unit/TestServletTestCase_TestResult.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestServletTestCase_TestResult.java 2001/06/17 13:46:22 1.1
+++ TestServletTestCase_TestResult.java 2001/08/19 16:50:27 1.2
@@ -78,7 +78,9 @@
* package here for convenience. They can also be read by end-users to
* understand how Cactus work.
*
- * @version @version@
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Massol</a>
+ *
+ * @version $Id: TestServletTestCase_TestResult.java,v 1.2 2001/08/19 16:50:27
vmassol Exp $
*/
public class TestServletTestCase_TestResult extends ServletTestCase
{
@@ -99,7 +101,8 @@
*/
public static void main(String[] theArgs)
{
- junit.ui.TestRunner.main(new String[]
{TestServletTestCase_TestResult.class.getName()});
+ junit.ui.TestRunner.main(new String[] {
+ TestServletTestCase_TestResult.class.getName()});
}
/**