de.fuberlin.wiwiss.d2rq
Class TestFramework
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
de.fuberlin.wiwiss.d2rq.TestFramework
- All Implemented Interfaces:
- junit.framework.Test
- Direct Known Subclasses:
- FindTestFramework, ModelAPITest, RDQLTestFramework
- public class TestFramework
- extends junit.framework.TestCase
Functional tests that exercise a ModelD2RQ by running RDQL queries against it.
For notes on running the tests, see AllTests
.
Each test method runs one RDQL query 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 values are compared against expected values.
If a test fails, the dump() method can be handy. It shows the actual results returned
by a query on System.out.
To see debug information, uncomment the enableDebug() call in the setUp() method.
- Author:
- Richard Cyganiak
Field Summary |
static java.lang.String |
D2RQMap
|
protected static java.lang.String |
NS
|
protected static com.hp.hpl.jena.datatypes.RDFDatatype |
xsdString
|
protected static com.hp.hpl.jena.datatypes.RDFDatatype |
xsdYear
|
Fields inherited from class junit.framework.TestCase |
|
Method Summary |
static java.lang.String |
getD2RQMap()
|
static java.lang.String |
getNS()
|
void |
run(junit.framework.TestResult result)
|
protected void |
runTest()
|
static void |
setD2RQMap(java.lang.String map)
|
static void |
setNS(java.lang.String ns)
|
protected void |
setUp()
|
protected void |
tearDown()
|
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 |
D2RQMap
public static java.lang.String D2RQMap
NS
protected static java.lang.String NS
xsdString
protected static final com.hp.hpl.jena.datatypes.RDFDatatype xsdString
xsdYear
protected static final com.hp.hpl.jena.datatypes.RDFDatatype xsdYear
TestFramework
public TestFramework(java.lang.String arg0)
getD2RQMap
public static java.lang.String getD2RQMap()
setD2RQMap
public static void setD2RQMap(java.lang.String map)
getNS
public static java.lang.String getNS()
setNS
public static void setNS(java.lang.String ns)
run
public void run(junit.framework.TestResult result)
setUp
protected void setUp()
throws java.lang.Exception
- Throws:
java.lang.Exception
runTest
protected void runTest()
throws java.lang.Throwable
- Throws:
java.lang.Throwable
tearDown
protected void tearDown()
throws java.lang.Exception
- Throws:
java.lang.Exception