laser.alphabet.labelpattern.test
Class StringLabelPatternFactoryTest

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

public class StringLabelPatternFactoryTest
extends AbstractStringLabelPatternTest

The StringLabelPatternFactoryTest class provides testing for the StringLabelPatternFactory class.

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

Field Summary
 
Fields inherited from class laser.alphabet.labelpattern.test.AbstractStringLabelPatternTest
factory, probe
 
Constructor Summary
StringLabelPatternFactoryTest()
           
 
Method Summary
 void testStringAlphabetFactoryCreateLabelInterface()
          Tests the StringLabelPatternFactory.createLabelInterface() method.
 void testStringLabelPatternFactoryCreateAllLabelPatternInterface()
          Tests the StringLabelPatternFactory.createAllLabelPatternInterface() method.
 void testStringLabelPatternFactoryCreateAlphabetInterface()
          Tests the StringLabelPatternFactory.createAlphabetInterface() method.
 void testStringLabelPatternFactoryCreateClassSetLabelPatternInterface()
          Tests the StringLabelPatternFactory.createClassSetLabelPatternInterface() method.
 void testStringLabelPatternFactoryCreateLabelPatternInterface()
          Tests the StringLabelPatternFactory.createLabelPatternInterface() method.
 void testStringLabelPatternFactoryCreateNotClassSetLabelPatternInterface()
          Tests the StringLabelPatternFactory.createNotClassSetLabelPatternInterface() method.
 void testStringLabelPatternFactoryIsValidLabel()
          Tests the StringLabelPatternFactory.isValidLabel() method.
 void testStringLabelPatternFactoryIsValidLabelPattern()
          Tests the StringLabelPatternFactory.isValidLabelPattern() method.
 void testStringLabelPatternFactoryUnmodifiableAlphabet()
          Tests the StringLabelPatternFactory.unmodifiableAlphabet() method.
 
Methods inherited from class laser.alphabet.labelpattern.test.AbstractStringLabelPatternTest
setUp
 
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

StringLabelPatternFactoryTest

public StringLabelPatternFactoryTest()
Method Detail

testStringAlphabetFactoryCreateLabelInterface

public void testStringAlphabetFactoryCreateLabelInterface()
Tests the StringLabelPatternFactory.createLabelInterface() method. Try a null String and any non-null String. We also want to ensure that flyweighting is working properly, thus executing this method twice with the same input should return two references to the same object. Also, create a number of distinct labels to make sure the repository does not become full.

Note if this test fails, it invalidates the results of subsequent tests.


testStringLabelPatternFactoryCreateAlphabetInterface

public void testStringLabelPatternFactoryCreateAlphabetInterface()
Tests the StringLabelPatternFactory.createAlphabetInterface() method. Try null input, no input parameters, and input parameters.

Note if this test fails, it invalidates the results of subsequent tests.


testStringLabelPatternFactoryIsValidLabel

public void testStringLabelPatternFactoryIsValidLabel()
Tests the StringLabelPatternFactory.isValidLabel() method. Try null input and non-null String input.


testStringLabelPatternFactoryUnmodifiableAlphabet

public void testStringLabelPatternFactoryUnmodifiableAlphabet()
Tests the StringLabelPatternFactory.unmodifiableAlphabet() method. Try null input and AlphabetInterface<StringLabel> input.

This test relies on the fact that the StringAlphabetFactory.createAlphabetInterface(), StringAlphabetFactory.createLabelInterface(), and Alphabet.add() methods work properly.


testStringLabelPatternFactoryCreateAllLabelPatternInterface

public void testStringLabelPatternFactoryCreateAllLabelPatternInterface()
Tests the StringLabelPatternFactory.createAllLabelPatternInterface() method. The method takes no input.

Note if this test fails, it invalidates the results of subsequent tests.


testStringLabelPatternFactoryCreateClassSetLabelPatternInterface

public void testStringLabelPatternFactoryCreateClassSetLabelPatternInterface()
Tests the StringLabelPatternFactory.createClassSetLabelPatternInterface() method. The method takes no input.

Note if this test fails, it invalidates the results of subsequent tests.


testStringLabelPatternFactoryCreateNotClassSetLabelPatternInterface

public void testStringLabelPatternFactoryCreateNotClassSetLabelPatternInterface()
Tests the StringLabelPatternFactory.createNotClassSetLabelPatternInterface() method. The method takes no input.

Note if this test fails, it invalidates the results of subsequent tests.


testStringLabelPatternFactoryCreateLabelPatternInterface

public void testStringLabelPatternFactoryCreateLabelPatternInterface()
Tests the StringLabelPatternFactory.createLabelPatternInterface() method. Try null input, valid String input, and invalid String input.

Note if this test fails, it invalidates the results of subsequent tests.


testStringLabelPatternFactoryIsValidLabelPattern

public void testStringLabelPatternFactoryIsValidLabelPattern()
Tests the StringLabelPatternFactory.isValidLabelPattern() method. Try null input, valid String input, and invalid String input.