public class BigdataSPARQLUpdateTest2 extends TestCase2
TestCase2.MyProperties, TestCase2.RandomType| Modifier and Type | Field and Description |
|---|---|
protected org.openrdf.repository.RepositoryConnection |
con |
protected String |
packagePath
The file path name for the package in which the data files are found.
|
_randomType| Constructor and Description |
|---|
BigdataSPARQLUpdateTest2() |
BigdataSPARQLUpdateTest2(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
compareTupleQueryResults(org.openrdf.query.TupleQueryResult queryResult,
org.openrdf.query.TupleQueryResult expectedResult) |
protected org.openrdf.repository.Repository |
createRepository() |
Properties |
getProperties()
Note: This method may be overridden in order to run the test suite
against other variations of the bigdata backend.
|
protected InputStream |
getResourceAsStream(String resource) |
protected String |
getResourceAsString(String resource)
Return the contents of the resource.
|
protected boolean |
isSolutionSetUpdateEnabled()
Return
true iff the SPARQL UPDATE for NAMED SOLUTION SETS
test should run. |
protected void |
loadDataset(String datasetFile)
LOAD the data set.
|
protected org.openrdf.repository.Repository |
newRepository() |
protected org.openrdf.query.TupleQueryResult |
readExpectedTupleQueryResult(String resultFileURL) |
void |
setUp() |
void |
tearDown() |
void |
test_clearSolutionSet_01()
A correct rejection test which verifies that an exception is thrown if
the named solution set does not exist.
|
void |
test_clearSolutionSet_02()
A test which verifies that an exception is NOT thrown if
the named solution set does not exist and SILENT is specified.
|
void |
test_createSolutionSet_01()
Unit test of CREATE SOLUTIONS.
|
void |
test_createSolutionSet_02()
Unit test of CREATE SILENT SOLUTIONS verifies that an error is reported
if SILENT is not specified and the solution set exists and that the error
is suppressed if the SILENT keyword is given.
|
void |
test_deleteFromSolutions_01()
Unit test for
DELETE FROM ... |
void |
test_deleteFromSolutions_02()
Unit test for
DELETE FROM ... |
void |
test_deleteFromSolutions_03()
Unit test for
DELETE FROM ... |
void |
test_deleteInsertSolutions_01()
Unit test where we are deleting from one solution set and inserting into
another.
|
void |
test_dropSolutionSet_01()
A correct rejection test which verifies that an exception is thrown if
the named solution set does not exist.
|
void |
test_dropSolutionSet_02()
A test which verifies that an exception is NOT thrown if
the named solution set does not exist and SILENT is specified.
|
void |
test_insertIntoSolutions_01()
Unit test for
INSERT INTO ... |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logPropertiesassertEquals, 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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toStringprotected final String packagePath
protected org.openrdf.repository.RepositoryConnection con
public BigdataSPARQLUpdateTest2()
public BigdataSPARQLUpdateTest2(String name)
public void setUp()
throws Exception
setUp in class junit.framework.TestCaseExceptionpublic void tearDown()
throws Exception
tearDown in class junit.framework.TestCaseExceptionprotected org.openrdf.query.TupleQueryResult readExpectedTupleQueryResult(String resultFileURL) throws Exception
Exceptionprotected InputStream getResourceAsStream(String resource)
protected String getResourceAsString(String resource)
resource - The resource.protected void compareTupleQueryResults(org.openrdf.query.TupleQueryResult queryResult,
org.openrdf.query.TupleQueryResult expectedResult)
throws org.openrdf.query.QueryEvaluationException
org.openrdf.query.QueryEvaluationExceptionpublic Properties getProperties()
getProperties in class TestCase2Properties object that supplies bindings for
property names according to the described hierarchy among
property resources. The returned Properties is NOT
cached.
TODO This does not handle the recursive truncation of the
class name to search for "test.properties" yet.protected org.openrdf.repository.Repository createRepository()
throws Exception
Exceptionprotected org.openrdf.repository.Repository newRepository()
throws org.openrdf.repository.RepositoryException
org.openrdf.repository.RepositoryExceptionprotected void loadDataset(String datasetFile) throws org.openrdf.query.UpdateExecutionException, org.openrdf.query.MalformedQueryException, org.openrdf.repository.RepositoryException
datasetFile - The base name of a file.org.openrdf.query.MalformedQueryExceptionorg.openrdf.query.UpdateExecutionExceptionorg.openrdf.repository.RepositoryExceptionprotected boolean isSolutionSetUpdateEnabled()
true iff the SPARQL UPDATE for NAMED SOLUTION SETS
test should run.
FIXME SPARQL UPDATE for NAMED SOLUTION SETS is NOT SUPPORTED for
read/write transactions (against isolatable indices). This is a GIST
issue. See AbstractTask and the GIST ticket for blocking issues.public void test_insertIntoSolutions_01()
throws Exception
INSERT INTO ... SELECT. This loads some data
into the end point, creates a named solution set, then verifies that the
solutions are present using a query and an INCLUDE join against the named
solution set.Exceptionpublic void test_deleteFromSolutions_01()
throws Exception
DELETE FROM ... SELECT. This loads some data
into the end point, creates a named solution set, then removes some
solutions and verifies that they are no longer reported by query as a
post-condition.Exceptionpublic void test_deleteFromSolutions_02()
throws Exception
DELETE FROM ... SELECT. This loads some data
into the end point, creates a named solution set, then removes some
solutions and verifies that they are no longer reported by query as a
post-condition.Exceptionpublic void test_deleteFromSolutions_03()
throws Exception
DELETE FROM ... SELECT. This loads some data
into the end point, creates a named solution set, then removes some
solutions and verifies that they are no longer reported by query as a
post-condition.Exceptionpublic void test_deleteInsertSolutions_01()
throws Exception
Exceptionpublic void test_createSolutionSet_01()
throws org.openrdf.query.UpdateExecutionException,
org.openrdf.repository.RepositoryException,
org.openrdf.query.MalformedQueryException
Note: If named solution sets which do not exist are equivalent to empty named solution sets, then the only way to verify the post-condition is to issue a DROP or CLEAR on the named solution set. The DROP/CLEAR should throw an exception if the named solution set is not found.
org.openrdf.query.UpdateExecutionExceptionorg.openrdf.repository.RepositoryExceptionorg.openrdf.query.MalformedQueryExceptionpublic void test_createSolutionSet_02()
throws org.openrdf.query.UpdateExecutionException,
org.openrdf.repository.RepositoryException,
org.openrdf.query.MalformedQueryException
org.openrdf.query.UpdateExecutionExceptionorg.openrdf.repository.RepositoryExceptionorg.openrdf.query.MalformedQueryExceptionpublic void test_dropSolutionSet_01()
throws org.openrdf.query.UpdateExecutionException,
org.openrdf.repository.RepositoryException,
org.openrdf.query.MalformedQueryException
org.openrdf.query.UpdateExecutionExceptionorg.openrdf.repository.RepositoryExceptionorg.openrdf.query.MalformedQueryExceptionpublic void test_dropSolutionSet_02()
throws org.openrdf.query.UpdateExecutionException,
org.openrdf.repository.RepositoryException,
org.openrdf.query.MalformedQueryException
org.openrdf.query.UpdateExecutionExceptionorg.openrdf.repository.RepositoryExceptionorg.openrdf.query.MalformedQueryExceptionpublic void test_clearSolutionSet_01()
throws org.openrdf.query.UpdateExecutionException,
org.openrdf.repository.RepositoryException,
org.openrdf.query.MalformedQueryException
org.openrdf.query.UpdateExecutionExceptionorg.openrdf.repository.RepositoryExceptionorg.openrdf.query.MalformedQueryExceptionpublic void test_clearSolutionSet_02()
throws org.openrdf.query.UpdateExecutionException,
org.openrdf.repository.RepositoryException,
org.openrdf.query.MalformedQueryException
org.openrdf.query.UpdateExecutionExceptionorg.openrdf.repository.RepositoryExceptionorg.openrdf.query.MalformedQueryExceptionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.