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()); }
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; }
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; }