Search in sources :

Example 6 with WHiddenComment

use of com.github.bordertech.wcomponents.WHiddenComment in project wcomponents by BorderTech.

the class WHiddenCommentRenderer_Test method testDoPaint.

@Test
public void testDoPaint() throws IOException, SAXException, XpathException {
    String textString1 = "test comment1";
    String textString2 = "test comment2";
    WHiddenComment comment = new WHiddenComment();
    // No comment
    assertSchemaMatch(comment);
    assertXpathEvaluatesTo("", COMMENT_XPATH, comment);
    // Default comment
    comment.setText(textString1);
    assertSchemaMatch(comment);
    assertXpathEvaluatesTo(textString1, COMMENT_XPATH, comment);
    // Context Comment
    setActiveContext(createUIContext());
    comment.setText(textString2);
    assertSchemaMatch(comment);
    assertXpathEvaluatesTo(textString2, COMMENT_XPATH, comment);
}
Also used : WHiddenComment(com.github.bordertech.wcomponents.WHiddenComment) Test(org.junit.Test)

Aggregations

WHiddenComment (com.github.bordertech.wcomponents.WHiddenComment)6 Test (org.junit.Test)5 WPanel (com.github.bordertech.wcomponents.WPanel)1 XmlStringBuilder (com.github.bordertech.wcomponents.XmlStringBuilder)1