| test.org.mandarax.lib.math.MathTestCase
All known Subclasses: test.org.mandarax.lib.math.IntArithmeticTest, test.org.mandarax.lib.math.DoubleArithmeticTest,
MathTestCase | abstract public class MathTestCase extends junit.framework.TestCase (Code) | | Superclass for testing predicates and functions from the math package.
All tests work as follows: we build an auto fact set, fetch an iterator and
count the facts generated. The number of facts is compared with the expected number of facts.
Facts are printed out on System.out.
author: Jens Dietrich version: 3.4 <7 March 05> since: 1.6 |
MathTestCase | public MathTestCase()(Code) | | Constructor.
|
buildComplexTerm | protected ComplexTerm buildComplexTerm(Function f, Object obj)(Code) | | Convenient method to build a complex term from a function f and one term.
The method toTerm is used to interprete objects as terms.
a complex term Parameters: f - a function Parameters: obj - an object defining a term |
buildComplexTerm | protected ComplexTerm buildComplexTerm(Function f, Object obj1, Object obj2)(Code) | | Convenient method to build a complex term from a function f and two terms.
The method toTerm is used to interprete objects as terms.
a complex term Parameters: f - a function Parameters: obj1 - an object defining a term Parameters: obj2 - an object defining a term |
buildFact | protected Fact buildFact(Predicate p, Object obj)(Code) | | Convenient method to build a fact from a predicate p and one term.
The method toTerm is used to interprete objects as terms.
a fact Parameters: p - a predicate Parameters: obj - an object defining a term |
buildFact | protected Fact buildFact(Predicate p, Object obj1, Object obj2)(Code) | | Convenient method to build a fact from a predicate p and two terms.
The method toTerm is used to interprete objects as terms.
a fact Parameters: p - a predicate Parameters: obj1 - an object defining a term Parameters: obj2 - an object defining a term |
buildFact | protected Fact buildFact(Predicate p, Object obj1, Object obj2, Object obj3)(Code) | | Convenient method to build a fact from a predicate p and three terms.
The method toTerm is used to interprete objects as terms.
a fact Parameters: p - a predicate Parameters: obj1 - an object defining a term Parameters: obj2 - an object defining a term Parameters: obj3 - an object defining a term |
getAutoFacts | abstract protected AutoFacts getAutoFacts()(Code) | | Get the auto facts.
an auto facts clause set |
getExpected | abstract protected int getExpected()(Code) | | Get the expected number of generated facts.
the number of facts expected |
getQueryFact | abstract protected Fact getQueryFact()(Code) | | Get the query fact.
a query fact. |
getType | abstract protected Class getType()(Code) | | Get the type (e.g. Integer.class or Double.class) we want to test.
the type to be tested |
test | public void test()(Code) | | Perform the test.
|
|
|