예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }