public UserCreateRequestValidatorTest() { request = new UserCreateRequest() { Dob = DateTime.Now.ToString(), Email = "*****@*****.**", FirstName = "Test", LastName = "test", Password = "******", PhoneNumber = "12345", UserName = "******" }; validator = new UserCreateRequestValidator(); }
public UserCreateRequestValidatorTest() { _request = new UserCreateRequest() { Dob = DateTime.Now, Email = "*****@*****.**", FirstName = "Test", LastName = "test", Password = "******", PhoneNumber = "12345", UserName = "******" }; var mock = new Mock <IStringLocalizer <UserCreateRequest> >(); var localizedString = new LocalizedString("PhoneNumber", "Phone number is required"); mock.Setup(_ => _["PhoneNumber"]).Returns(localizedString); var localizer = mock.Object; _validator = new UserCreateRequestValidator(localizer); }