Beispiel #1
0
        public void CloneProducesACopy()
        {
            var retry = new ExponentialRetry(TimeSpan.FromSeconds(1), TimeSpan.FromMilliseconds(2), 123);
            var clone = retry.Clone() as ExponentialRetry;

            Assert.That(clone, Is.Not.Null, "The clone should not be null.");
            Assert.That(ExponentialRetry.HaveSameConfiguration(clone, retry), Is.True, "The clone should be considered equal.");
            Assert.That(clone, Is.Not.SameAs(retry), "The clone should be a copy, not the same instance.");
        }