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)
.Exceptionpublic void testIsRecognizedDatatypeTrue()
throws Exception
DatatypeHandler.isRecognizedDatatype(org.openrdf.model.URI)
.Exceptionpublic void testIsRecognizedDatatypeFalse()
throws Exception
DatatypeHandler.isRecognizedDatatype(org.openrdf.model.URI)
.Exceptionpublic void testVerifyDatatypeNullDatatypeUri()
throws Exception
DatatypeHandler.verifyDatatype(java.lang.String, org.openrdf.model.URI)
.Exceptionpublic void testVerifyDatatypeNullValueRecognised()
throws Exception
DatatypeHandler.verifyDatatype(java.lang.String, org.openrdf.model.URI)
.Exceptionpublic void testVerifyDatatypeNullValueUnrecognised()
throws Exception
DatatypeHandler.verifyDatatype(java.lang.String, org.openrdf.model.URI)
.Exceptionpublic void testVerifyDatatypeUnrecognisedDatatypeUri()
throws Exception
DatatypeHandler.verifyDatatype(java.lang.String, org.openrdf.model.URI)
.Exceptionpublic void testVerifyDatatypeInvalidValue()
throws Exception
DatatypeHandler.verifyDatatype(java.lang.String, org.openrdf.model.URI)
.Exceptionpublic void testVerifyDatatypeValidValue()
throws Exception
DatatypeHandler.verifyDatatype(java.lang.String, org.openrdf.model.URI)
.Exceptionpublic void testNormalizeDatatypeNullDatatypeUri()
throws Exception
DatatypeHandler.normalizeDatatype(java.lang.String, org.openrdf.model.URI, org.openrdf.model.ValueFactory)
.Exceptionpublic void testNormalizeDatatypeNullValue()
throws Exception
DatatypeHandler.normalizeDatatype(java.lang.String, org.openrdf.model.URI, org.openrdf.model.ValueFactory)
.Exceptionpublic void testNormalizeDatatypeUnrecognisedDatatypeUri()
throws Exception
DatatypeHandler.normalizeDatatype(java.lang.String, org.openrdf.model.URI, org.openrdf.model.ValueFactory)
.Exceptionpublic void testNormalizeDatatypeInvalidValue()
throws Exception
DatatypeHandler.normalizeDatatype(java.lang.String, org.openrdf.model.URI, org.openrdf.model.ValueFactory)
.Exceptionpublic void testNormalizeDatatypeValidValue()
throws Exception
DatatypeHandler.normalizeDatatype(java.lang.String, org.openrdf.model.URI, org.openrdf.model.ValueFactory)
.Exceptionpublic void testGetKey()
throws Exception
DatatypeHandler.getKey().ExceptionCopyright © 2001–2015 Aduna. All rights reserved.