Пример #1
0
 public void Verify_Range() =>
 PropertiesExtractor.Extract(new RangeAttribute(4, 6))
 .Should()
 .HaveCount(2)
 .And
 .Contain("minimum", 4)
 .And
 .Contain("maximum", 6);
Пример #2
0
 public void Verify_FileExtension() =>
 PropertiesExtractor.Extract(new FileExtensionsAttribute()
 {
     Extensions = "jsx"
 })
 .Should()
 .HaveCount(1)
 .And
 .Contain("extensions", "jsx");
Пример #3
0
 public void Verify_StringLength() =>
 PropertiesExtractor.Extract(new StringLengthAttribute(5)
 {
     MinimumLength = 2
 })
 .Should()
 .HaveCount(2)
 .And
 .Contain("minimumLength", 2)
 .And
 .Contain("maximumLength", 5);
Пример #4
0
 public void Verify_EnumData() =>
 PropertiesExtractor.Extract(new EnumDataTypeAttribute(typeof(DataType)))
 .Should()
 .HaveCount(0);
Пример #5
0
 public void Verify_Email() =>
 PropertiesExtractor.Extract(new EmailAddressAttribute())
 .Should()
 .HaveCount(0);
Пример #6
0
 public void Verify_CreditCard() =>
 PropertiesExtractor.Extract(new CreditCardAttribute())
 .Should()
 .HaveCount(0);
Пример #7
0
 public void Verify_RegularExpressions() =>
 PropertiesExtractor.Extract(new RegularExpressionAttribute("pattern"))
 .Should()
 .HaveCount(1)
 .And
 .Contain("pattern", "pattern");
Пример #8
0
 public void Verify_MinLength() =>
 PropertiesExtractor.Extract(new MinLengthAttribute(4))
 .Should()
 .HaveCount(1)
 .And
 .Contain("length", 4);
Пример #9
0
 public void Verify_Compare() =>
 PropertiesExtractor.Extract(new CompareAttribute("TheOther"))
 .Should()
 .HaveCount(1)
 .And
 .Contain("otherProperty", "TheOther");
Пример #10
0
 public void Verify_Url() =>
 PropertiesExtractor.Extract(new UrlAttribute())
 .Should()
 .HaveCount(0);
Пример #11
0
 public void Verify_Required() =>
 PropertiesExtractor.Extract(new RequiredAttribute())
 .Should()
 .HaveCount(0);