private static ResultModel Authenticate(string login, string password) { var userAppService = new UserAppService(); var authResult = userAppService.AuthenticateUser(login, password); return(authResult); }
public void AuthenticateUserTest_DadosInvalidos() { string login = string.Empty; string password = string.Empty; var userAppService = new UserAppService(); var authResult = (ResultModelSingle <User>)userAppService.AuthenticateUser(login, password); Assert.IsFalse(authResult.IsSuccess); Assert.IsNull(authResult.ResultObject); }
public void AuthenticateUserTest_DadosValidos() { string login = "******"; string password = "******"; var userAppService = new UserAppService(); var authResult = (ResultModelSingle <User>)userAppService.AuthenticateUser(login, password); Assert.IsNotNull(authResult); Assert.IsTrue(authResult.ResultObject.Id > 0); Assert.AreEqual(authResult.ResultObject.Login, login); }