Exemple #1
0
        public void Fluently_assigning_retry_exception_types_returns_configuration()
        {
            var sut = new FakeWorkflowConfiguration();

            var result = sut.WithGlobalRetryBehavior(3, TimeSpan.FromSeconds(5), typeof(Exception));

            Assert.Equal(sut, result);
        }
Exemple #2
0
        public void You_can_fluently_assign_retry_behavior()
        {
            var sut = new FakeWorkflowConfiguration();

            sut.WithGlobalRetryBehavior(3, TimeSpan.FromSeconds(5), typeof(Exception));

            Assert.Equal(3, sut.TimesToRetry);
            Assert.Equal(TimeSpan.FromSeconds(5), sut.RetryDelay);
            Assert.Equal(1, sut.RetryExceptionTypes.Count);
            Assert.Equal(typeof(Exception), sut.RetryExceptionTypes[0]);
        }
Exemple #3
0
        public void You_cannot_assign_a_retry_exception_type_that_is_not_an_exception_type()
        {
            var sut = new FakeWorkflowConfiguration();

            Assert.Throws <ArgumentException>(() => sut.WithGlobalRetryBehavior(3, TimeSpan.FromSeconds(5), typeof(object)));
        }