Пример #1
0
            public void ValidationTest_NotMatch_OtherType()
            {
                Person2 person = new Person2()
                {
                    IsCouple = "No"
                };

                var validateResult = person.Validate();

                Assert.IsFalse(validateResult.Any());
            }
Пример #2
0
            public void ValidationTest_Match_OtherType()
            {
                Person2 person = new Person2()
                {
                    IsCouple = "Yes"
                };

                var validateResult = person.Validate();

                Assert.AreEqual(1, validateResult.Count());
                Assert.AreEqual(Person.CoupleNameErrorMessage, validateResult.Single().ErrorMessage);
            }