public void Should_Be_NonIdempotent_When_NonIdempotentRule(string methodPattern, string pathPattern)
        {
            iclCache.Get()
            .Returns(
                new List <IdempotencyControlRule>(
                    new[]
            {
                new IdempotencyControlRule
                {
                    Method       = methodPattern,
                    IsIdempotent = false,
                    PathPattern  = new Wildcard(pathPattern)
                }
            }));

            iclResolver.IsIdempotent(POST, fooPath).Should().BeFalse();
        }
        public void Should_Be_Idempotent_When_NoRules()
        {
            var iclRulesProvider = Substitute.For <IIclRulesSettingsProvider>();

            iclRulesProvider.Get().Returns(new IdempotencySettings());
            var iclCache = new IclCache(iclRulesProvider);

            var iclResolver = new IclResolver(iclCache);

            iclResolver.IsIdempotent(POST, fooPath).Should().BeTrue();
        }
 public bool IsIdempotent(string method, string path)
 {
     return(blackListIdempotencyResolver.IsIdempotent(method, path) && iclResolver.IsIdempotent(method, path));
 }