use of org.apache.jena.datatypes.BaseDatatype in project jena by apache.
the class TestLiteralLabels method testDatatypeIsEqualsNotCalledIfSecondOperandIsNotTyped.
public void testDatatypeIsEqualsNotCalledIfSecondOperandIsNotTyped() {
RDFDatatype d = new BaseDatatype("eh:/FakeDataType") {
@Override
public boolean isEqual(LiteralLabel A, LiteralLabel B) {
fail("RDFDatatype::isEquals should not be called if B has no datatype");
return false;
}
};
LiteralLabel A = LiteralLabelFactory.createByValue("17", "", d);
LiteralLabel B = LiteralLabelFactory.createByValue("17", "", null);
assertFalse(A.sameValueAs(B));
}
Aggregations