Exemplo n.º 1
0
        internal void DynamicSendTests(IMessenger messenger, TestMessage msg, string expected, string result)
        {
            GIVEN["a mock messenger"] |= () => {
                messenger          = Substitute.For <IMessenger>();
                messenger.Send(msg = new TestMessage()).Returns(expected = "TEST");
            };

            WHEN["calling DynamicSend"] |= () => result = messenger.DynamicSend <string>(msg);
            THEN["the strongly typed Send is called"] |= () => result.Should().Be(expected);
        }