public void Allows_Communication_From_Parent_To_Child() { parentConnector.OnDefaultChannel() .RelayEvent(SupportEvent.Type.TYPE1); childAConnector.OnDefaultChannel() .ReceiveEvent(SupportEvent.Type.TYPE1); bool wasCalled = false; childADispatcher.AddEventListener(SupportEvent.Type.TYPE1, delegate(IEvent obj) { wasCalled = true; }); parentDispatcher.Dispatch(new SupportEvent(SupportEvent.Type.TYPE1)); Assert.That(wasCalled, Is.True); }
public void Allows_Communication_Amongst_Children() { childAConnector.OnDefaultChannel() .RelayEvent(SupportEvent.Type.TYPE1); childBConnector.OnDefaultChannel() .ReceiveEvent(SupportEvent.Type.TYPE1); bool wasCalled = false; childBDispatcher.AddEventListener(SupportEvent.Type.TYPE1, delegate(IEvent evt) { wasCalled = true; }); childADispatcher.Dispatch(new SupportEvent(SupportEvent.Type.TYPE1)); Assert.That(wasCalled, Is.True); }
public void Configure() { moduleConnector.OnDefaultChannel().RelayEvent(MessageEvent.Type.SEND); }