Sha256: dc7836e1362428769911e5b8f224abe3c23467b372f8c30a5c3bb56f0907a372
Contents?: true
Size: 1.74 KB
Versions: 2
Compression:
Stored size: 1.74 KB
Contents
package asunit.support { import asunit.asserts.*; import asunit.framework.Async; import asunit.framework.IAsync; import flash.display.Sprite; public class InjectionVerification { [Inject] public var iAsync:IAsync; [Inject] public var async:Async; [Inject] public var context:Sprite; [Inject(someString="stringValue", someBoolean=false, someNumber=23.4, someInt=-23, someUInt=25)] public var custom:CustomParameters; [Test] public function injectedShouldReceiveUIntValue():void { assertSame(25, custom.someUInt); } [Test] public function injectedShouldReceiveIntegerValue():void { assertSame(-23, custom.someInt); } [Test] public function injectedShouldReceiveNumberValue():void { assertSame(23.4, custom.someNumber); } [Test] public function injectedShouldReceiveBooleanValue():void { assertSame(false, custom.someBoolean); } [Test] public function injectedShouldReceiveStringValue():void { assertEquals("stringValue", custom.someString); } [Test] public function verifyDisplayObjectInjection():void { assertNotNull("DisplayObject should exiset", context); } [Test] public function verifyDisplayObjectAttachedToStage():void { assertNotNull("DisplayObjects hould be attached", context.stage); } [Test] public function verifyAsyncInjection():void { assertNotNull(async); } [Test] public function verifyIAsyncInjection():void { assertNotNull(iAsync); } } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
asunit4-4.2.2.pre | test/asunit/support/InjectionVerification.as |
asunit4-4.2.1.pre | test/asunit/support/InjectionVerification.as |