コード例 #1
0
        public void OnError_ErrorPolicyBuildAction_ErrorPolicySet()
        {
            var builder = new TestConsumerEndpointBuilder();

            var endpoint = builder.OnError(errorPolicy => errorPolicy.Retry(5).ThenSkip()).Build();

            endpoint.ErrorPolicy.Should().BeOfType <ErrorPolicyChain>();
        }
コード例 #2
0
        public void OnError_ErrorPolicy_ErrorPolicySet()
        {
            var builder     = new TestConsumerEndpointBuilder();
            var errorPolicy = new RetryErrorPolicy();

            var endpoint = builder.OnError(errorPolicy).Build();

            endpoint.ErrorPolicy.Should().BeSameAs(errorPolicy);
        }