コード例 #1
0
ファイル: BasicExample.cs プロジェクト: rossipedia/ShortBus
        public void Send()
        {
            var command = new PrintText
                {
                    Format = "This is a {0} message",
                    Args = new object[] {"text"}
                };

            var mediator = ObjectFactory.GetInstance<IMediator>();

            var response = mediator.Send(command);

            Assert.That(response.HasException(), Is.False);
        }
コード例 #2
0
        public void Send_void()
        {
            var command = new PrintText
            {
                Format = "This is a {0} message",
                Args = new object[] {"text"}
            };

            var mediator = TestScope.Resolve<IMediator>();

            var response = mediator.Request(command);

            Assert.That(response.HasException(), Is.False,
                response.Exception == null ? string.Empty : response.Exception.ToString());
        }