示例#1
0
        public void TestValidateInstanceByProperty()
        {
            Region r = new Region() { Description = new string('a', 101) };

            r.Executing(x => x.Validate().AndThrow()).Throws<SimpleValidationException>();

            new Region() { Description = new string('a', 99) }.Validate().AndThrow();
        }