Example #1
0
        public void RequestResponse_variant()
        {
            var query = new PingALing();

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

            var pong = mediator.Request(query);

            Assert.That(pong.Data, Is.EqualTo("PONG!"));
            Assert.That(pong.HasException(), Is.False);
        }
        public void RequestResponse_variant()
        {
            var query = new PingALing();

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

            var pong = mediator.Request(query);

            Assert.That(pong.HasException(), Is.False,
                pong.Exception == null ? string.Empty : pong.Exception.ToString());
            Assert.That(pong.Data, Is.EqualTo("PONG!"));
        }