public void WildcardLevelIsMatched() { var rules = new[] { new DocumentTypeExpiryRule() { Alias = "example", Level = null } }; var matcher = new DocumentTypeRuleMatcher(rules); var result = matcher.MatchRule("example", 2); Assert.IsNotNull(result); }
public void AliasIsMatched() { var rules = new[] { new DocumentTypeExpiryRule() { Alias = "example" } }; var matcher = new DocumentTypeRuleMatcher(rules); var result = matcher.MatchRule("example", null); Assert.IsNotNull(result); }
public void DifferentLevelIsNotMatched() { var rules = new[] { new DocumentTypeExpiryRule() { Alias = "example", Level = 2 } }; var matcher = new DocumentTypeRuleMatcher(rules); var result = matcher.MatchRule("example", 3); Assert.IsNull(result); }