You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2003/01/01 13:11:03 UTC

cvs commit: jakarta-cactus/sample-servlet/src/sample/share/org/apache/cactus/sample TestSampleBodyTag.java

vmassol     2003/01/01 04:11:03

  Modified:    sample-servlet/src/sample/share/org/apache/cactus/sample
                        TestSampleBodyTag.java
  Log:
  Fixed checkstyle errors
  
  Revision  Changes    Path
  1.4       +22 -7     jakarta-cactus/sample-servlet/src/sample/share/org/apache/cactus/sample/TestSampleBodyTag.java
  
  Index: TestSampleBodyTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/sample-servlet/src/sample/share/org/apache/cactus/sample/TestSampleBodyTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestSampleBodyTag.java	30 Aug 2002 23:21:16 -0000	1.3
  +++ TestSampleBodyTag.java	1 Jan 2003 12:11:03 -0000	1.4
  @@ -71,7 +71,15 @@
    */
   public class TestSampleBodyTag extends JspTestCase
   {
  +    /**
  +     * Our tag instance being unit tested
  +     */
       private SampleBodyTag tag;
  +
  +    /**
  +     * The tag body content to which we can write to in our unit tests
  +     * to simulate a content.
  +     */
       private BodyContent tagContent;
   
       /**
  @@ -119,11 +127,22 @@
           this.tag.setBodyContent(this.tagContent);
       }
   
  +    /**
  +     * @see TestCase#tearDown()
  +     */
  +    public void tearDown()
  +    {
  +        //necessary for tag to output anything on most servlet engines.
  +        this.pageContext.popBody();
  +    }
  +
       //-------------------------------------------------------------------------
   
       /**
        * Sets the replacement target and replacement String on the tag, then calls
        * doAfterBody(). Most of the assertion work is done in endReplacement().
  +     * 
  +     * @exception Exception if the test fails for an unexpected reason
        */
       public void testReplacement() throws Exception
       {
  @@ -143,15 +162,11 @@
           assertEquals(BodyTag.SKIP_BODY, result);
       }
   
  -    public void tearDown()
  -    {
  -        //necessary for tag to output anything on most servlet engines.
  -        this.pageContext.popBody();
  -    }
  -
       /**
        * Verifies that the target String has indeed been replaced in the tag's
        * body.
  +     * 
  +     * @param theResponse the response from the server side.
        */
       public void endReplacement(WebResponse theResponse)
       {
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>