lp.struct
Class LpFunctionTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by lp.struct.LpStructureUnitTestUtils
              extended by lp.struct.LpFunctionTest
All Implemented Interfaces:
Test

public class LpFunctionTest
extends LpStructureUnitTestUtils

Contains tests of the LpFunction class.

Version:
1.0.0
Author:
Martin Slota
See Also:
LpFunction

Constructor Summary
LpFunctionTest(String testName)
          A default test case constructor.
 
Method Summary
 void testConstructorExceptions()
          Tests if the constructor throws the appropriate exceptions.
private  void testEquals(LpFunction f1, LpFunction f2)
          Asserts that the given function symbols are equal and that their hash codes are equal.
 void testEqualsAndHashCode()
          Tests the LpFunction.equals(Object) and LpFunction.hashCode() methods.
 void testGetArity()
          Test of LpFunction.getArity() method.
private  void testNotEquals(LpFunction f1, LpFunction f2)
          Asserts that the given function symbols are not equal.
 void testToString()
          Tests the LpFunction.toString() method.
 
Methods inherited from class lp.struct.LpStructureUnitTestUtils
testToString
 
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
 

Constructor Detail

LpFunctionTest

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

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

testConstructorExceptions

public void testConstructorExceptions()
Tests if the constructor throws the appropriate exceptions.


testGetArity

public void testGetArity()
Test of LpFunction.getArity() method.


testEqualsAndHashCode

public void testEqualsAndHashCode()
Tests the LpFunction.equals(Object) and LpFunction.hashCode() methods.


testEquals

private void testEquals(LpFunction f1,
                        LpFunction f2)
Asserts that the given function symbols are equal and that their hash codes are equal.

Parameters:
f1 - first tested literal
f2 - second tested literal

testNotEquals

private void testNotEquals(LpFunction f1,
                           LpFunction f2)
Asserts that the given function symbols are not equal.

Parameters:
f1 - first tested literal
f2 - second tested literal

testToString

public void testToString()
Tests the LpFunction.toString() method.