예제 #1
0
        public void Test()
        {
            var i = new
            {
                Value = 10
            };

            ClassUsagePatterns(i, Enumerable.Repeat(i, 4), (p, scope) =>
                               scope.Validate(i.Value, "Value", Is.AtLeast(10)));
            ValueUsagePatterns(1, Range.Create(30), (int1, scope) => { });
            StringUsagePatterns("1", StringIs.Without('+'));
        }
예제 #2
0
 public void Without_X()
 {
     RuleAssert.For(StringIs.Without('!'))
     .ExpectNone("", "ABCD", "?@#")
     .ExpectError(null, "!", "ABCD!");
 }
예제 #3
0
 public void Limited_X()
 {
     RuleAssert.For(StringIs.Limited(3))
     .ExpectNone("", "A", "AA", "AAA")
     .ExpectError(null, "AAAA");
 }