Example #1
0
        public when_sending_a_failure_ack_and_ack_is_requested()
        {
            original = new Envelope
            {
                ReplyUri      = "foo://bar".ToUri(),
                AckRequested  = true,
                CorrelationId = Guid.NewGuid().ToString()
            };

            var recordingSender = new RecordingEnvelopeSender();

            new EnvelopeContext(null, original, recordingSender)
            .SendFailureAcknowledgement(original, "you stink");

            theSentEnvelope = recordingSender.Sent.Single();
            theAck          = theSentEnvelope.Message as FailureAcknowledgement;
        }
Example #2
0
        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 EnvelopeContext(null, original, recordingSender)
            .SendFailureAcknowledgement(original, "you stink");

            recordingSender.Outgoing.Any()
            .ShouldBeFalse();
        }