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('+')); }
public void Without_X() { RuleAssert.For(StringIs.Without('!')) .ExpectNone("", "ABCD", "?@#") .ExpectError(null, "!", "ABCD!"); }
public void Limited_X() { RuleAssert.For(StringIs.Limited(3)) .ExpectNone("", "A", "AA", "AAA") .ExpectError(null, "AAAA"); }