org.springframework.richclient.command
Class AbstractCommandRegistryTests

Show UML class diagram
java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.richclient.command.AbstractCommandRegistryTests
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
DefaultCommandRegistryTests

public abstract class AbstractCommandRegistryTests
extends junit.framework.TestCase

This is an abstract test case for implementations of the CommandRegistry interface. Subclasses only need to override the getCommandRegistry() method to return the concrete implementation to be tested.

Since:
0.3
Author:
Kevin Stembridge

Constructor Summary
protected AbstractCommandRegistryTests()
          Creates a new uninitialized AbstractCommandRegistryTests.
 
Method Summary
protected abstract  org.springframework.richclient.command.CommandRegistry getCommandRegistry()
          Subclasses must override this method to provide the concrete implementation of the registry to be tested.
 void testContainsCommand()
          Tests the CommandRegistry.containsCommand(String) method.
 void testGetCommandById()
          Tests the CommandRegistry.getCommand(String) method.
 void testGetCommandByIdAndRequiredType()
          Tests the CommandRegistry.getCommand(String, Class) method.
 void testGetType()
          Tests the CommandRegistry.getType(String) method.
 void testIsTypeMatch()
          Tests the CommandRegistry.isTypeMatch(String, Class) method.
 void testRegisterCommand()
          Tests the CommandRegistry.registerCommand(AbstractCommand) method.
 void testRegisterCommandGroup()
          Confirms that if a CommandGroup is being registered, it will obtain a reference to the registry that it is being added to.
 void testSetTargetableActionCommandExecutor()
          Tests the CommandRegistry.setTargetableActionCommandExecutor(String, ActionCommandExecutor) method.
 
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

AbstractCommandRegistryTests

protected AbstractCommandRegistryTests()
Creates a new uninitialized AbstractCommandRegistryTests.

Method Detail

getCommandRegistry

protected abstract org.springframework.richclient.command.CommandRegistry getCommandRegistry()
Subclasses must override this method to provide the concrete implementation of the registry to be tested. A new, empy registry must be provided. This method may be called often, so subclasses should take care to not repeat any unnecessary initialization.

Returns:
The registry implementation to be tested, never null.

testRegisterCommand

public void testRegisterCommand()
Tests the CommandRegistry.registerCommand(AbstractCommand) method.


testRegisterCommandGroup

public void testRegisterCommandGroup()
Confirms that if a CommandGroup is being registered, it will obtain a reference to the registry that it is being added to.


testIsTypeMatch

public final void testIsTypeMatch()
Tests the CommandRegistry.isTypeMatch(String, Class) method.


testContainsCommand

public final void testContainsCommand()
Tests the CommandRegistry.containsCommand(String) method.


testGetCommandById

public final void testGetCommandById()
Tests the CommandRegistry.getCommand(String) method.


testGetCommandByIdAndRequiredType

public final void testGetCommandByIdAndRequiredType()
Tests the CommandRegistry.getCommand(String, Class) method.


testGetType

public final void testGetType()
Tests the CommandRegistry.getType(String) method.


testSetTargetableActionCommandExecutor

public void testSetTargetableActionCommandExecutor()
Tests the CommandRegistry.setTargetableActionCommandExecutor(String, ActionCommandExecutor) method.



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