Can we create test methods for model properties with model validations.
e.g.
public class PersonAccount
{
[Required]
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
[DataType(DataType.Password)]
[Display(Name = "New password")]
public string NewPassword { get; set; }
}
If yes, then how can we do it, please help me with an example....
And if not, why ?
Please help