Package org.pirkaengine.core.template

Examples of org.pirkaengine.core.template.TextNode


     * setup.
     */
    @Before
    public void setup() {
        Node[] nodes = new Node[1];
        nodes[0] = new TextNode("hoge");
        target = new EmptyNode(new StartTagNode("<p>", "prk:mock", "true"), new EndTagNode("</p>"), nodes);
    }
View Full Code Here


    }

    @Test
    public void equals_true() {
        Node[] nodes = new Node[1];
        nodes[0] = new TextNode("hoge");
        EmptyNode node = new EmptyNode(new StartTagNode("<p>", "prk:mock", "true"), new EndTagNode("</p>"), nodes);
        assertEquals(node.hashCode(), target.hashCode());
        assertTrue(node.equals(target));
    }
View Full Code Here

    private TextNode target;

    @Before
    public void setup() {
        target = new TextNode("test");
    }
View Full Code Here

        target = new TextNode("test");
    }

    @Test
    public void equals() {
        TextNode other = new TextNode("test");
        assertEquals(target.hashCode(), other.hashCode());
        assertTrue(target.equals(other));
    }
View Full Code Here

        assertTrue(target.equals(other));
    }

    @Test
    public void equals_false() {
        TextNode other = new TextNode("test2");
        assertFalse(target.equals(other));
    }
View Full Code Here

    private ConditionNode target;

    @Before
    public void setup() {
        Node[] nodes = new Node[1];
        nodes[0] = new TextNode("text");
        target = new ConditionNode(new StartTagNode("<p>", "prk:if", "display"), new EndTagNode("</p>"), nodes);
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void test_constructor() {
        Node[] nodes = new Node[1];
        nodes[0] = new TextNode("text");
        new ConditionNode(null, new EndTagNode("</p>"), nodes);
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void test_constructor2() {
        Node[] nodes = new Node[1];
        nodes[0] = new TextNode("text");
        new ConditionNode(new StartTagNode("<p>", "prk:if", "display"), null, nodes);
    }
View Full Code Here

    @Test
    public void serializeAndDeserialize_simple() throws SerializeException {
        String templateName = "simple";
        XhtmlTemplate template = new XhtmlTemplate(templateName);
        template.stack(new TextNode("<html><body></body></html>"));
        target.serialize(template);
        Template result = target.deserialize(template.getName());
        assertEquals(template, result);
    }
View Full Code Here

TOP

Related Classes of org.pirkaengine.core.template.TextNode

Copyright © 2018 www.massapicom. 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.