public async Task Empty() { var policy = new WhiteList <string>(); Assert.IsTrue(await policy.IsAllowedAsync("a")); Assert.IsFalse(await policy.IsNotAllowedAsync("a")); }
public async Task NotAllowed() { var policy = new WhiteList <string>(); policy.Add("a"); policy.Add("b"); Assert.IsFalse(await policy.IsNotAllowedAsync("a")); Assert.IsFalse(await policy.IsNotAllowedAsync("b")); Assert.IsTrue(await policy.IsNotAllowedAsync("c")); Assert.IsTrue(await policy.IsNotAllowedAsync("d")); }