public void DateTimeMatcher(RolloutStrategyAttributeConditional conditional, List <object> vals, string suppliedVal, bool matches) { var rsa = new RolloutStrategyAttribute(); rsa.Conditional = conditional; rsa.Values = vals.Select(v => v as object).ToList(); rsa.Type = RolloutStrategyFieldType.DATETIME; Assert.AreEqual(matches, registry.FindMatcher(rsa).Match(suppliedVal, rsa)); }
public void BooleanMatcher(RolloutStrategyAttributeConditional conditional, List <object> vals, string suppliedVal, bool matches) { var rsa = new RolloutStrategyAttribute(); rsa.Conditional = conditional; rsa.Type = RolloutStrategyFieldType.BOOLEAN; rsa.Values = vals.Select(v => v as object).ToList(); Assert.AreEqual(registry.FindMatcher(rsa).Match(suppliedVal?.ToString(), rsa), matches); }
public void SemanticVersionMatcher(RolloutStrategyAttributeConditional conditional, List <object> vals, string suppliedVal, bool matches) { var rsa = new RolloutStrategyAttribute(); rsa.Conditional = conditional; rsa.Values = vals.Select(v => v as object).ToList(); rsa.Type = RolloutStrategyFieldType.SEMANTICVERSION; Assert.AreEqual(registry.FindMatcher(rsa).Match(suppliedVal, rsa), matches); }