示例#1
0
        public async Task WaitsForAppropriateMessage() {
            var task = this.EventManager.WaitFor<SecondTestMessage>();

            this.MessageBus.Send(new TestMessage());
            var testMessage = new SecondTestMessage();
            this.MessageBus.Send(testMessage);

            this.React();

            var result = await task;

            Assert.AreEqual(result, testMessage);
        }
 public void Handle(SecondTestMessage message)
 {
     _secondAction.Invoke(message);
 }