Пример #1
0
        public void FinderulesInProperty()
        {
            var model    = new Model3();
            var property = model.GetType().GetProperty(nameof(model.Text));
            var rules    = this.sut.GetRulesForProperty(model.GetType(), property, RuleType.Default);

            Assert.IsNotNull(rules);
            Assert.IsTrue(rules.Any());
        }
Пример #2
0
        public void FinderulesInProperty()
        {
            var model    = new Model3();
            var property = model.GetType().GetProperty(nameof(model.Text));
            var rules    = model.GetType().GetRulesForProperty(property);

            Assert.IsNotNull(rules);
            Assert.IsTrue(rules.Any());
        }