public void The_header_should_not_be_changed() { var context = new ReplyToContext { ReplyToAddress = "ReplyToAddress@SOMEMACHINE" }; List <FailedMessageView> failedMessages; Define(context) .WithEndpoint <VerifyHeaderEndpoint>() .Done(x => { if (!x.RetryIssued && TryGetMany("/api/errors", out failedMessages)) { x.RetryIssued = true; Post <object>("/api/errors/retry/all"); } return(x.Done); }) .Run(); Assert.AreEqual(context.ReplyToAddress, context.ReceivedReplyToAddress); }
public async Task The_header_should_not_be_changed() { var context = new ReplyToContext { ReplyToAddress = "ReplyToAddress@SOMEMACHINE" }; await Define(context) .WithEndpoint <VerifyHeaderEndpoint>() .Done(async x => { if (!x.RetryIssued && await TryGetMany <FailedMessageView>("/api/errors")) { x.RetryIssued = true; await Post <object>("/api/errors/retry/all"); } return(x.Done); }) .Run(); Assert.AreEqual(context.ReplyToAddress, context.ReceivedReplyToAddress); }
public VerifyHeaderIsUnchanged(ReplyToContext context) { replyToContext = context; }
public FakeSender(ISendMessages messageSender, ReplyToContext context, ReadOnlySettings settings) { this.messageSender = messageSender; this.context = context; this.settings = settings; }