I'm trying to test my custom taglibs and the code executes fine. But how do
I access the contents of the JspWriter to check that the correct output was
written? I'm sure the answer is obvious and that all I need is some fresh
air ;-)

public class MyTagTest extends JspTestCase {
     public void testMyTag()
          throws java.io.IOException, javax.servlet.ServletException {

          try {
               PrintCommentTag pct = new PrintCommentTag();  // no
bodycontent needed for this tag
               pct.setPageContext(pageContext);

               pct.setScope("request");
               pct.setColumn("addrlin1");

               pct.doStartTag();
               pct.doEndTag();

               pct.release();
               pct = null;
          } catch(JspException jspe) {
               jspe.printStackTrace();
               throw new ServletException(jspe);
          }

          // assertTrue(?);

     }
}

Regards,
S�ren Bro


Reply via email to