laser.alphabet.labelpattern.test
Class StringClassSetLabelPatternTest

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

public class StringClassSetLabelPatternTest
extends AbstractStringLabelPatternTest

The StringClassSetLabelPatternTest 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.AbstractStringLabelPatternTest
factory, probe
 
Constructor Summary
StringClassSetLabelPatternTest()
           
 
Method Summary
protected  void setUp()
          Initializes the fields for each test.
 void testStringClassSetLabelPatternAddIncludedLabel()
          Tests the ClassSetLabelPattern.addIncludedLabel() method.
 void testStringClassSetLabelPatternAddIncludedLabelPattern()
          Tests the ClassSetLabelPattern.addIncludedLabelPattern() method.
 void testStringClassSetLabelPatternAddIncludedLabelPatterns()
          Tests the ClassSetLabelPattern.addIncludedLabelPatterns() method.
 void testStringClassSetLabelPatternAddIncludedLabels()
          Tests the ClassSetLabelPattern.addIncludedLabels() method.
 void testStringClassSetLabelPatternClone()
          Tests the ClassSetLabelPattern.clone() method.
 void testStringClassSetLabelPatternCompareTo()
          Tests the ClassSetLabelPattern.compareTo() method.
 void testStringClassSetLabelPatternEquals()
          Tests the ClassSetLabelPattern.equals() method.
 void testStringClassSetLabelPatternGetIncludedLabelPatterns()
          Test the ClassSetLabelPattern.getIncludedLabelPatterns() method.
 void testStringClassSetLabelPatternGetIncludedLabels()
          Test the ClassSetLabelPattern.getIncludedLabels() method.
 void testStringClassSetLabelPatternGetMatchingLabels()
          Tests the ClassSetLabelPattern.getMatchingLabels() method.
 void testStringClassSetLabelPatternHashCode()
          Tests the ClassSetLabelPattern.hashCode() method.
 void testStringClassSetLabelPatternRemoveIncludedLabel()
          Tests the ClassSetLabelPattern.removeIncludedLabel() method.
 void testStringClassSetLabelPatternRemoveIncludedLabels()
          Tests the ClassSetLabelPattern.removeIncludedLabels() method.
 void testStringClassSetLabelPatternToString()
          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

StringClassSetLabelPatternTest

public StringClassSetLabelPatternTest()
Method Detail

setUp

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

Overrides:
setUp in class AbstractStringLabelPatternTest

testStringClassSetLabelPatternClone

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

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


testStringClassSetLabelPatternCompareTo

public void testStringClassSetLabelPatternCompareTo()
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 StringLabelPatternFactory.createLabelPatternInterface() method works properly.


testStringClassSetLabelPatternEquals

public void testStringClassSetLabelPatternEquals()
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 StringLabelPatternFactory.createLabelPatternInterface() method works properly.

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


testStringClassSetLabelPatternGetMatchingLabels

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

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

This test relies on the fact that the StringLabelPatternFactory.createClassSetLabelPatternInterface(), ClassSetLabelPattern.toString(), StringAlphabetFactory.createLabelInterface() and StringAlphabetFactory.createAlphabetInterface() methods work properly.


testStringClassSetLabelPatternHashCode

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

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


testStringClassSetLabelPatternToString

public void testStringClassSetLabelPatternToString()
Tests the ClassSetLabelPattern.toString() method.

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

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


testStringClassSetLabelPatternAddIncludedLabel

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

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

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

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


testStringClassSetLabelPatternAddIncludedLabels

public void testStringClassSetLabelPatternAddIncludedLabels()
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 StringLabelPatternFactory.createClassSetLabelPatternInterface(), StringAlphabetFactory.createLabelInterface(), and ClassSetLabelPattern.getIncludedLabels methods work properly.


testStringClassSetLabelPatternAddIncludedLabelPattern

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

Try null input, ClassSetLabelPatternInterface input, and NotClassSetLabelPatternInterface input.

This test relies on the fact that the StringAlphabetFactory.createClassSetLabelPatternInterface() and StringAlphabetFactory.createNotClassSetLabelPatternInterface() methods work properly.

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


testStringClassSetLabelPatternAddIncludedLabelPatterns

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

Try null input, a Set containing a ClassSetLabelPatternInterface, and a Set containing a NotClassSetLabelPatternInterface.

This test relies on the fact that the StringLabelPatternFactory.createClassSetLabelPatternInterface() and StringLabelPatternFactory.createNotClassSetLabelPatternInterface() methods work properly.


testStringClassSetLabelPatternGetIncludedLabels

public void testStringClassSetLabelPatternGetIncludedLabels()
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 StringLabelPatternFactory.createLabelPatternInterface() and StringAlphabetFactory.createLabelInterface() methods work properly.

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


testStringClassSetLabelPatternGetIncludedLabelPatterns

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

Try an empty LabelPattern.

This test relies on the fact that the StringLabelPatternFactory.createClassSetLabelPatternInterface() method works properly.

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


testStringClassSetLabelPatternRemoveIncludedLabel

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

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

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


testStringClassSetLabelPatternRemoveIncludedLabels

public void testStringClassSetLabelPatternRemoveIncludedLabels()
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 StringLabelPatternFactory.createClassSetLabelPatternInterface(), StringAlphabetFactory.createLabelInterface(), and ClassSetLabelPattern.getIncludedLabels methods work properly.