Package org.pirkaengine.core.template

Source Code of org.pirkaengine.core.template.TextNodeTest

package org.pirkaengine.core.template;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;
import org.pirkaengine.core.template.TextNode;

public class TextNodeTest {

    private TextNode target;

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

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

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

    @Test
    public void equals_null() {
        assertFalse(target.equals(null));
    }

    @Test
    public void equals_same() {
        assertTrue(target.equals(target));
    }

}
TOP

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

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.