Test case that can be used to validate a knowledge base.
Modelled after JUnit test cases, although this interface does not depend on JUnit.
A reference implementation based on JUnit is provided as well.
The test case can validate the following:
whether a ground query yields true or false
the expected variable replacements in a query containing variables
the number of expected results
author: Jens Dietrich version: 3.4 <7 March 05> since: 3.4
setExpectedReplacements(java.util.Map[] expectedReplacements) Set an array of maps containing variable term -> constant term mapping expected in the result
at this position.
Get an array of maps containing variable term -> constant term mapping expected in the result
at this position.
Can be null indicating that this condition will not be checked in this test case.
Returns the expectedReplacements.
Set the assumptions.
Parameters: assumptions - The assumptions to set.
setExpectedNumberOfResults
public void setExpectedNumberOfResults(int expectedNumberOfResults)(Code)
Parameters: expectedNumberOfResults - The expectedNumberOfResults to set.
setExpectedReplacements
public void setExpectedReplacements(java.util.Map[] expectedReplacements)(Code)
Set an array of maps containing variable term -> constant term mapping expected in the result
at this position.
Can be null indicating that this condition will not be checked in this test case.
Parameters: expectedReplacements - The expectedReplacements to set.