public void LinearBackoffDelayPolicy_BacksOffLinearly()
        {
            TimeSpan minimumDelay = TimeSpan.FromSeconds(2);
            var policy = new LinearBackoffDelayPolicy(minimumDelay);

            Assert.AreEqual(TimeSpan.FromSeconds(2), policy.GetDelay(0));
            Assert.AreEqual(TimeSpan.FromSeconds(4), policy.GetDelay(1));
            Assert.AreEqual(TimeSpan.FromSeconds(6), policy.GetDelay(2));
            Assert.AreEqual(TimeSpan.FromSeconds(8), policy.GetDelay(3));
            Assert.AreEqual(TimeSpan.FromSeconds(10), policy.GetDelay(4));
            Assert.AreEqual(TimeSpan.FromSeconds(12), policy.GetDelay(5));
        }
        public void LinearBackoffDelayPolicy_BacksOffLinearly_UntilReachingMaximumDelay()
        {
            TimeSpan minimumDelay = TimeSpan.FromSeconds(2);
            TimeSpan maximumDelay = TimeSpan.FromSeconds(7);
            var policy = new LinearBackoffDelayPolicy(minimumDelay, maximumDelay);

            Assert.AreEqual(TimeSpan.FromSeconds(2), policy.GetDelay(0));
            Assert.AreEqual(TimeSpan.FromSeconds(4), policy.GetDelay(1));
            Assert.AreEqual(TimeSpan.FromSeconds(6), policy.GetDelay(2));
            Assert.AreEqual(TimeSpan.FromSeconds(7), policy.GetDelay(3));
            Assert.AreEqual(TimeSpan.FromSeconds(7), policy.GetDelay(4));
            Assert.AreEqual(TimeSpan.FromSeconds(7), policy.GetDelay(5));
        }