/*
 * @author Ranides Atterwim <ranides@gmail.com>
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */
package net.ranides.assira.xml.impl;

import net.ranides.assira.xml.XMLElement;
import org.junit.Test;
import static net.ranides.assira.junit.NewAssert.*;
import net.ranides.assira.TestFiles;
import static net.ranides.assira.xml.XMLElement.$;

/**
 *
 * @author Ranides Atterwim <ranides@gmail.com>
 */
public class CElementTest {
    
    @Test
    public void testEquals() {
        XMLElement doc = $(TestFiles.XML_INPUT);
        XMLElement w1 = doc.find("? //user[3]/login").first();
        XMLElement w2 = doc.find("user[id='103'] login").first();
        XMLElement w3 = doc.find("user[id='102'] login").first();
        
        assertEquality(w1, w2, w3);
    }
    
}
