public async Task <bool> IsIdempotentAsync(string method, string path)
 {
     return(await blackListIdempotencyResolver.IsIdempotent(method, path).ConfigureAwait(false) && await iclResolver.IsIdempotentAsync(method, path).ConfigureAwait(false));
 }
Esempio n. 2
0
        public void Should_detect_not_idempotent_methods()
        {
            MockCache(POST, "*");

            blackListIdempotencyResolver.IsIdempotent(GET, empty).GetAwaiter().GetResult().Should().BeTrue();
            blackListIdempotencyResolver.IsIdempotent(GET, foo).GetAwaiter().GetResult().Should().BeTrue();
            blackListIdempotencyResolver.IsIdempotent(GET, foobar).GetAwaiter().GetResult().Should().BeTrue();

            blackListIdempotencyResolver.IsIdempotent(POST, empty).GetAwaiter().GetResult().Should().BeFalse();
            blackListIdempotencyResolver.IsIdempotent(POST, foo).GetAwaiter().GetResult().Should().BeFalse();
            blackListIdempotencyResolver.IsIdempotent(POST, foobar).GetAwaiter().GetResult().Should().BeFalse();
        }
 public bool IsIdempotent(string method, string path)
 {
     return(blackListIdempotencyResolver.IsIdempotent(method, path) && iclResolver.IsIdempotent(method, path));
 }