Пример #1
0
        public void Ruleset_selection_should_not_cascade_downwards_when_set_on_property()
        {
            var validator = new TestValidator4();
            var result    = validator.Validate(new PersonContainer()
            {
                Person = new Person()
            }, ruleSet: "Names");

            result.IsValid.ShouldBeTrue();
        }
Пример #2
0
        public void Ruleset_selection_should_not_cascade_downwards_when_set_on_property()
        {
            var validator = new TestValidator4();
            var result    = validator.Validate(new PersonContainer()
            {
                Person = new Person()
            }, v => v.IncludeRuleSets("Names"));

            result.IsValid.ShouldBeTrue();
            AssertExecuted(result);
        }
Пример #3
0
        public void Ruleset_selection_should_not_cascade_downwards_when_set_on_property()
        {
            var validator = new TestValidator4();

#pragma warning disable 618
            var result = validator.Validate(new PersonContainer()
            {
                Person = new Person()
            }, ruleSet: "Names");
#pragma warning restore 618
            result.IsValid.ShouldBeTrue();
            AssertExecuted(result);
        }