org.puremvc.java.patterns.facade
Class FacadeTest

java.lang.Object
  extended by org.puremvc.java.patterns.facade.FacadeTest

public class FacadeTest
extends java.lang.Object

Test the PureMVC Facade class.

See Also:
FacadeTestVO, FacadeTestCommand

Constructor Summary
FacadeTest()
           
 
Method Summary
 void testGetInstance()
          Tests the Facade Singleton Factory Method
 void testHasCommand()
          Test hasCommand method.
 void testHasMediator()
          Tests the hasMediator Method
 void testHasProxy()
          Tests the hasProxy Method
 void testRegisterAndRemoveCommandAndSendNotification()
          Tests Command removal via the Facade.
 void testRegisterAndRemoveProxy()
          Tests the removing Proxies via the Facade.
 void testRegisterAndRetrieveProxy()
          Tests the regsitering and retrieving Model proxies via the Facade.
 void testRegisterCommandAndSendNotification()
          Tests Command registration and execution via the Facade.
 void testRegisterRetrieveAndRemoveMediator()
          Tests registering, retrieving and removing Mediators via the Facade.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacadeTest

public FacadeTest()
Method Detail

testGetInstance

public void testGetInstance()
Tests the Facade Singleton Factory Method


testRegisterCommandAndSendNotification

public void testRegisterCommandAndSendNotification()
Tests Command registration and execution via the Facade.

This test gets a Singleton Facade instance and registers the FacadeTestCommand class to handle 'FacadeTest' Notifcations.

It then sends a notification using the Facade. Success is determined by evaluating a property on an object placed in the body of the Notification, which will be modified by the Command.


testRegisterAndRemoveCommandAndSendNotification

public void testRegisterAndRemoveCommandAndSendNotification()
Tests Command removal via the Facade.

This test gets a Singleton Facade instance and registers the FacadeTestCommand class to handle 'FacadeTest' Notifcations. Then it removes the command.

It then sends a Notification using the Facade. Success is determined by evaluating a property on an object placed in the body of the Notification, which will NOT be modified by the Command.


testRegisterAndRetrieveProxy

public void testRegisterAndRetrieveProxy()
Tests the regsitering and retrieving Model proxies via the Facade.

Tests registerProxy and retrieveProxy in the same test. These methods cannot currently be tested separately in any meaningful way other than to show that the methods do not throw exception when called.


testRegisterAndRemoveProxy

public void testRegisterAndRemoveProxy()
Tests the removing Proxies via the Facade.


testRegisterRetrieveAndRemoveMediator

public void testRegisterRetrieveAndRemoveMediator()
Tests registering, retrieving and removing Mediators via the Facade.


testHasProxy

public void testHasProxy()
Tests the hasProxy Method


testHasMediator

public void testHasMediator()
Tests the hasMediator Method


testHasCommand

public void testHasCommand()
Test hasCommand method.