use of org.exist.numbering.DLN in project exist by eXist-db.
the class ElementImplTest method isSameNode_differentTextDifferentDoc.
@Test
public void isSameNode_differentTextDifferentDoc() {
final DocumentImpl doc = EasyMock.createMock(DocumentImpl.class);
expect(doc.getDocId()).andReturn(21);
final DocumentImpl doc2 = EasyMock.createMock(DocumentImpl.class);
expect(doc2.getDocId()).andReturn(67);
replay(doc, doc2);
final ElementImpl elem = new ElementImpl();
elem.setOwnerDocument(doc);
elem.setNodeId(new DLN("1.2"));
final ElementImpl elem2 = new ElementImpl();
elem2.setOwnerDocument(doc2);
elem2.setNodeId(new DLN("1.2"));
assertFalse(elem.isSameNode(elem2));
verify(doc, doc2);
}
Aggregations