|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.puremvc.java.patterns.command.MacroCommandTest
public class MacroCommandTest
Test the PureMVC SimpleCommand class.
MacroCommandTestVO
,
MacroCommandTestCommand
Constructor Summary | |
---|---|
MacroCommandTest()
|
Method Summary | |
---|---|
void |
testMacroCommandExecute()
Tests operation of a MacroCommand . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MacroCommandTest()
Method Detail |
---|
public void testMacroCommandExecute()
MacroCommand
.
This test creates a new Notification
, adding a
MacroCommandTestVO
as the body.
It then creates a MacroCommandTestCommand
and invokes
its execute
method, passing in the
Notification
.
The MacroCommandTestCommand
has defined an
initializeMacroCommand
method, which is
called automatically by its constructor. In this method
the MacroCommandTestCommand
adds 2 SubCommands
to itself, MacroCommandTestSub1Command
and
MacroCommandTestSub2Command
.
The MacroCommandTestVO
has 2 result properties,
one is set by MacroCommandTestSub1Command
by
multiplying the input property by 2, and the other is set
by MacroCommandTestSub2Command
by multiplying
the input property by itself.
Success is determined by evaluating the 2 result properties
on the MacroCommandTestVO
that was passed to
the MacroCommandTestCommand
on the Notification
body.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |