laser.alphabet.labelpattern.test
Class IndexedClassSetLabelPatternTest

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.IndexedClassSetLabelPatternTest
All Implemented Interfaces:
junit.framework.Test

public class IndexedClassSetLabelPatternTest
extends AbstractIndexedLabelPatternTest

The IndexedClassSetLabelPatternTest class provides testing for the ClassSetLabelPattern class.

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

Field Summary
 
Fields inherited from class laser.alphabet.labelpattern.test.AbstractIndexedLabelPatternTest
factory, probe
 
Constructor Summary
IndexedClassSetLabelPatternTest()
           
 
Method Summary
protected  void setUp()
          Initializes the fields for each test.
 void testIndexedClassSetLabelPatternAddIncludedLabel()
          Tests the ClassSetLabelPattern.addIncludedLabel() method.
 void testIndexedClassSetLabelPatternAddIncludedLabelPattern()
          Tests the ClassSetLabelPattern.addIncludedLabelPattern() method.
 void testIndexedClassSetLabelPatternAddIncludedLabelPatterns()
          Tests the ClassSetLabelPattern.addIncludedLabelPatterns() method.
 void testIndexedClassSetLabelPatternAddIncludedLabels()
          Tests the ClassSetLabelPattern.addIncludedLabels() method.
 void testIndexedClassSetLabelPatternClone()
          Tests the ClassSetLabelPattern.clone() method.
 void testIndexedClassSetLabelPatternCompareTo()
          Tests the ClassSetLabelPattern.compareTo() method.
 void testIndexedClassSetLabelPatternEquals()
          Tests the ClassSetLabelPattern.equals() method.
 void testIndexedClassSetLabelPatternGetIncludedLabelPatterns()
          Test the ClassSetLabelPattern.getIncludedLabelPatterns() method.
 void testIndexedClassSetLabelPatternGetIncludedLabels()
          Test the ClassSetLabelPattern.getIncludedLabels() method.
 void testIndexedClassSetLabelPatternGetMatchingLabels()
          Tests the ClassSetLabelPattern.getMatchingLabels() method.
 void testIndexedClassSetLabelPatternHashCode()
          Tests the ClassSetLabelPattern.hashCode() method.
 void testIndexedClassSetLabelPatternRemoveIncludedLabel()
          Tests the ClassSetLabelPattern.removeIncludedLabel() method.
 void testIndexedClassSetLabelPatternRemoveIncludedLabelPattern()
          Tests the ClassSetLabelPattern.removeIncludedLabelPattern() method.
 void testIndexedClassSetLabelPatternRemoveIncludedLabelPatterns()
          Tests the ClassSetLabelPattern.removeIncludedLabelPatterns() method.
 void testIndexedClassSetLabelPatternRemoveIncludedLabels()
          Tests the ClassSetLabelPattern.removeIncludedLabels() method.
 void testIndexedClassSetLabelPatternToString()
          Tests the ClassSetLabelPattern.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

IndexedClassSetLabelPatternTest

public IndexedClassSetLabelPatternTest()
Method Detail

setUp

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

Overrides:
setUp in class AbstractIndexedLabelPatternTest

testIndexedClassSetLabelPatternClone

public void testIndexedClassSetLabelPatternClone()
Tests the ClassSetLabelPattern.clone() method.

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


testIndexedClassSetLabelPatternCompareTo

public void testIndexedClassSetLabelPatternCompareTo()
Tests the ClassSetLabelPattern.compareTo() method.

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

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


testIndexedClassSetLabelPatternEquals

public void testIndexedClassSetLabelPatternEquals()
Tests the ClassSetLabelPattern.equals() method.

Try null input, non-ClassSetLabelPattern input, equal ClassSetLabelPattern 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.


testIndexedClassSetLabelPatternGetMatchingLabels

public void testIndexedClassSetLabelPatternGetMatchingLabels()
Tests the ClassSetLabelPattern.getMatchingLabels() method.

Try null input and IndexedAlphabet input to a variety of ClassSetLabelPatterns.

This test relies on the fact that the IndexedLabelPatternFactory.createLabelPatternInterface(), IndexedLabelPatternFactory.createClassSetLabelPatternInterface(), ClassSetLabelPattern.addIncludedLabelPattern(), ClassSetLabelPattern.toString(), and IndexedAlphabetFactory.createAlphabetInterface() methods work properly.


testIndexedClassSetLabelPatternHashCode

public void testIndexedClassSetLabelPatternHashCode()
Tests the ClassSetLabelPattern.hashCode() method.

This test relies on the fact that the IndexedLabelPatternFactory.createLabelPatternInterface(), ClassSetLabelPattern.getIncludedLabels(), and ClassSetLabelPattern.getIncludedLabelPatterns() methods work properly.


testIndexedClassSetLabelPatternToString

public void testIndexedClassSetLabelPatternToString()
Tests the ClassSetLabelPattern.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.


testIndexedClassSetLabelPatternAddIncludedLabel

public void testIndexedClassSetLabelPatternAddIncludedLabel()
Tests the ClassSetLabelPattern.addIncludedLabel() method.

Try null input, IndexedLabel input to an empty LabelPattern, IndexedLabel input that has been previously specified, and IndexedLabel input that has not been previously specified to a non-empty LabelPattern.

This test relies on the fact that the IndexedLabelPatternFactory.createClassSetLabelPatternInterface(), IndexedAlphabetFactory.createLabelInterface(), and ClassSetLabelPattern.getIncludedLabels methods work properly.

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


testIndexedClassSetLabelPatternAddIncludedLabels

public void testIndexedClassSetLabelPatternAddIncludedLabels()
Tests the ClassSetLabelPattern.addIncludedLabels() method.

Try null input, Set input to an empty LabelPattern, a Set containing only Labels that have been previously specified as input, a Set containing some Labels that have been previously specified and some that have not been so specified as input, and a Set containing multiple Labels that have already been specified as input.

This test relies on the fact that the IndexedLabelPatternFactory.createClassSetLabelPatternInterface(), IndexedAlphabetFactory.createLabelInterface(), and ClassSetLabelPattern.getIncludedLabels methods work properly.


testIndexedClassSetLabelPatternAddIncludedLabelPattern

public void testIndexedClassSetLabelPatternAddIncludedLabelPattern()
Tests the ClassSetLabelPattern.addIncludedLabelPattern() method.

Try null input, ClassSetLabelPatternInterface input, NotClassSetLabelPatternInterface input, IndexedLabelPattern input to an empty LabelPattern, IndexedLabelPattern input that has been previously specified, and IndexedLabelPattern input that has not been previously specified to a non-empty LabelPattern.

This test relies on the fact that the IndexedAlphabetFactory.createLabelPatternInterface(), IndexedAlphabetFactory.createClassSetLabelPatternInterface(), IndexedAlphabetFactory.createNotClassSetLabelPatternInterface(), and ClassSetLabelPattern.getIncludedLabelPatterns() methods work properly.

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


testIndexedClassSetLabelPatternAddIncludedLabelPatterns

public void testIndexedClassSetLabelPatternAddIncludedLabelPatterns()
Tests the ClassSetLabelPattern.addIncludedLabelPatterns() method.

Try null input, a Set containing a ClassSetLabelPatternInterface, a Set containing a NotClassSetLabelPatternInterface, Set> input to an empty LabelPattern, a Set> containing only LabelPatterns that have been previously specified as input, a Set> containing some LabelPatterns that have been previously specified and some that have not been so specified as input, and a Set> containing multiple LabelPatterns that have already been specified as input.

This test relies on the fact that the IndexedLabelPatternFactory.createClassSetLabelPatternInterface(), IndexedLabelPatternFactory.createNotClassSetLabelPatternInterface(), IndexedLabelPatternFactory.createLabelPatternInterface(), ClassSetLabelPattern.getIncludedLabels methods work properly.


testIndexedClassSetLabelPatternGetIncludedLabels

public void testIndexedClassSetLabelPatternGetIncludedLabels()
Test the ClassSetLabelPattern.getIncludedLabels() method.

Try an empty LabelPattern, a LabelPattern with a single Label, a LabelPattern with multiple Labels, and a LabelPattern with multiple Labels and a LabelPattern.

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

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


testIndexedClassSetLabelPatternGetIncludedLabelPatterns

public void testIndexedClassSetLabelPatternGetIncludedLabelPatterns()
Test the ClassSetLabelPattern.getIncludedLabelPatterns() method.

Try an empty LabelPattern, a LabelPattern with a single LabelPattern, a LabelPattern with multiple LabelPatterns, and a LabelPattern with multiple LabelPatterns and a Label.

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.


testIndexedClassSetLabelPatternRemoveIncludedLabel

public void testIndexedClassSetLabelPatternRemoveIncludedLabel()
Tests the ClassSetLabelPattern.removeIncludedLabel() method.

Try null input, IndexedLabel input with an empty LabelPattern, an IndexedLabel that has not been specified as input with a non-empty LabelPattern, and an IndexedLabel that has been specified as input with a non-empty LabelPattern.

This test relies on the fact that the IndexedLabelPatternFactory.createLabelPatternInterface() and ClassSetLabelPattern.getIncludedLabels() methods work properly.


testIndexedClassSetLabelPatternRemoveIncludedLabelPattern

public void testIndexedClassSetLabelPatternRemoveIncludedLabelPattern()
Tests the ClassSetLabelPattern.removeIncludedLabelPattern() method.

Try null input, ClassSetLabelPatternInterface input, NotClassSetLabelPatternInterface input, LabelPatternInterface input with an empty LabelPattern, a LabelPatternInterface that has not been specified as input with a non-empty LabelPattern, and a LabelPatternInterface that has been specified as input with a non-empty LabelPattern.

This test relies on the fact that the IndexedLabelPatternFactory.createLabelPatternInterface(), IndexedLabelPatternFactory.createClassSetLabelPatternInterface(), IndexedLabelPatternFactory.createNotClassSetLabelPatternInterface(), and ClassSetLabelPattern.getIncludedLabelPatterns() methods work properly.


testIndexedClassSetLabelPatternRemoveIncludedLabels

public void testIndexedClassSetLabelPatternRemoveIncludedLabels()
Tests the ClassSetLabelPattern.removeIncludedLabels() method.

Try null input, Set input to an empty LabelPattern, a Set containing only Labels that have been previously specified as input, a Set containing some Labels that have been previously specified and some that have not been so specified as input, a Set containing multiple Labels that have already been specified as input, and a non-empty Set that leaves a non-empty LabelPattern.

This test relies on the fact that the IndexedLabelPatternFactory.createClassSetLabelPatternInterface(), IndexedAlphabetFactory.createLabelInterface(), and ClassSetLabelPattern.getIncludedLabels methods work properly.


testIndexedClassSetLabelPatternRemoveIncludedLabelPatterns

public void testIndexedClassSetLabelPatternRemoveIncludedLabelPatterns()
Tests the ClassSetLabelPattern.removeIncludedLabelPatterns() method.

Try null input, a Set containing a ClassSetLabelPatternInterface, a Set containing a NotClassSetLabelPatternInterface, Set> input to an empty LabelPattern, a Set> containing only LabelPatterns that have been previously specified as input, a Set> containing some LabelPatterns that have been previously specified and some that have not been so specified as input, a Set> containing multiple LabelPatterns that have already been specified as input, and a non-empty Set that leaves a non-empty LabelPattern.

This test relies on the fact that the IndexedLabelPatternFactory.createClassSetLabelPatternInterface(), IndexedLabelPatternFactory.createNotClassSetLabelPatternInterface(), IndexedLabelPatternFactory.createLabelPatternInterface(), ClassSetLabelPattern.getIncludedLabels methods work properly.