Created
October 11, 2011 12:22
-
-
Save drewbourne/1277943 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 | |
{ | |
import flash.events.Event; | |
import mockolate.runner.MockolateRule; | |
import org.flexunit.assertThat; | |
import org.hamcrest.object.notNullValue; | |
public class UsingConstructorArgs | |
{ | |
[Rule] | |
public var mocks:MockolateRule = new MockolateRule(); | |
[Mock(args="event1Args")] | |
public var event1:Event; | |
public var event1Args:Array = [ Event.COMPLETE ]; | |
[Mock(args="event2Args")] | |
public var event2:Event; | |
public function event2Args():Array | |
{ | |
return [ Event.COMPLETE ]; | |
} | |
[Test] | |
public function events_should_be_injected():void | |
{ | |
assertThat("event1", event1, notNullValue()); | |
assertThat("event2", event2, notNullValue()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment