public void DoesUserExists_RightInput_ExpectDarthMaul() { ConnectionString = "Insert connection string here."; var user = APICollector.ParseUserAsync("Darth Maul"); var expectedResult = AccountManagement.Exists(user); Assert.True(expectedResult); }
public void ParseUserAsync_RightInput_ExpectBlue() { var user = APICollector.ParseUserAsync("Luke Skywalker"); var expectedEyeColor = "blue"; Assert.True(expectedEyeColor == user.EyeColor); //Assert.Equal(expectedEyeColor, user.eyeColor); }
public static User IdentifyWithQuestion(string username, Func <string, string> getSecurityAnswer) { var inputUser = APICollector.ParseUserAsync(username); if (inputUser == null) { return(null); } var(question, answer) = GetSecurityQuestion(inputUser); var inputAnswer = getSecurityAnswer(question); if (inputAnswer.ToLower() == answer.ToLower()) { return(inputUser); } return(null); }