protected override void beforeEach()
        {
            theSender = new RecordingEnvelopeSender();
            Services.Inject <IEnvelopeSender>(theSender);

            theRequest = new Message1();
            theTask    = ClassUnderTest.Request <Message2>(theRequest);

            theEnvelope = theSender.Sent.Single();
        }
        protected override void beforeEach()
        {
            theSender = new RecordingEnvelopeSender();
            Services.Inject <IEnvelopeSender>(theSender);

            thePeer = new TransportNode
            {
                Addresses = new Uri[] { "memory://replies".ToUri() }
            };

            ClassUnderTest.SendSubscriptionChangedToPeer(thePeer);
        }
        public void SetUp()
        {
            original = new Envelope
            {
                ReplyUri      = "foo://bar".ToUri(),
                AckRequested  = true,
                CorrelationId = Guid.NewGuid().ToString()
            };

            var recordingSender = new RecordingEnvelopeSender();

            new OutgoingSender(recordingSender, new RecordingLogger())
            .SendFailureAcknowledgement(original, "you stink");

            theSentEnvelope = recordingSender.Sent.Single();
            theAck          = theSentEnvelope.Message as FailureAcknowledgement;
        }
        public void when_sending_a_failure_ack_if_no_ack_or_response_is_requested_do_nothing()
        {
            var original = new Envelope
            {
                ReplyUri       = "foo://bar".ToUri(),
                AckRequested   = false,
                ReplyRequested = null,
                CorrelationId  = Guid.NewGuid().ToString()
            };

            var recordingSender = new RecordingEnvelopeSender();

            new OutgoingSender(recordingSender, new RecordingLogger())
            .SendFailureAcknowledgement(original, "you stink");

            recordingSender.Outgoing.Any()
            .ShouldBeFalse();
        }
        public void SetUp()
        {
            theEnvelope = ObjectMother.Envelope();
            theEnvelope.Message = new object();

            theContinuationContext = new TestContinuationContext();

            theContext = new FubuTransportation.Runtime.Invocation.InvocationContext(theEnvelope, new HandlerChain());

            theContext.EnqueueCascading(new object());
            theContext.EnqueueCascading(new object());
            theContext.EnqueueCascading(new object());

            theSender = new RecordingEnvelopeSender();

            theContinuation = new ChainSuccessContinuation(theContext);

            theLogger = new RecordingLogger();

            theContinuation.Execute(theEnvelope, theContinuationContext);
        }
        public void SetUp()
        {
            theEnvelope         = ObjectMother.Envelope();
            theEnvelope.Message = new object();

            theContinuationContext = new TestContinuationContext();

            theContext = new FubuTransportation.Runtime.Invocation.InvocationContext(theEnvelope, new HandlerChain());

            theContext.EnqueueCascading(new object());
            theContext.EnqueueCascading(new object());
            theContext.EnqueueCascading(new object());

            theSender = new RecordingEnvelopeSender();

            theContinuation = new ChainSuccessContinuation(theContext);

            theLogger = new RecordingLogger();

            theContinuation.Execute(theEnvelope, theContinuationContext);
        }