de.fuberlin.wiwiss.d2rq
Class FindTestFramework

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byde.fuberlin.wiwiss.d2rq.TestFramework
              extended byde.fuberlin.wiwiss.d2rq.FindTestFramework
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
FindTest, TablePrefixerTest

public class FindTestFramework
extends TestFramework

Functional tests for the find(spo) operation of GraphD2RQ. For notes on running the tests, see AllTests. Each test method runs one or more find queries and automatically compares the actual results to the expected results. For some tests, only the number of returned triples is checked. For others, the returned triples are compared against expected triples. If a test fails, the dump() method can be handy. It shows the actual triples returned by a query on System.out. To see debug information, uncomment the enableDebug() call in the setUp() method.

Author:
Richard Cyganiak

Field Summary
protected  GraphD2RQ graph
           
protected  java.util.Set resultTriples
           
 
Fields inherited from class de.fuberlin.wiwiss.d2rq.TestFramework
D2RQMap, NS, xsdString, xsdYear
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
FindTestFramework(java.lang.String arg0)
           
 
Method Summary
protected  void assertNoTriple(com.hp.hpl.jena.graph.Node s, com.hp.hpl.jena.graph.Node p, com.hp.hpl.jena.graph.Node o)
           
protected  void assertTriple(com.hp.hpl.jena.graph.Node s, com.hp.hpl.jena.graph.Node p, com.hp.hpl.jena.graph.Node o)
           
protected  void assertTripleCount(int count)
           
protected  void dump()
           
protected  void find(com.hp.hpl.jena.graph.Node s, com.hp.hpl.jena.graph.Node p, com.hp.hpl.jena.graph.Node o)
           
protected  void setUp()
           
protected  void tearDown()
           
 
Methods inherited from class de.fuberlin.wiwiss.d2rq.TestFramework
getD2RQMap, getNS, run, runTest, setD2RQMap, setNS
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

graph

protected GraphD2RQ graph

resultTriples

protected java.util.Set resultTriples
Constructor Detail

FindTestFramework

public FindTestFramework(java.lang.String arg0)
Parameters:
arg0 -
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class TestFramework
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class TestFramework
Throws:
java.lang.Exception

find

protected void find(com.hp.hpl.jena.graph.Node s,
                    com.hp.hpl.jena.graph.Node p,
                    com.hp.hpl.jena.graph.Node o)

dump

protected void dump()

assertTripleCount

protected void assertTripleCount(int count)

assertTriple

protected void assertTriple(com.hp.hpl.jena.graph.Node s,
                            com.hp.hpl.jena.graph.Node p,
                            com.hp.hpl.jena.graph.Node o)

assertNoTriple

protected void assertNoTriple(com.hp.hpl.jena.graph.Node s,
                              com.hp.hpl.jena.graph.Node p,
                              com.hp.hpl.jena.graph.Node o)