public abstract class AbstractQueryEngineTestCase extends TestCase2
QueryEngine
.TestCase2.MyProperties, TestCase2.RandomType
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
log |
_randomType
Constructor and Description |
---|
AbstractQueryEngineTestCase() |
AbstractQueryEngineTestCase(String name) |
Modifier and Type | Method and Description |
---|---|
static void |
assertSameSolutions(IBindingSet[] expected,
IAsynchronousIterator<IBindingSet[]> itr)
Deprecated.
by
#assertSameSolutions(Future, IBindingSet[], IAsynchronousIterator) |
static void |
assertSameSolutions(IBindingSet[] expected,
ICloseableIterator<IBindingSet[]> itr,
Future<Void> ft)
Verify the expected solutions.
|
static void |
assertSameSolutions(IBindingSet[] expected,
IRunningQuery runningQuery)
Verify the expected solutions.
|
static void |
assertSameSolutionsAnyOrder(IBindingSet[] expected,
ICloseableIterator<IBindingSet[]> itr,
Future<?> future) |
static void |
assertSameSolutionsAnyOrder(IBindingSet[] expected,
IRunningQuery runningQuery)
Verifies that the iterator visits the specified objects in some arbitrary
ordering and that the iterator is exhausted once all expected objects
have been visited.
|
static void |
assertSameSolutionsAnyOrder(String msg,
IBindingSet[] expected,
ICloseableIterator<IBindingSet[]> itr,
Future<?> runningQuery) |
static void |
assertSameSolutionsAnyOrder(String msg,
IBindingSet[] expected,
IRunningQuery runningQuery)
Verifies that the iterator visits the specified objects in some arbitrary
ordering and that the iterator is exhausted once all expected objects
have been visited.
|
static <T> void |
assertSameSolutionsAnyOrder(String msg,
T[] expected,
Iterator<T> actual)
Deprecated.
by the version which passes the
IRunningQuery |
static <T> void |
assertSameSolutionsAnyOrder(T[] expected,
Iterator<T> actual)
Deprecated.
by the version which passes the
IRunningQuery |
static void |
compareGraphs(String name,
Set<org.openrdf.model.Statement> queryResult,
Set<org.openrdf.model.Statement> expectedResult)
Compare the expected and actual query results for a graph query.
|
static void |
compareTupleQueryResults(String name,
String testURI,
AbstractTripleStore store,
ASTContainer astContainer,
org.openrdf.query.TupleQueryResult queryResult,
org.openrdf.query.TupleQueryResult expectedResult,
boolean laxCardinality,
boolean checkOrder)
Utility method compares expected and actual solutions and reports on any
discrepancies.
|
static void |
diff(BOp o1,
BOp o2)
Throw an exception for the first operator having a ground difference
(different Class, different arity, or different annotation).
|
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, getProperties, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logProperties
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
public AbstractQueryEngineTestCase()
public AbstractQueryEngineTestCase(String name)
public static void assertSameSolutions(IBindingSet[] expected, IAsynchronousIterator<IBindingSet[]> itr)
#assertSameSolutions(Future, IBindingSet[], IAsynchronousIterator)
expected
- itr
- public static void assertSameSolutions(IBindingSet[] expected, IRunningQuery runningQuery)
expected
- The expected solutions.runningQuery
- The running query whose solutions will be verified.public static void assertSameSolutions(IBindingSet[] expected, ICloseableIterator<IBindingSet[]> itr, Future<Void> ft)
expected
- The expected solutions.itr
- The iterator draining the query.ft
- The future of the query.public static <T> void assertSameSolutionsAnyOrder(T[] expected, Iterator<T> actual)
IRunningQuery
Note: If the objects being visited do not correctly implement hashCode() and equals() then this can fail even if the desired objects would be visited. When this happens, fix the implementation classes.
public static <T> void assertSameSolutionsAnyOrder(String msg, T[] expected, Iterator<T> actual)
IRunningQuery
Note: If the objects being visited do not correctly implement hashCode() and equals() then this can fail even if the desired objects would be visited. When this happens, fix the implementation classes.
public static void assertSameSolutionsAnyOrder(IBindingSet[] expected, IRunningQuery runningQuery)
Note: If the objects being visited do not correctly implement hashCode() and equals() then this can fail even if the desired objects would be visited. When this happens, fix the implementation classes.
public static void assertSameSolutionsAnyOrder(String msg, IBindingSet[] expected, IRunningQuery runningQuery)
Note: If the objects being visited do not correctly implement hashCode() and equals() then this can fail even if the desired objects would be visited. When this happens, fix the implementation classes.
public static void assertSameSolutionsAnyOrder(IBindingSet[] expected, ICloseableIterator<IBindingSet[]> itr, Future<?> future)
public static void assertSameSolutionsAnyOrder(String msg, IBindingSet[] expected, ICloseableIterator<IBindingSet[]> itr, Future<?> runningQuery)
public static void diff(BOp o1, BOp o2)
sb
- o1
- o2
- public static void compareTupleQueryResults(String name, String testURI, AbstractTripleStore store, ASTContainer astContainer, org.openrdf.query.TupleQueryResult queryResult, org.openrdf.query.TupleQueryResult expectedResult, boolean laxCardinality, boolean checkOrder) throws org.openrdf.query.QueryEvaluationException
name
- The name of the test.testURI
- The URI for the test.store
- The AbstractTripleStore
(optional).astContainer
- The ASTContainer
(optional).queryResult
- The actual result.expectedResult
- The expected result.laxCardinality
- When true
, strict cardinality will be enforced.checkOrder
- When true
, the order must be the same.junit.framework.AssertionFailedError
- if the results are not the same.org.openrdf.query.QueryEvaluationException
public static void compareGraphs(String name, Set<org.openrdf.model.Statement> queryResult, Set<org.openrdf.model.Statement> expectedResult)
name
- The name of the test.queryResult
- The actual result.expectedResult
- The expected result.junit.framework.AssertionFailedError
- if the results are not the same.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.