org.gjt.rec.testing
Class SettingsTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.gjt.rec.testing.SettingsTest
All Implemented Interfaces:
EventListener, SettingsListener, junit.framework.Test

public abstract class SettingsTest
extends junit.framework.TestCase
implements SettingsListener

Contains test methods that check that a settings object fulfils its contractual obligations as specified by the javadoc comments on the Settings interface.

Author:
Neil Stockbridge
See Also:
Settings

Field Summary
static String REVISION
           
 
Constructor Summary
SettingsTest(String name, boolean settingsCanBeSet, String[] settingNames)
           
 
Method Summary
abstract  Settings newSettings()
          Constructs a new instance of settings.
 void settingsChanged(SettingsEvent e)
          Invoked when a settings object has changed.
 void setUp()
           
 void testAddNullListener()
           
 void testGetNames()
           
 void testGetNull()
           
 void testGetUnknownSetting()
           
 void testNotification()
           
 void testRemove()
           
 void testRemoveNull()
           
 void testRemoveNullListener()
           
 void testRemoveUnknownListener()
           
 void testSet()
           
 void testSetInstead()
           
 void testSetNullArgs()
           
 void testSetNullName()
           
 void testSetNullValue()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

SettingsTest

public SettingsTest(String name,
                    boolean settingsCanBeSet,
                    String[] settingNames)
Method Detail

newSettings

public abstract Settings newSettings()
Constructs a new instance of settings. All instances have exactly the same settings. This method is used after a test that modifies the settings object.


settingsChanged

public void settingsChanged(SettingsEvent e)
Description copied from interface: SettingsListener
Invoked when a settings object has changed.

Specified by:
settingsChanged in interface SettingsListener
Parameters:
e - an event object describing the change in the settings.

setUp

public void setUp()
Overrides:
setUp in class junit.framework.TestCase

testGetNames

public void testGetNames()

testGetNull

public void testGetNull()

testGetUnknownSetting

public void testGetUnknownSetting()

testSetNullName

public void testSetNullName()

testSetNullValue

public void testSetNullValue()

testSetNullArgs

public void testSetNullArgs()

testSet

public void testSet()

testSetInstead

public void testSetInstead()

testRemoveNull

public void testRemoveNull()

testRemove

public void testRemove()

testAddNullListener

public void testAddNullListener()

testRemoveNullListener

public void testRemoveNullListener()

testRemoveUnknownListener

public void testRemoveUnknownListener()

testNotification

public void testNotification()