use of com.orientechnologies.orient.core.record.impl.ODocumentComparator in project orientdb by orientechnologies.
the class CRUDDocumentValidationTest method testNullComparison.
@Test
public void testNullComparison() {
// given
ODocument doc1 = new ODocument().field("testField", (Object) null);
ODocument doc2 = new ODocument().field("testField", (Object) null);
ODocumentComparator comparator = new ODocumentComparator(Collections.singletonList(new OPair<String, String>("testField", "asc")), new OBasicCommandContext());
Assert.assertEquals(comparator.compare(doc1, doc2), 0);
}
Aggregations