Created
September 26, 2011 00:32
-
-
Save drewbourne/1241369 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mockolate.examples | |
{ | |
public class MockolateFlexUnitAsyncPrepareExample | |
{ | |
public var command:CreateOrUpdateConstituentCommand; | |
public var constituent:Constituent; | |
public var constituentModel:IConstituentModel; | |
[Before(order=1, async)] | |
public function prepareMocks():void | |
{ | |
var mockolatePreparer:IEventDispatcher = prepare(IConstituentModel); | |
Async.proceedOnEvent(this, mockolatePreparer, Event.COMPLETE); | |
} | |
[Before(order=2)] | |
public function setup():void | |
{ | |
constituent = new Constituent(); | |
command = new CreateOrUpdateConstituentCommand(); | |
command.eventDispatcher = new EventDispatcher(); | |
command.event = new PetitionEvent(PetitionEvent.PETITION_SUBMITED, false, false, constituent); | |
command.constituentModel = nice(IConstituentModel); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment