public void ShouldReturnSuccessMessageOnUserAccountCreation() { var accountCreator = new UserAccountCreator(); var result = accountCreator.CreateUser("ValidUser", "Abc123456"); Assert.That(result, Is.EqualTo("Account Created Successfuly")); }
public void ShouldReturnFailureMessageWhenInvalidPassword() { var accountCreator = new UserAccountCreator(); var result = accountCreator.CreateUser("ValidUser", "Abc123"); Assert.That(result, Is.EqualTo("Account Creation Failed")); }
public void ShouldNotIncreaseTheUserCountInListOnUserCreationFailure() { var userCreator = new UserAccountCreator(); userCreator.CreateUser("InvalidUser123", "1234"); Assert.AreEqual(0, userCreator.Users.Count); }
public void ShouldIncreaseTheUserCountInListOnUserCreation() { var userCreator = new UserAccountCreator(); userCreator.CreateUser("ValidUser", "Abc123456"); Assert.AreEqual(1, userCreator.Users.Count); }
public void ShouldReturnFailureMessageOnIncorrectPassword() { var userCreator = new UserAccountCreator(); userCreator.CreateUser(validUser_, validPassword_); var loginHelper = new LoginHelper(userCreator); var result = loginHelper.Login(validUser_, "WrongPassword"); Assert.AreEqual("Login Failed", result); }
public void ShouldReturnSuccessMessageOnSuccessfulLogin() { var accountCreator = new UserAccountCreator(); accountCreator.CreateUser(validUser_, validPassword_); var loginHelper = new LoginHelper(accountCreator); var result = loginHelper.Login(validUser_, validPassword_); Assert.AreEqual("Login Successful", result); }
public void UserListShouldNotBeNullEvenIfNoUserCreated() { var userCreator = new UserAccountCreator(); Assert.IsNotNull(userCreator.Users); }