public void ValidateUserCredentials() { //Arrenge var userName = "******"; var password = "******"; var fakeUser = new User { UserId = "1", UserName = userName, Password = password }; A.CallTo(() => amazingTodoRepository.GetUser(userName, password)).Returns(fakeUser); //Act var authenticatedUser = amazingTodoapp.AuthenticateUser(userName, password); //Assert Assert.Equal(userName, authenticatedUser.UserName); }
public User AuthenticateUser(string userName, string password) { currentUser = amazingTodoRepository.GetUser(userName, password); return(currentUser); }