laser.alphabet.labelpattern.test
Class IndexedNotClassSetLabelPatternTest

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

public class IndexedNotClassSetLabelPatternTest
extends AbstractIndexedLabelPatternTest

The IndexedNotClassSetLabelPatternTest 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.AbstractIndexedLabelPatternTest
factory, probe
 
Constructor Summary
IndexedNotClassSetLabelPatternTest()
           
 
Method Summary
protected  void setUp()
          Initializes the fields for each test.
 void testIndexedNotClassSetLabelPatternAddExcludedLabel()
          Tests the NotClassSetLabelPattern.addExcludedLabel() method.
 void testIndexedNotClassSetLabelPatternAddExcludedLabelPattern()
          Tests the NotClassSetLabelPattern.addExcludedLabelPattern() method.
 void testIndexedNotClassSetLabelPatternAddExcludedLabelPatterns()
          Tests the NotClassSetLabelPattern.addExcludedLabelPatterns() method.
 void testIndexedNotClassSetLabelPatternAddExcludedLabels()
          Tests the NotClassSetLabelPattern.addExcludedLabels() method.
 void testIndexedNotClassSetLabelPatternClone()
          Tests the NotClassSetLabelPattern.clone() method.
 void testIndexedNotClassSetLabelPatternCompareTo()
          Tests the NotClassSetLabelPattern.compareTo() method.
 void testIndexedNotClassSetLabelPatternEquals()
          Tests the NotClassSetLabelPattern.equals() method.
 void testIndexedNotClassSetLabelPatternGetExcludedLabelPatterns()
          Test the NotClassSetLabelPattern.getExcludedLabelPatterns() method.
 void testIndexedNotClassSetLabelPatternGetExcludedLabels()
          Test the NotClassSetLabelPattern.getExcludedLabels() method.
 void testIndexedNotClassSetLabelPatternGetMatchingLabels()
          Tests the NotClassSetLabelPattern.getMatchingLabels() method.
 void testIndexedNotClassSetLabelPatternHashCode()
          Tests the NotClassSetLabelPattern.hashCode() method.
 void testIndexedNotClassSetLabelPatternRemoveExcludedLabel()
          Tests the NotClassSetLabelPattern.removeExcludedLabel() method.
 void testIndexedNotClassSetLabelPatternRemoveExcludedLabelPattern()
          Tests the NotClassSetLabelPattern.removeExcludedLabelPattern() method.
 void testIndexedNotClassSetLabelPatternRemoveExcludedLabelPatterns()
          Tests the NotClassSetLabelPattern.removeExcludedLabelPatterns() method.
 void testIndexedNotClassSetLabelPatternRemoveExcludedLabels()
          Tests the NotClassSetLabelPattern.removeExcludedLabels() method.
 void testIndexedNotClassSetLabelPatternToString()
          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

IndexedNotClassSetLabelPatternTest

public IndexedNotClassSetLabelPatternTest()
Method Detail

setUp

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

Overrides:
setUp in class AbstractIndexedLabelPatternTest

testIndexedNotClassSetLabelPatternClone

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

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


testIndexedNotClassSetLabelPatternCompareTo

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


testIndexedNotClassSetLabelPatternEquals

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

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


testIndexedNotClassSetLabelPatternGetMatchingLabels

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

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

This test relies on the fact that the IndexedLabelPatternFactory.createLabelPatternInterface(), IndexedLabelPatternFactory.createNotClassSetLabelPatternInterface(), NotClassSetLabelPattern.addExcludedLabelPattern(), NotClassSetLabelPattern.toString(), and IndexedAlphabetFactory.createAlphabetInterface() methods work properly.


testIndexedNotClassSetLabelPatternHashCode

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

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


testIndexedNotClassSetLabelPatternToString

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


testIndexedNotClassSetLabelPatternAddExcludedLabel

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

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


testIndexedNotClassSetLabelPatternAddExcludedLabels

public void testIndexedNotClassSetLabelPatternAddExcludedLabels()
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 IndexedLabelPatternFactory.createNotClassSetLabelPatternInterface(), IndexedAlphabetFactory.createLabelInterface(), and NotClassSetLabelPattern.getExcludedLabels methods work properly.


testIndexedNotClassSetLabelPatternAddExcludedLabelPattern

public void testIndexedNotClassSetLabelPatternAddExcludedLabelPattern()
Tests the NotClassSetLabelPattern.addExcludedLabelPattern() 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 NotClassSetLabelPattern.getExcludedLabelPatterns() methods work properly.

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


testIndexedNotClassSetLabelPatternAddExcludedLabelPatterns

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


testIndexedNotClassSetLabelPatternGetExcludedLabels

public void testIndexedNotClassSetLabelPatternGetExcludedLabels()
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 IndexedLabelPatternFactory.createLabelPatternInterface() and IndexedAlphabetFactory.createLabelInterface() methods work properly.

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


testIndexedNotClassSetLabelPatternGetExcludedLabelPatterns

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


testIndexedNotClassSetLabelPatternRemoveExcludedLabel

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


testIndexedNotClassSetLabelPatternRemoveExcludedLabelPattern

public void testIndexedNotClassSetLabelPatternRemoveExcludedLabelPattern()
Tests the NotClassSetLabelPattern.removeExcludedLabelPattern() 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 NotClassSetLabelPattern.getExcludedLabelPatterns() methods work properly.


testIndexedNotClassSetLabelPatternRemoveExcludedLabels

public void testIndexedNotClassSetLabelPatternRemoveExcludedLabels()
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 IndexedLabelPatternFactory.createNotClassSetLabelPatternInterface(), IndexedAlphabetFactory.createLabelInterface(), and NotClassSetLabelPattern.getExcludedLabels methods work properly.


testIndexedNotClassSetLabelPatternRemoveExcludedLabelPatterns

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