public string AuthenticationUser(Users user) { string token = null; try { _log4net.Info("In AuthenticationUser method of the service .Repository GenerateToken function is called."); token = _repo.GenerateToken(user); _log4net.Info("Token string is returned to the Controller."); } catch (Exception exception) { _log4net.Error("Exception found while returning the token to controller =" + exception.Message); } return(token); }
public void GenerateTokenRepositoryPositiveTest() { var result = _repository.GenerateToken(user1); Assert.IsNotNull(result); }