コード例 #1
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, null)
            .SendFailureAcknowledgement(original, "you stink");

            ShouldBeBooleanExtensions.ShouldBeFalse(recordingSender.Outgoing.Any());
        }
コード例 #2
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, null)
            .SendFailureAcknowledgement(original, "you stink");

            theSentEnvelope = recordingSender.Sent.Single();
            theAck          = theSentEnvelope.Message as FailureAcknowledgement;
        }
コード例 #3
0
        public when_sending_a_failure_ack_and_response_is_requested()
        {
            original = new Envelope
            {
                ReplyUri       = "foo://bar".ToUri(),
                AckRequested   = false,
                ReplyRequested = "Message1",
                Id             = Guid.NewGuid()
            };

            var recordingSender = new RecordingEnvelopeSender();


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

            theSentEnvelope = recordingSender.Sent.Single();
            theAck          = theSentEnvelope.Message as FailureAcknowledgement;
        }