Ejemplo n.º 1
0
        public void Should_create_a_proxy_for_the_interface()
        {
            var             user      = new User("Chris", "*****@*****.**");
            IComplaintAdded complaint = new ComplaintAdded(user, "No toilet paper", BusinessArea.Appearance)
            {
                Body = "There was no toilet paper in the stall, forcing me to use my treasured issue of .NET Developer magazine."
            };

            TestSerialization(complaint);
        }
Ejemplo n.º 2
0
        public void Should_dispatch_an_interface_via_the_pipeline()
        {
            var pipeline = InboundPipelineConfigurator.CreateDefault(null);

            var consumer = new TestMessageConsumer <IComplaintAdded>();

            pipeline.ConnectInstance(consumer);

            var             user      = new User("Chris", "*****@*****.**");
            IComplaintAdded complaint = new ComplaintAdded(user, "No toilet paper", BusinessArea.Appearance)
            {
                Body = "There was no toilet paper in the stall, forcing me to use my treasured issue of .NET Developer magazine."
            };

            pipeline.Dispatch(complaint);

            consumer.ShouldHaveReceivedMessage(complaint);
        }