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);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public VerifyHeaderIsUnchanged(ReplyToContext context)
 {
     replyToContext = context;
 }
Пример #4
0
 public FakeSender(ISendMessages messageSender, ReplyToContext context, ReadOnlySettings settings)
 {
     this.messageSender = messageSender;
     this.context       = context;
     this.settings      = settings;
 }