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