org.springframework.richclient.core
Class LabelInfoTests

Show UML class diagram
java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.richclient.core.LabelInfoTests
All Implemented Interfaces:
junit.framework.Test

public class LabelInfoTests
extends junit.framework.TestCase

Provides a suite of unit tests for the LabelInfo class.

Author:
Peter De Bruycker, Kevin Stembridge

Constructor Summary
LabelInfoTests()
          Creates a new LabelInfoTests.
 
Method Summary
static void pass()
           
 void testConfigureLabel()
           
 void testConfigureLabelFor()
           
 void testConfigureLabelForJPanel()
           
 void testConfigureLabelForWithColon()
           
 void testConfigureLabelNull()
           
 void testConstructor()
           
 void testConstructorEmptyText()
           
 void testConstructorMnemonicIndexGreaterThanLength()
           
 void testConstructorNegativeMnemonic()
           
 void testConstructorNegativeMnemonicIndex()
           
 void testConstructorNullText()
           
 void testEquals()
           
 void testForAtSymbols()
          Confirms that any @ symbols, used by the CommandButtonLabelInfo, will not be given special treatment by a LabelInfo.
 void testForEscapedAmpersands()
          Confirms that any ampersands escaped with a backslash character appear as text in the label.
 void testForEscapedBackslashes()
          Confirms that any backslashes escaped with a backslash character appear as text in the label.
 void testForNullOrEmptyInput()
          Confirms that null or empty input will result in a LabelInfo instance with a blank text label and no specified mnemonic.
 void testHashCode()
           
 void testInvalidSyntax()
          Confirms that exceptions are thrown for label descriptors that violate the syntax rules.
 void testValueOfWithValidSyntax()
          Confirms that a label descriptor with various special characters produces a LabelInfo with expected values for mnemonic and mnemonicIndex.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LabelInfoTests

public LabelInfoTests()
Creates a new LabelInfoTests.

Method Detail

testForNullOrEmptyInput

public void testForNullOrEmptyInput()
Confirms that null or empty input will result in a LabelInfo instance with a blank text label and no specified mnemonic.


testValueOfWithValidSyntax

public void testValueOfWithValidSyntax()
Confirms that a label descriptor with various special characters produces a LabelInfo with expected values for mnemonic and mnemonicIndex.


testInvalidSyntax

public void testInvalidSyntax()
Confirms that exceptions are thrown for label descriptors that violate the syntax rules.


testForEscapedAmpersands

public void testForEscapedAmpersands()
Confirms that any ampersands escaped with a backslash character appear as text in the label.


testForEscapedBackslashes

public void testForEscapedBackslashes()
Confirms that any backslashes escaped with a backslash character appear as text in the label.


testForAtSymbols

public void testForAtSymbols()
Confirms that any @ symbols, used by the CommandButtonLabelInfo, will not be given special treatment by a LabelInfo.


testConstructor

public void testConstructor()

testEquals

public void testEquals()
                throws Exception
Throws:
Exception

testHashCode

public void testHashCode()
                  throws Exception
Throws:
Exception

testConstructorEmptyText

public void testConstructorEmptyText()

testConstructorNullText

public void testConstructorNullText()

testConstructorNegativeMnemonic

public void testConstructorNegativeMnemonic()

testConfigureLabel

public void testConfigureLabel()

testConfigureLabelNull

public void testConfigureLabelNull()

testConfigureLabelFor

public void testConfigureLabelFor()

testConfigureLabelForWithColon

public void testConfigureLabelForWithColon()

testConfigureLabelForJPanel

public void testConfigureLabelForJPanel()

testConstructorMnemonicIndexGreaterThanLength

public void testConstructorMnemonicIndexGreaterThanLength()

testConstructorNegativeMnemonicIndex

public void testConstructorNegativeMnemonicIndex()

pass

public static final void pass()


Copyright © 2004-2009 The Spring Framework. All Rights Reserved.