1 37 package net.sourceforge.cruisecontrol.taglib; 38 39 import javax.servlet.jsp.JspException ; 40 import javax.servlet.jsp.tagext.BodyContent ; 41 import javax.servlet.jsp.tagext.BodyTag ; 42 import javax.servlet.jsp.tagext.Tag ; 43 44 import net.sourceforge.cruisecontrol.mock.MockBodyContent; 45 46 import junit.framework.TestCase; 47 48 52 public class CruiseControlBodyTagSupportTest extends TestCase { 53 54 private CruiseControlBodyTagSupport support; 55 private BodyContent content; 56 57 public CruiseControlBodyTagSupportTest(String name) { 58 super(name); 59 } 60 61 protected void setUp() throws Exception { 62 support = new CruiseControlBodyTagSupport(); 63 content = new MockBodyContent(); 64 support.setBodyContent(content); 65 } 66 67 protected void tearDown() throws Exception { 68 support = null; 69 content = null; 70 } 71 72 public void testDoStartTag() throws JspException { 73 assertEquals(BodyTag.EVAL_BODY_TAG, support.doStartTag()); 74 } 75 76 public void testRelease() { 77 support.release(); 78 assertNull(support.getBodyContent()); 79 } 80 81 public void testDoAfterBody() throws JspException { 82 assertEquals(Tag.SKIP_BODY, support.doAfterBody()); 83 } 84 85 public void testGetPreviousOut() { 86 } 87 88 } 89 | Popular Tags |