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

## lp.parse
Class EvolpParserTest

    java.lang.Object
      junit.framework.Assert
          junit.framework.TestCase
              lp.parse.LpParserTest
                  lp.parse.EvolpParserTest

All Implemented Interfaces:
  Test

    public class EvolpParserTest

extends LpParserTest

Contains tests of the `EvolpParser` class.

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

Field Summary
`private LpRule` | `evolpRule` A container for the rule constructed by `LpParserTest.getRule2()`.

Fields inherited from class lp.parse.LpParserTest
`parser, printer`

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

Method Summary
`protected LpRule` | `getEvolpRule()` Returns a rule corresponding to the string "human(X) :- lives(X), not colour(green, X), not assert(dead(X) <-)."
`void` | `testEvolpRule()` Tests the EVOLP parser on an input containing the rule returned by `getEvolpRule()`.
`void` | `testEvolpRulesFromFile()` Parses EVOLP rules from a file and checks that they are what they should be (through the `LpAbstractStructureUnit.toString()` method)
`void` | `testParseEvolp()` Tests the `EvolpParser.parseEvolp()` method.

Methods inherited from class lp.parse.LpParserTest
`doRulesFromFileTest, getRule1, getRule2, testBothRules, testExceptions, testInvalidRule, testNormalRule, testPropositionalRule, testRulesFromFile, testSetInputExceptions`

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

### evolpRule

    private LpRule evolpRule

  A container for the rule constructed by `LpParserTest.getRule2()`.

Constructor Detail

### EvolpParserTest

    public EvolpParserTest(String testName)

  A default test case constructor.

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

Method Detail

### getEvolpRule

    protected LpRule getEvolpRule()

  Returns a rule corresponding to the string

      "human(X) :- lives(X), not colour(green, X), not assert(dead(X) <-)."

### testEvolpRule

    public void testEvolpRule()

  Tests the EVOLP parser on an input containing the rule returned by `getEvolpRule()`.

  Throws:
    `IOException` - (wrapped in an `ExceptionAdapter`) if an I/O exception occurs while parsing the input (should never happen)
    `if` - a LpParserException is thrown while parsing the input (should never happen)

### testEvolpRulesFromFile

    public void testEvolpRulesFromFile()
                                throws IOException

  Parses EVOLP rules from a file and checks that they are what they should be (through the `LpAbstractStructureUnit.toString()` method)

  Throws:
    `IOException` - (wrapped in an `ExceptionAdapter`) if an I/O exception occurs while parsing the input (should never happen)
    `if` - a LpParserException is thrown while parsing the input (should never happen)

### testParseEvolp

    public void testParseEvolp()

  Tests the `EvolpParser.parseEvolp()` method.

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