Skip to content

Instantly share code, notes, and snippets.

@Stray
Created March 15, 2011 16:45
Show Gist options
  • Save Stray/871006 to your computer and use it in GitHub Desktop.
Save Stray/871006 to your computer and use it in GitHub Desktop.
A test that should fail in the SignalCommandMap
[Test(expects="org.swiftsuspenders.InjectorError")]
public function signal_values_no_longer_persist_from_one_to_the_next():void
{
var propOne:TestCommandProperty = new TestCommandProperty();
var propTwo:TestCommandProperty2 = new TestCommandProperty2();
signalCommandMap.mapSignal(onePropSignal, TestOnePropertyCommand);
var secondPropSignal:TestCommandProperty2Signal = new TestCommandProperty2Signal();
// this command requires the values dispatched by both signals
signalCommandMap.mapSignal(secondPropSignal, TestTwoPropertyConstructorCommand);
onePropSignal.dispatch(propOne);
secondPropSignal.dispatch(propTwo);
assertTrue(propOne.wasExecuted && propTwo.wasExecuted);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment