| com.hp.hpl.jena.graph.test.GraphTestBase com.hp.hpl.jena.graph.test.AbstractTestGraph
All known Subclasses: com.hp.hpl.jena.ontology.impl.test.TestOntGraph, com.hp.hpl.jena.graph.test.MetaTestGraph, com.hp.hpl.jena.graph.compose.test.TestMultiUnion, com.hp.hpl.jena.mem.faster.test.TestFasterGraphMem, com.hp.hpl.jena.mem.test.AbstractTestGraphMem, com.hp.hpl.jena.reasoner.test.TestInfGraph,
AbstractTestGraph | public class AbstractTestGraph extends GraphTestBase (Code) | | AbstractTestGraph provides a bunch of basic tests for something that
purports to be a Graph. The abstract method getGraph must be overridden
in subclasses to deliver a Graph of interest.
author: kers |
Method Summary | |
protected void | aABC(Reifier r) | protected void | add(Graph toUpdate, Graph toAdd) | public Iterator | asIterator(Triple[] triples) | protected boolean | canBeEmpty(Graph g) | protected Graph | copy(Graph g) | protected Graph | getAndRegister(GraphListener gl) Utility: get a graph, register L with its manager, return the graph. | protected Graph | getClosed() | public Graph | getGraph() Returns a Graph to take part in the test. | public Graph | getGraphWith(String facts) | protected Set | listObjects(Graph g) | protected Set | listPredicates(Graph g) | protected Set | listSubjects(Graph g) | protected Graph | remove(Graph toUpdate, Graph toRemove) | public void | testAGraph() | public void | testAddTriple() | public void | testBulkAddArrayEvent() | public void | testBulkAddGraph() | public void | testBulkAddIterator() | public void | testBulkAddList() | public void | testBulkAddWithReification() | public void | testBulkAddWithReification(boolean withReifications) | public void | testBulkAddWithReificationPreamble() | public void | testBulkDeleteArray() | public void | testBulkDeleteGraph() | public void | testBulkDeleteIterator() | public void | testBulkDeleteList() | public void | testBulkRemoveWithReification() | public void | testBulkUpdate() | public void | testBulkUpdateRemoveWithReification(boolean withReifications) | public void | testCloseSetsIsClosed() | public void | testContainsByValue() Check that contains respects by-value semantics. | public void | testContainsConcrete() | public void | testContainsFluid() | public void | testContainsNode() Test that nodes can be found in all triple positions. | public void | testDeleteTriple() | public void | testEventDeleteByFind() Ensure that triples removed by calling .remove() on the iterator returned by
a find() will generate deletion notifications. | public void | testEventRegister() | public void | testEventUnregister() Test that we can safely unregister a listener that isn't registered. | public void | testExecuteInTransactionCatchesThrowable() | public void | testFind() | public void | testFindAndContains() This test case was generated by Ian and was caused by GraphMem
not keeping up with changes to the find interface. | public void | testFindByFluidTriple() | public void | testGeneralEvent() | public void | testGetStatisticsHandler() | public void | testHasCapabilities() | public void | testHasTransactions() Test that Graphs have transaction support methods, and that if they fail
on some g they fail because they do not support the operation. | public void | testIsEmpty() test isEmpty - moved from the QueryHandler code. | public void | testIsomorphismFile() | public void | testListObjectNoDuplicates() | public void | testListObjects() | public void | testListObjectsNoRemove() | public void | testListPredicates() | public void | testListPredicatesNoRemove() | public void | testListSubjects() | public void | testListSubjectsNoRemove() | public void | testMatchBothLanguagedLiteralsCaseInsensitive() | public void | testMatchLanguagedLiteralCaseInsensitive() | public void | testNoMatchAgainstUnlanguagesLiteral() | public void | testObjectsFor() | public void | testPredicatesFor() | public void | testRegisterTwice() | public void | testRemove() | public void | testRemove(String findRemove, String findCheck) | public void | testRemoveAll() | public void | testRemoveAll(String triples) | public void | testRemoveAllEvent() | public void | testRemoveSPO() Test that remove(s, p, o) works, in the presence of inferencing graphs that
mean emptyness isn't available. | public void | testRemoveSomeEvent() | public void | testRepeatedSubjectDoesNotConceal() | protected void | testSameObjects(Graph g, Node s, Node p) | protected void | testSamePredicates(Graph g, Node s, Node o) | protected void | testSameSubjects(Graph g, Node p, Node o) | public void | testSubjectsFor() | public void | testTwoListeners() | public void | testUnregisterOnce() | public void | testUnregisterWorks() | protected void | xSPO(Reifier r) | protected void | xSPOyXYZ(Reifier r) |
SPO | protected Triple SPO(Code) | | Handy triple for test purposes.
|
cases | protected String[][] cases(Code) | | Test cases for RemoveSPO(); each entry is a triple (add, remove, result).
- add - the triples to add to the graph to start with
- remove - the pattern to use in the removal
- result - the triples that should remain in the graph
|
AbstractTestGraph | public AbstractTestGraph(String name)(Code) | | |
getAndRegister | protected Graph getAndRegister(GraphListener gl)(Code) | | Utility: get a graph, register L with its manager, return the graph.
|
getGraph | public Graph getGraph()(Code) | | Returns a Graph to take part in the test. Must be overridden in
a subclass.
|
testAGraph | public void testAGraph()(Code) | | |
testAddTriple | public void testAddTriple()(Code) | | |
testBulkAddArrayEvent | public void testBulkAddArrayEvent()(Code) | | |
testBulkAddGraph | public void testBulkAddGraph()(Code) | | |
testBulkAddIterator | public void testBulkAddIterator()(Code) | | |
testBulkAddList | public void testBulkAddList()(Code) | | |
testBulkAddWithReification | public void testBulkAddWithReification()(Code) | | |
testBulkAddWithReification | public void testBulkAddWithReification(boolean withReifications)(Code) | | |
testBulkAddWithReificationPreamble | public void testBulkAddWithReificationPreamble()(Code) | | |
testBulkDeleteArray | public void testBulkDeleteArray()(Code) | | |
testBulkDeleteGraph | public void testBulkDeleteGraph()(Code) | | |
testBulkDeleteIterator | public void testBulkDeleteIterator()(Code) | | |
testBulkDeleteList | public void testBulkDeleteList()(Code) | | |
testBulkRemoveWithReification | public void testBulkRemoveWithReification()(Code) | | |
testBulkUpdate | public void testBulkUpdate()(Code) | | |
testBulkUpdateRemoveWithReification | public void testBulkUpdateRemoveWithReification(boolean withReifications)(Code) | | |
testCloseSetsIsClosed | public void testCloseSetsIsClosed()(Code) | | |
testContainsByValue | public void testContainsByValue()(Code) | | Check that contains respects by-value semantics.
|
testContainsConcrete | public void testContainsConcrete()(Code) | | |
testContainsFluid | public void testContainsFluid()(Code) | | |
testContainsNode | public void testContainsNode()(Code) | | Test that nodes can be found in all triple positions.
However, testing for literals in subject positions is suppressed
at present to avoid problems with InfGraphs which try to prevent
such constructs leaking out to the RDF layer.
|
testDeleteTriple | public void testDeleteTriple()(Code) | | |
testEventDeleteByFind | public void testEventDeleteByFind()(Code) | | Ensure that triples removed by calling .remove() on the iterator returned by
a find() will generate deletion notifications.
|
testEventRegister | public void testEventRegister()(Code) | | |
testEventUnregister | public void testEventUnregister()(Code) | | Test that we can safely unregister a listener that isn't registered.
|
testExecuteInTransactionCatchesThrowable | public void testExecuteInTransactionCatchesThrowable()(Code) | | |
testFind | public void testFind()(Code) | | |
testFindAndContains | public void testFindAndContains()(Code) | | This test case was generated by Ian and was caused by GraphMem
not keeping up with changes to the find interface.
|
testFindByFluidTriple | public void testFindByFluidTriple()(Code) | | |
testGeneralEvent | public void testGeneralEvent()(Code) | | |
testGetStatisticsHandler | public void testGetStatisticsHandler()(Code) | | |
testHasCapabilities | public void testHasCapabilities()(Code) | | |
testHasTransactions | public void testHasTransactions()(Code) | | Test that Graphs have transaction support methods, and that if they fail
on some g they fail because they do not support the operation.
|
testIsEmpty | public void testIsEmpty()(Code) | | test isEmpty - moved from the QueryHandler code.
|
testListObjectNoDuplicates | public void testListObjectNoDuplicates()(Code) | | |
testListObjects | public void testListObjects()(Code) | | |
testListObjectsNoRemove | public void testListObjectsNoRemove()(Code) | | |
testListPredicates | public void testListPredicates()(Code) | | |
testListPredicatesNoRemove | public void testListPredicatesNoRemove()(Code) | | |
testListSubjects | public void testListSubjects()(Code) | | |
testListSubjectsNoRemove | public void testListSubjectsNoRemove()(Code) | | |
testMatchBothLanguagedLiteralsCaseInsensitive | public void testMatchBothLanguagedLiteralsCaseInsensitive()(Code) | | |
testMatchLanguagedLiteralCaseInsensitive | public void testMatchLanguagedLiteralCaseInsensitive()(Code) | | |
testNoMatchAgainstUnlanguagesLiteral | public void testNoMatchAgainstUnlanguagesLiteral()(Code) | | |
testObjectsFor | public void testObjectsFor()(Code) | | |
testPredicatesFor | public void testPredicatesFor()(Code) | | |
testRegisterTwice | public void testRegisterTwice()(Code) | | |
testRemove | public void testRemove()(Code) | | |
testRemoveAll | public void testRemoveAll()(Code) | | |
testRemoveAll | public void testRemoveAll(String triples)(Code) | | |
testRemoveAllEvent | public void testRemoveAllEvent()(Code) | | |
testRemoveSPO | public void testRemoveSPO()(Code) | | Test that remove(s, p, o) works, in the presence of inferencing graphs that
mean emptyness isn't available. This is why we go round the houses and
test that expected ~= initialContent + addedStuff - removed - initialContent.
|
testRemoveSomeEvent | public void testRemoveSomeEvent()(Code) | | |
testRepeatedSubjectDoesNotConceal | public void testRepeatedSubjectDoesNotConceal()(Code) | | |
testSubjectsFor | public void testSubjectsFor()(Code) | | |
testTwoListeners | public void testTwoListeners()(Code) | | |
testUnregisterOnce | public void testUnregisterOnce()(Code) | | |
testUnregisterWorks | public void testUnregisterWorks()(Code) | | |
Fields inherited from com.hp.hpl.jena.graph.test.GraphTestBase | protected static int bnc(Code)(Java Doc)
|
Methods inherited from com.hp.hpl.jena.graph.test.GraphTestBase | protected static void appendNode(StringBuffer b, Map bnodes, Node n)(Code)(Java Doc) public Set arrayToSet(Object[] A)(Code)(Java Doc) public static void assertContains(String name, String s, Graph g)(Code)(Java Doc) public static void assertContainsAll(String name, Graph g, String s)(Code)(Java Doc) public static void assertEqualsTemplate(String title, Graph g, String template)(Code)(Java Doc) public static void assertIsomorphic(String title, Graph expected, Graph got)(Code)(Java Doc) public static void assertIsomorphic(Graph expected, Graph got)(Code)(Java Doc) public static void assertOmits(String name, Graph g, String s)(Code)(Java Doc) public static void assertOmitsAll(String name, Graph g, String s)(Code)(Java Doc) public static boolean contains(Graph g, String fact)(Code)(Java Doc) public static Graph getGraph(Object wrap, Class graphClass, ReificationStyle style)(Code)(Java Doc) protected static Graph getReificationTriples(Reifier r)(Code)(Java Doc) public static Graph graphAdd(Graph g, String s)(Code)(Java Doc) public static Graph graphWith(String s)(Code)(Java Doc) public static List iteratorToList(Iterator it)(Code)(Java Doc) public static Set iteratorToSet(Iterator it)(Code)(Java Doc) public static Graph newGraph()(Code)(Java Doc) public static String nice(Graph g, Map bnodes)(Code)(Java Doc) protected static String nice(Node n)(Code)(Java Doc) protected static void niceTriple(StringBuffer b, Map bnodes, Triple t)(Code)(Java Doc) public static Node node(String x)(Code)(Java Doc) public static Node[] nodeArray(String items)(Code)(Java Doc) public static List nodeList(String items)(Code)(Java Doc) public Set nodeSet(String nodes)(Code)(Java Doc) public void testContains(Graph g, Triple[] triples)(Code)(Java Doc) public void testContains(Graph g, List triples)(Code)(Java Doc) public void testContains(Graph g, Iterator it)(Code)(Java Doc) public void testContains(Graph g, Graph other)(Code)(Java Doc) public void testOmits(Graph g, Triple[] triples)(Code)(Java Doc) public void testOmits(Graph g, List triples)(Code)(Java Doc) public void testOmits(Graph g, Iterator it)(Code)(Java Doc) public void testOmits(Graph g, Graph other)(Code)(Java Doc) public static Triple triple(String fact)(Code)(Java Doc) public static Triple triple(PrefixMapping pm, String fact)(Code)(Java Doc) public static Triple[] tripleArray(String facts)(Code)(Java Doc) public static Set tripleSet(String facts)(Code)(Java Doc)
|
|
|