Examples of MockBodyContent


Examples of net.sourceforge.cruisecontrol.mock.MockBodyContent

    public void testDoStartTag() throws JspException {
        assertEquals(BodyTag.EVAL_BODY_TAG, tag.doStartTag());
    }

    public void testDoAfterBody() throws JspException {
        MockBodyContent content = new MockBodyContent();
        tag.setBodyContent(content);
        assertEquals(Tag.SKIP_BODY, tag.doAfterBody());
    }
View Full Code Here

Examples of net.sourceforge.cruisecontrol.mock.MockBodyContent

        super(name);
    }

    protected void setUp() throws Exception {
        support = new CruiseControlBodyTagSupport();
        content = new MockBodyContent();
        support.setBodyContent(content);
    }
View Full Code Here

Examples of net.sourceforge.cruisecontrol.mock.MockBodyContent

        super(name);
    }

    protected void setUp() {
        tabSheet = new TabSheetTag();
        content = new MockBodyContent();
        tabSheet.setBodyContent(content);
        pageContext = new MockPageContext();
        request = new MockServletRequest("context", "servlet");
        pageContext.setHttpServletRequest(request);
        tabSheet.setPageContext(pageContext);
View Full Code Here

Examples of org.springframework.mock.web.MockBodyContent

    StringBuilder body = new StringBuilder();
    body.append("<a href=\"http://myDomain.com\">Link</a>");
    body.append("\n");
    body.append("<div>Content</div>");
   
    extraHtmlTag.setBodyContent(new MockBodyContent(body.toString(), mockPageContext.getOut()));
    extraHtmlTag.setUid("M");
    extraHtmlTag.setCssClass("class1");
    extraHtmlTag.setCssStyle("float:left");
    extraHtmlTag.setContainer("div");
  }
View Full Code Here

Examples of org.springframework.mock.web.MockBodyContent

    StringBuilder body = new StringBuilder();
    body.append("<a href=\"http://myDomain.com\">Link</a>");
    body.append("\n");
    body.append("<div>Content</div>");
   
    extraHtmlTag.setBodyContent(new MockBodyContent(body.toString(), mockPageContext.getOut()));
    extraHtmlTag.setUid("M");
    extraHtmlTag.setCssClass("class1");
    extraHtmlTag.setCssStyle("float:left");
  }
View Full Code Here

Examples of org.springframework.mock.web.MockBodyContent

    @Test
    public void testMessageBody() throws Exception {
        this.setUp(null);

        MockBodyContent content = new MockBodyContent("This is the body content 01.", (Writer)null);
        this.tag.setBodyContent(content);

        assertEquals("The message is not correct.", "This is the body content 01.", this.tag.getMessage());
    }
View Full Code Here

Examples of org.springframework.mock.web.MockBodyContent

    @Test
    public void testMessageStringBodyIgnored() throws Exception {
        this.setUp(null);

        MockBodyContent content = new MockBodyContent("This is more body content 02.", (Writer)null);
        this.tag.setBodyContent(content);
        this.tag.setMessage("This is another message 02.");

        assertEquals("The message is not correct.", "This is another message 02.", this.tag.getMessage());
    }
View Full Code Here

Examples of org.springframework.mock.web.MockBodyContent

    @Test
    public void testMessageBody() throws Exception {
        this.setUp(null);

        MockBodyContent content = new MockBodyContent("This is the body content 01.", (Writer)null);
        this.tag.setBodyContent(content);

        assertEquals("The message is not correct.", "This is the body content 01.", this.tag.getMessage());
    }
View Full Code Here

Examples of org.springframework.mock.web.MockBodyContent

    @Test
    public void testMessageStringBodyIgnored() throws Exception {
        this.setUp(null);

        MockBodyContent content = new MockBodyContent("This is more body content 02.", (Writer)null);
        this.tag.setBodyContent(content);
        this.tag.setMessage("This is another message 02.");

        assertEquals("The message is not correct.", "This is another message 02.", this.tag.getMessage());
    }
View Full Code Here

Examples of org.springframework.mock.web.MockBodyContent

  }


  public void testWithExplicitNonWhitespaceBodyContent() throws Exception {
    String mockContent = "This is some explicit body content";
    this.tag.setBodyContent(new MockBodyContent(mockContent, getWriter()));

    // construct an errors instance of the tag
    TestBean target = new TestBean();
    target.setName("Rob Harrop");
    Errors errors = new BeanPropertyBindingResult(target, COMMAND_NAME);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.