public static TOwner BeRequired <TOwner>(this IFieldVerificationProvider <string, ValidationMessage <TOwner>, TOwner> should)
     where TOwner : PageObject <TOwner>
 {
     return(should.Equal("This field is required."));
 }
 public static TOwner MustFill <TOwner>(this IFieldVerificationProvider <string, ValidationMessage <TOwner>, TOwner> should)
     where TOwner : PageObject <TOwner>
 {
     return(should.Equal("You must fill this field"));
 }
 public static TOwner HaveMaxLength <TOwner>(this IFieldVerificationProvider <string, ValidationMessage <TOwner>, TOwner> should, int length)
     where TOwner : PageObject <TOwner>
 {
     return(should.Equal($"Please enter no more than {length} characters."));
 }
 public static TOwner HaveIncorrectFormat <TOwner>(this IFieldVerificationProvider <string, ValidationMessage <TOwner>, TOwner> should)
     where TOwner : PageObject <TOwner>
 {
     return(should.Equal("has incorrect format"));
 }
 public static TOwner HaveMaxLength <TOwner>(this IFieldVerificationProvider <string, ValidationMessage <TOwner>, TOwner> should, int length)
     where TOwner : PageObject <TOwner>
 {
     return(should.Equal($"maximum length is {length}"));
 }
Beispiel #6
0
 /// <summary>
 ///   Haves the incorrect format.
 /// </summary>
 /// <typeparam name="TOwner">
 ///   The type of the owner.
 /// </typeparam>
 /// <param name="should">
 ///   The should.
 /// </param>
 /// <returns></returns>
 public static TOwner HaveIncorrectFormat <TOwner>(this IFieldVerificationProvider <string, ValidationMessage <TOwner>, TOwner> should)
     where TOwner : PageObject <TOwner>
 {
     return(should.Equal("The email field must be a valid email."));
 }