|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.puremvc.java.core.ViewTest
public class ViewTest
Test the PureMVC View class.
Field Summary | |
---|---|
int |
counter
|
java.lang.String |
lastNotification
|
static java.lang.String |
NOTE1
|
static java.lang.String |
NOTE2
|
static java.lang.String |
NOTE3
|
static java.lang.String |
NOTE4
|
static java.lang.String |
NOTE5
|
static java.lang.String |
NOTE6
|
boolean |
onRegisterCalled
|
boolean |
onRemoveCalled
|
Constructor Summary | |
---|---|
ViewTest()
|
Method Summary | |
---|---|
void |
onNotification(org.puremvc.java.interfaces.INotification note)
A utility method to test the notification of Observers by the view |
void |
testGetInstance()
Tests the View Singleton Factory Method |
void |
testHasMediator()
Tests the hasMediator Method |
void |
testMediatorReregistration()
Tests registering the same mediator twice. |
void |
testModifyObserverListDuringNotification()
Tests the ability for the observer list to be modified during the process of notification, and all observers be properly notified. |
void |
testOnRegisterAndOnRemove()
Tests that the View callse the onRegister and onRemove methods |
void |
testRegisterAndNotifyObserver()
Tests registration and notification of Observers. |
void |
testRegisterAndRemoveMediator()
Tests registering and removing a mediator |
void |
testRegisterAndRetrieveMediator()
Tests registering and retrieving a mediator with the View. |
void |
testRemoveMediatorAndSubsequentNotify()
Tests registering a Mediator for 2 different notifications, removing the Mediator from the View, and seeing that neither notification causes the Mediator to be notified. |
void |
testRemoveOneOfTwoMediatorsAndSubsequentNotify()
Tests registering one of two registered Mediators and seeing that the remaining one still responds. |
void |
testSuccessiveRegisterAndRemoveMediator()
Tests successive regster and remove of same mediator. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String lastNotification
public boolean onRegisterCalled
public boolean onRemoveCalled
public int counter
public static final java.lang.String NOTE1
public static final java.lang.String NOTE2
public static final java.lang.String NOTE3
public static final java.lang.String NOTE4
public static final java.lang.String NOTE5
public static final java.lang.String NOTE6
Constructor Detail |
---|
public ViewTest()
Method Detail |
---|
public void testGetInstance()
public void testRegisterAndNotifyObserver()
An Observer is created to callback the viewTestMethod of this ViewTest instance. This Observer is registered with the View to be notified of 'ViewTestEvent' events. Such an event is created, and a value set on its payload. Then the View is told to notify interested observers of this Event.
The View calls the Observer's notifyObserver method which calls the viewTestMethod on this instance of the ViewTest class. The viewTestMethod method will set an instance variable to the value passed in on the Event payload. We evaluate the instance variable to be sure it is the same as that passed out as the payload of the original 'ViewTestEvent'.
public void onNotification(org.puremvc.java.interfaces.INotification note)
onNotification
in interface org.puremvc.java.interfaces.IFunction
public void testRegisterAndRetrieveMediator()
public void testHasMediator()
public void testRegisterAndRemoveMediator()
public void testOnRegisterAndOnRemove()
public void testSuccessiveRegisterAndRemoveMediator()
public void testRemoveMediatorAndSubsequentNotify()
public void testRemoveOneOfTwoMediatorsAndSubsequentNotify()
public void testMediatorReregistration()
public void testModifyObserverListDuringNotification()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |