Exemplo n.º 1
0
        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);
        }
Exemplo n.º 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());
        }