org.springframework.richclient.command
Class CommandGroupFactoryBeanTests

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

public class CommandGroupFactoryBeanTests
extends junit.framework.TestCase

Provides a suite of unit tests for the CommandGroupFactoryBean class.

Since:
0.3
Author:
Kevin Stembridge

Constructor Summary
CommandGroupFactoryBeanTests()
          Creates a new uninitialized CommandGroupFactoryBeanTests.
 
Method Summary
 void testConfigureIfNecessary()
          Test method for CommandGroupFactoryBean.configureIfNecessary(AbstractCommand).
 void testConstructorTakingGroupIdAndMembersArray()
          Tests the constructor that takes the group id and members array.
 void testCreateCommandGroup()
          Test method for CommandGroupFactoryBean.createCommandGroup().
 void testForEncodedMembersNotSet()
          Confirms that an exception is thrown from the afterPropertiesSet method if the encodedMembers property has not been set.
 void testGetObjectType()
          Test method for CommandGroupFactoryBean.getObjectType().
 void testInvalidCommandPrefix()
          Confirms that an exception is thrown if the 'command:' prefix appears in the members list with no following command name.
 void testInvalidGroupPrefix()
          Confirms that an exception is thrown if the 'group:' prefix appears in the members list with no following command name.
 void testSecurityControllerIdIsApplied()
          Confirms that the command group is assigned the security controller id of the factory bean.
 void testSetBeanName()
          Test method for CommandGroupFactoryBean.setBeanName(java.lang.String).
 void testSetMembers()
          Test method for CommandGroupFactoryBean.setMembers(java.lang.Object[]).
 
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

CommandGroupFactoryBeanTests

public CommandGroupFactoryBeanTests()
Creates a new uninitialized CommandGroupFactoryBeanTests.

Method Detail

testForEncodedMembersNotSet

public void testForEncodedMembersNotSet()
Confirms that an exception is thrown from the afterPropertiesSet method if the encodedMembers property has not been set.


testConstructorTakingGroupIdAndMembersArray

public final void testConstructorTakingGroupIdAndMembersArray()
                                                       throws Exception
Tests the constructor that takes the group id and members array.

Throws:
Exception

testSetMembers

public final void testSetMembers()
Test method for CommandGroupFactoryBean.setMembers(java.lang.Object[]).


testSetBeanName

public final void testSetBeanName()
                           throws Exception
Test method for CommandGroupFactoryBean.setBeanName(java.lang.String).

Throws:
Exception

testInvalidGroupPrefix

public void testInvalidGroupPrefix()
Confirms that an exception is thrown if the 'group:' prefix appears in the members list with no following command name.


testInvalidCommandPrefix

public void testInvalidCommandPrefix()
Confirms that an exception is thrown if the 'command:' prefix appears in the members list with no following command name.


testCreateCommandGroup

public final void testCreateCommandGroup()
                                  throws Exception
Test method for CommandGroupFactoryBean.createCommandGroup().

Throws:
Exception

testConfigureIfNecessary

public final void testConfigureIfNecessary()
Test method for CommandGroupFactoryBean.configureIfNecessary(AbstractCommand).


testGetObjectType

public final void testGetObjectType()
Test method for CommandGroupFactoryBean.getObjectType().


testSecurityControllerIdIsApplied

public final void testSecurityControllerIdIsApplied()
                                             throws Exception
Confirms that the command group is assigned the security controller id of the factory bean.

Throws:
Exception


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