lp.trans
Class DlpSolverTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by lp.trans.DlpSolverTest
All Implemented Interfaces:
Test

public class DlpSolverTest
extends TestCase

Contains tests of the DlpSolver class.

Version:
1.0.0
Author:
Martin Slota
See Also:
DlpSolver

Field Summary
private  DlpGrounder grounder
          The grounder used in the tests.
private  LpParser parser
          The parser used in the tests.
private  CollectingModelConsumer processor
          Object for collecting the computed models.
private  DlpSolver solver
          The instance of DlpSolver that is being tested.
private  DlpTransformer transformer
          The transformer used in the tests.
 
Constructor Summary
DlpSolverTest(String testName)
          A default test case constructor.
 
Method Summary
private  void doTest(String[] dlpSource, Set<String> expModelSources)
          Performs a single call of solver.solve(dlp); where dlp is the dynamic logic program obtained by parsing dlpSource.
 void testOrdinaryInput()
           
 
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

parser

private final LpParser parser
The parser used in the tests.


grounder

private final DlpGrounder grounder
The grounder used in the tests.


transformer

private final DlpTransformer transformer
The transformer used in the tests.


solver

private final DlpSolver solver
The instance of DlpSolver that is being tested.


processor

private final CollectingModelConsumer processor
Object for collecting the computed models.

Constructor Detail

DlpSolverTest

public DlpSolverTest(String testName)
A default test case constructor.

Parameters:
testName - the name of the test case
Method Detail

testOrdinaryInput

public void testOrdinaryInput()

doTest

private void doTest(String[] dlpSource,
                    Set<String> expModelSources)
Performs a single call of
solver.solve(dlp);
where dlp is the dynamic logic program obtained by parsing dlpSource. Then it tests if the expected set of models is computed.

Parameters:
dlpSource - the string with the input dynamic logic program
expModelSources - string representations of the expected models