Пример #1
0
        public void The_default_time_out_should_be_1_day()
        {
            TransportMessageHelpers.SetHeader(_message, SecondLevelRetriesHeaders.RetriesTimestamp, DateTimeExtensions.ToWireFormattedString(DateTime.UtcNow.AddDays(-1).AddSeconds(-1)));
            var hasTimedOut = DefaultRetryPolicy.RetryPolicy(_message) == TimeSpan.MinValue;

            Assert.IsTrue(hasTimedOut);
        }
Пример #2
0
        public void The_time_span_should_increase_with_10_sec_for_every_retry()
        {
            for (int i = 0; i < 3; i++)
            {
                var timeSpan = DefaultRetryPolicy.RetryPolicy(_message);

                Defer();

                Assert.AreEqual(_expectedResults[i], timeSpan.Seconds);
            }
        }