public abstract class AbstractDatatypeHandlerTest extends Object
Modifier and Type | Field and Description |
---|---|
org.junit.rules.ExpectedException |
thrown |
Constructor and Description |
---|
AbstractDatatypeHandlerTest() |
protected abstract DatatypeHandler getNewDatatypeHandler()
DatatypeHandler
implementation in
question and returns it.DatatypeHandler
implementation being
tested.protected abstract URI getRecognisedDatatypeUri()
DatatypeHandler.isRecognizedDatatype(URI)
and not throw an
exception if used with a valid value when calling
DatatypeHandler.verifyDatatype(String, URI)
and
DatatypeHandler.normalizeDatatype(String, URI, ValueFactory)
.protected abstract URI getUnrecognisedDatatypeUri()
DatatypeHandler.isRecognizedDatatype(URI)
and throw an
exception if used with
DatatypeHandler.verifyDatatype(String, URI)
and
DatatypeHandler.normalizeDatatype(String, URI, ValueFactory)
.protected abstract String getValueMatchingRecognisedDatatypeUri()
DatatypeHandler.verifyDatatype(String, URI)
and
DatatypeHandler.normalizeDatatype(String, URI, ValueFactory)
.protected abstract String getValueNotMatchingRecognisedDatatypeUri()
DatatypeHandler.verifyDatatype(String, URI)
and
DatatypeHandler.normalizeDatatype(String, URI, ValueFactory)
.protected abstract Literal getNormalisedLiteralForRecognisedDatatypeAndValue()
Literal
that is equal to the expected
output from a successful call to
DatatypeHandler.normalizeDatatype(String, URI, org.openrdf.model.ValueFactory)
;protected abstract ValueFactory getValueFactory()
ValueFactory
that can be used to produce a
normalised literal.protected abstract String getExpectedKey()
DatatypeHandler.getKey()
to identify the service.public void testIsRecognizedDatatypeNull() throws Exception
DatatypeHandler.isRecognizedDatatype(org.openrdf.model.URI)
.Exception
public void testIsRecognizedDatatypeTrue() throws Exception
DatatypeHandler.isRecognizedDatatype(org.openrdf.model.URI)
.Exception
public void testIsRecognizedDatatypeFalse() throws Exception
DatatypeHandler.isRecognizedDatatype(org.openrdf.model.URI)
.Exception
public void testVerifyDatatypeNullDatatypeUri() throws Exception
DatatypeHandler.verifyDatatype(java.lang.String, org.openrdf.model.URI)
.Exception
public void testVerifyDatatypeNullValueRecognised() throws Exception
DatatypeHandler.verifyDatatype(java.lang.String, org.openrdf.model.URI)
.Exception
public void testVerifyDatatypeNullValueUnrecognised() throws Exception
DatatypeHandler.verifyDatatype(java.lang.String, org.openrdf.model.URI)
.Exception
public void testVerifyDatatypeUnrecognisedDatatypeUri() throws Exception
DatatypeHandler.verifyDatatype(java.lang.String, org.openrdf.model.URI)
.Exception
public void testVerifyDatatypeInvalidValue() throws Exception
DatatypeHandler.verifyDatatype(java.lang.String, org.openrdf.model.URI)
.Exception
public void testVerifyDatatypeValidValue() throws Exception
DatatypeHandler.verifyDatatype(java.lang.String, org.openrdf.model.URI)
.Exception
public void testNormalizeDatatypeNullDatatypeUri() throws Exception
DatatypeHandler.normalizeDatatype(java.lang.String, org.openrdf.model.URI, org.openrdf.model.ValueFactory)
.Exception
public void testNormalizeDatatypeNullValue() throws Exception
DatatypeHandler.normalizeDatatype(java.lang.String, org.openrdf.model.URI, org.openrdf.model.ValueFactory)
.Exception
public void testNormalizeDatatypeUnrecognisedDatatypeUri() throws Exception
DatatypeHandler.normalizeDatatype(java.lang.String, org.openrdf.model.URI, org.openrdf.model.ValueFactory)
.Exception
public void testNormalizeDatatypeInvalidValue() throws Exception
DatatypeHandler.normalizeDatatype(java.lang.String, org.openrdf.model.URI, org.openrdf.model.ValueFactory)
.Exception
public void testNormalizeDatatypeValidValue() throws Exception
DatatypeHandler.normalizeDatatype(java.lang.String, org.openrdf.model.URI, org.openrdf.model.ValueFactory)
.Exception
public void testGetKey() throws Exception
DatatypeHandler.getKey()
.Exception
Copyright © 2001-2016 Aduna. All Rights Reserved.