Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## lp.struct.util
Class LpGroundDeciderTest

    java.lang.Object
      junit.framework.Assert
          junit.framework.TestCase
              lp.struct.util.LpGroundDeciderTest

All Implemented Interfaces:
  Test

    public class LpGroundDeciderTest

extends TestCase

Contains tests of the `LpGroundDecider` class.

Version:
  1.0.0
Author:
  Martin Slota
See Also:
  `LpGroundDecider`

Field Summary
`private LpGroundDecider` | `gd`

Constructor Summary
`LpGroundDeciderTest(String testName)` A default test case constructor.

Method Summary
`private void` | `doTest(boolean expected, LpStructureUnit unit)` Tests the `LpGroundDecider.isGround(LpStructureUnit)` when called with `unit` as input.
`void` | `testIsGroundCompoundTerm()` Tests passing `LpCompoundTerm` instances to the `LpGroundDecider.isGround(LpStructureUnit)` method.
`void` | `testIsGroundConstant()` Tests passing a `LpConstant` instance to the `LpGroundDecider.isGround(LpStructureUnit)` method.
`void` | `testIsGroundFunction()` Tests passing a `LpFunction` instance to the `LpGroundDecider.isGround(LpStructureUnit)` method.
`void` | `testIsGroundLiteral()` Tests passing `LpLiteral` instances to the `LpGroundDecider.isGround(LpStructureUnit)` method.
`void` | `testIsGroundNull()` Tests passing `null` to the `LpGroundDecider.isGround(LpStructureUnit)` method.
`void` | `testIsGroundPredicate()` Tests passing a `LpPredicate` instance to the `LpGroundDecider.isGround(LpStructureUnit)` method.
`void` | `testIsGroundRule()` Tests passing `LpRule` instances to the `LpGroundDecider.isGround(LpStructureUnit)` method.
`void` | `testIsGroundVariable()` Tests passing a `LpVariable` instance to the `LpGroundDecider.isGround(LpStructureUnit)` method.

Methods inherited from class junit.framework.TestCase
`countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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`

Field Detail

### gd

    private final LpGroundDecider gd

Constructor Detail

### LpGroundDeciderTest

    public LpGroundDeciderTest(String testName)

  A default test case constructor.

  Parameters:
    `testName` - the name of the test case

Method Detail

### testIsGroundNull

    public void testIsGroundNull()

  Tests passing `null` to the `LpGroundDecider.isGround(LpStructureUnit)` method.

### testIsGroundConstant

    public void testIsGroundConstant()

  Tests passing a `LpConstant` instance to the `LpGroundDecider.isGround(LpStructureUnit)` method.

### testIsGroundVariable

    public void testIsGroundVariable()

  Tests passing a `LpVariable` instance to the `LpGroundDecider.isGround(LpStructureUnit)` method.

### testIsGroundFunction

    public void testIsGroundFunction()

  Tests passing a `LpFunction` instance to the `LpGroundDecider.isGround(LpStructureUnit)` method.

### testIsGroundCompoundTerm

    public void testIsGroundCompoundTerm()

  Tests passing `LpCompoundTerm` instances to the `LpGroundDecider.isGround(LpStructureUnit)` method.

### testIsGroundPredicate

    public void testIsGroundPredicate()

  Tests passing a `LpPredicate` instance to the `LpGroundDecider.isGround(LpStructureUnit)` method.

### testIsGroundLiteral

    public void testIsGroundLiteral()

  Tests passing `LpLiteral` instances to the `LpGroundDecider.isGround(LpStructureUnit)` method. Uses `LpParser` to simplify the creation process of the complicated `LpLiteral` objects.

### testIsGroundRule

    public void testIsGroundRule()

  Tests passing `LpRule` instances to the `LpGroundDecider.isGround(LpStructureUnit)` method. Uses `LpParser` to simplify the creation process of the complicated `LpRule` objects.

### doTest

    private void doTest(boolean expected,
                        LpStructureUnit unit)

  Tests the `LpGroundDecider.isGround(LpStructureUnit)` when called with `unit` as input.

  Parameters:
    `expected` - the expected boolean—`true` iff `unit` is ground
    `unit` - the tested `LpStructureUnit`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD