laser.alphabet.labelpattern.test
Class StringNotClassSetLabelPatternTest

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

public class StringNotClassSetLabelPatternTest
extends AbstractStringLabelPatternTest

The StringNotClassSetLabelPatternTest class provides testing for the NotClassSetLabelPattern class.

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

Field Summary
 
Fields inherited from class laser.alphabet.labelpattern.test.AbstractStringLabelPatternTest
factory, probe
 
Constructor Summary
StringNotClassSetLabelPatternTest()
           
 
Method Summary
protected  void setUp()
          Initializes the fields for each test.
 void testStringNotClassSetLabelPatternAddExcludedLabel()
          Tests the NotClassSetLabelPattern.addExcludedLabel() method.
 void testStringNotClassSetLabelPatternAddExcludedLabelPattern()
          Tests the NotClassSetLabelPattern.addExcludedLabelPattern() method.
 void testStringNotClassSetLabelPatternAddExcludedLabelPatterns()
          Tests the NotClassSetLabelPattern.addExcludedLabelPatterns() method.
 void testStringNotClassSetLabelPatternAddExcludedLabels()
          Tests the NotClassSetLabelPattern.addExcludedLabels() method.
 void testStringNotClassSetLabelPatternClone()
          Tests the NotClassSetLabelPattern.clone() method.
 void testStringNotClassSetLabelPatternCompareTo()
          Tests the NotClassSetLabelPattern.compareTo() method.
 void testStringNotClassSetLabelPatternEquals()
          Tests the NotClassSetLabelPattern.equals() method.
 void testStringNotClassSetLabelPatternGetExcludedLabelPatterns()
          Test the NotClassSetLabelPattern.getExcludedLabelPatterns() method.
 void testStringNotClassSetLabelPatternGetExcludedLabels()
          Test the NotClassSetLabelPattern.getExcludedLabels() method.
 void testStringNotClassSetLabelPatternGetMatchingLabels()
          Tests the NotClassSetLabelPattern.getMatchingLabels() method.
 void testStringNotClassSetLabelPatternHashCode()
          Tests the NotClassSetLabelPattern.hashCode() method.
 void testStringNotClassSetLabelPatternRemoveExcludedLabel()
          Tests the NotClassSetLabelPattern.removeExcludedLabel() method.
 void testStringNotClassSetLabelPatternRemoveExcludedLabels()
          Tests the NotClassSetLabelPattern.removeExcludedLabels() method.
 void testStringNotClassSetLabelPatternToString()
          Tests the NotClassSetLabelPattern.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

StringNotClassSetLabelPatternTest

public StringNotClassSetLabelPatternTest()
Method Detail

setUp

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

Overrides:
setUp in class AbstractStringLabelPatternTest

testStringNotClassSetLabelPatternClone

public void testStringNotClassSetLabelPatternClone()
Tests the NotClassSetLabelPattern.clone() method.

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


testStringNotClassSetLabelPatternCompareTo

public void testStringNotClassSetLabelPatternCompareTo()
Tests the NotClassSetLabelPattern.compareTo() method.

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

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


testStringNotClassSetLabelPatternEquals

public void testStringNotClassSetLabelPatternEquals()
Tests the NotClassSetLabelPattern.equals() method.

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


testStringNotClassSetLabelPatternGetMatchingLabels

public void testStringNotClassSetLabelPatternGetMatchingLabels()
Tests the NotClassSetLabelPattern.getMatchingLabels() method.

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

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


testStringNotClassSetLabelPatternHashCode

public void testStringNotClassSetLabelPatternHashCode()
Tests the NotClassSetLabelPattern.hashCode() method.

This test relies on the fact that the StringLabelPatternFactory.createLabelPatternInterface(), NotClassSetLabelPattern.getExcludedLabels(), and NotClassSetLabelPattern.getExcludedLabelPatterns() methods work properly.


testStringNotClassSetLabelPatternToString

public void testStringNotClassSetLabelPatternToString()
Tests the NotClassSetLabelPattern.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.


testStringNotClassSetLabelPatternAddExcludedLabel

public void testStringNotClassSetLabelPatternAddExcludedLabel()
Tests the NotClassSetLabelPattern.addExcludedLabel() 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.createNotClassSetLabelPatternInterface(), StringAlphabetFactory.createLabelInterface(), and NotClassSetLabelPattern.getExcludedLabels methods work properly.

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


testStringNotClassSetLabelPatternAddExcludedLabels

public void testStringNotClassSetLabelPatternAddExcludedLabels()
Tests the NotClassSetLabelPattern.addExcludedLabels() 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.createNotClassSetLabelPatternInterface(), StringAlphabetFactory.createLabelInterface(), and NotClassSetLabelPattern.getExcludedLabels methods work properly.


testStringNotClassSetLabelPatternAddExcludedLabelPattern

public void testStringNotClassSetLabelPatternAddExcludedLabelPattern()
Tests the NotClassSetLabelPattern.addExcludedLabelPattern() 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.


testStringNotClassSetLabelPatternAddExcludedLabelPatterns

public void testStringNotClassSetLabelPatternAddExcludedLabelPatterns()
Tests the NotClassSetLabelPattern.addExcludedLabelPatterns() 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.


testStringNotClassSetLabelPatternGetExcludedLabels

public void testStringNotClassSetLabelPatternGetExcludedLabels()
Test the NotClassSetLabelPattern.getExcludedLabels() 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.


testStringNotClassSetLabelPatternGetExcludedLabelPatterns

public void testStringNotClassSetLabelPatternGetExcludedLabelPatterns()
Test the NotClassSetLabelPattern.getExcludedLabelPatterns() method.

Try an empty LabelPattern.

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

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


testStringNotClassSetLabelPatternRemoveExcludedLabel

public void testStringNotClassSetLabelPatternRemoveExcludedLabel()
Tests the NotClassSetLabelPattern.removeExcludedLabel() 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 NotClassSetLabelPattern.getExcludedLabels() methods work properly.


testStringNotClassSetLabelPatternRemoveExcludedLabels

public void testStringNotClassSetLabelPatternRemoveExcludedLabels()
Tests the NotClassSetLabelPattern.removeExcludedLabels() 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.createNotClassSetLabelPatternInterface(), StringAlphabetFactory.createLabelInterface(), and NotClassSetLabelPattern.getExcludedLabels methods work properly.