Sha256: 8d1fc736fa417694441f2b5df257b0f89fbb5e341b74704e59eb05f55cc495da
Contents?: true
Size: 874 Bytes
Versions: 2
Compression:
Stored size: 874 Bytes
Contents
package org.osflash.signals { import asunit.asserts.*; import asunit.framework.IAsync; public class DeluxeSignalSplitInterfacesTest { [Inject] public var async:IAsync; // Notice the use of the smaller IListeners interface, rather than ISignal. // This makes dispatch() inaccessible unless the Signal is typed to IDispatcher. public var completed:IDeluxeSignal; [Before] public function setUp():void { completed = new DeluxeSignal(this); } [After] public function tearDown():void { DeluxeSignal(completed).removeAll(); completed = null; } ////// [Test] public function cast_to_IDispatcher_and_dispatch_should_work():void { completed.addOnce( async.add(onCompleted, 10) ); IDispatcher(completed).dispatch(); } private function onCompleted():void { assertEquals(0, arguments.length); } } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
as3signals-0.7.1 | tests/org/osflash/signals/DeluxeSignalSplitInterfacesTest.as |
as3signals-0.7.0 | tests/org/osflash/signals/DeluxeSignalSplitInterfacesTest.as |