Search in sources :

Example 16 with DLN

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);
}
Also used : DLN(org.exist.numbering.DLN) Test(org.junit.Test)

Aggregations

DLN (org.exist.numbering.DLN)16 Test (org.junit.Test)12 NodeId (org.exist.numbering.NodeId)8 DocumentImpl (org.exist.dom.persistent.DocumentImpl)4 NodeProxy (org.exist.dom.persistent.NodeProxy)4 PermissionDeniedException (org.exist.security.PermissionDeniedException)4 Geometry (com.vividsolutions.jts.geom.Geometry)3 ParseException (com.vividsolutions.jts.io.ParseException)3 ValueSequence (org.exist.xquery.value.ValueSequence)3 Item (org.exist.xquery.value.Item)2 Sequence (org.exist.xquery.value.Sequence)2 UnsynchronizedByteArrayInputStream (org.apache.commons.io.input.UnsynchronizedByteArrayInputStream)1 Base64BinaryValueType (org.exist.xquery.value.Base64BinaryValueType)1 BooleanValue (org.exist.xquery.value.BooleanValue)1 DoubleValue (org.exist.xquery.value.DoubleValue)1 StringValue (org.exist.xquery.value.StringValue)1