laser.alphabet.labelpattern.test
Class IndexedLabelPatternTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by laser.alphabet.labelpattern.test.AbstractIndexedLabelPatternTest
              extended by laser.alphabet.labelpattern.test.IndexedLabelPatternTest
All Implemented Interfaces:
junit.framework.Test

public class IndexedLabelPatternTest
extends AbstractIndexedLabelPatternTest

The IndexedLabelPatternTest class provides testing for the IndexedLabelPattern class.

Author:
Nathan A. Jokel (laser-software@cs.umass.edu)
See Also:
IndexedLabelPattern

Field Summary
 
Fields inherited from class laser.alphabet.labelpattern.test.AbstractIndexedLabelPatternTest
factory, probe
 
Constructor Summary
IndexedLabelPatternTest()
           
 
Method Summary
protected  void setUp()
          Initializes the fields for each test.
 void testIndexedLabelPatternClone()
          Tests the IndexedLabelPattern.clone() method.
 void testIndexedLabelPatternCompareTo()
          Tests the IndexedLabelPattern.compareTo() method.
 void testIndexedLabelPatternEquals()
          Tests the IndexedLabelPattern.equals() method.
 void testIndexedLabelPatternGetMatchingLabels()
          Tests the IndexedLabelPattern.getMatchingLabels() method.
 void testIndexedLabelPatternHashCode()
          Tests the IndexedLabelPattern.hashCode() method.
 void testIndexedLabelPatternToString()
          Tests the IndexedLabelPattern.toString() method.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexedLabelPatternTest

public IndexedLabelPatternTest()
Method Detail

setUp

protected void setUp()
Initializes the fields for each test.

Overrides:
setUp in class AbstractIndexedLabelPatternTest

testIndexedLabelPatternClone

public void testIndexedLabelPatternClone()
Tests the IndexedLabelPattern.clone() method.

This test relies on the fact that the IndexedLabelPatternFactory.createLabelPatternInterface(), IndexedLabelPattern.equals(), and IndexedLabelPattern.toString() methods work properly.


testIndexedLabelPatternCompareTo

public void testIndexedLabelPatternCompareTo()
Tests the IndexedLabelPattern.compareTo() method.

Try null input, preceeding IndexedLabelPattern input, equal in order IndexedLabelPattern input, and following IndexedLabelPattern input.

This test relies on the fact that the IndexedLabelPatternFactory.createLabelPatternInterface() method works properly.


testIndexedLabelPatternEquals

public void testIndexedLabelPatternEquals()
Tests the IndexedLabelPattern.equals() method.

Try null input, non-IndexedLabelPattern input, equal IndexedLabelPattern input and unequal LabelPatternInterface input.

This test relies on the fact that the IndexedLabelPatternFactory.createLabelPatternInterface() method works properly.

Note that the failure of this test invalidates the results of other tests.


testIndexedLabelPatternGetMatchingLabels

public void testIndexedLabelPatternGetMatchingLabels()
Tests the IndexedLabelPattern.getMatchingLabels() method.

Try null input, IndexedAlphabet input with no labels specified by the LabelPattern, IndexedAlphabet input with some labels specified by the LabelPattern and some not so specified, and IndexedAlphabet input with only labels specified by the LabelPattern.

This test relies on the fact that the IndexedLabelPatternFactory.createLabelPatternInterface(), IndexedAlphabetFactory.createAlphabetInterface(), and IndexedAlphabetFactory.createLabelInterface() methods work properly.


testIndexedLabelPatternHashCode

public void testIndexedLabelPatternHashCode()
Tests the IndexedLabelPattern.hashCode() method.

This test relies on the fact that the IndexedLabelPatternFactory.createLabelPatternInterface() method works properly.


testIndexedLabelPatternToString

public void testIndexedLabelPatternToString()
Tests the IndexedLabelPattern.toString() method.

This test relies on the fact that the IndexedLabelPatternFactory.createLabelPatternInterface() method works properly.

Note that the failure of this test invalidates the results of other tests.