Пример #1
0
        public void Given_a_property_rule_with_an_invalid_option_Should_not_be_a_target()
        {
            var rule = new ByPropertyRule {
                Option = "invalid"
            };
            var isTarget = rule.IsTarget(new User("1234"));

            Assert.IsFalse(isTarget);
        }
Пример #2
0
        public void PropertyRuleTestCases(string option, string property, string values, bool expected)
        {
            var rule = new ByPropertyRule {
                Option = option, Property = property, Values = values
            };
            var isTarget = rule.IsTarget(new User("1234")
            {
                { "country", "ES" }
            });

            Assert.AreEqual(expected, isTarget);
        }