public void CheckExisting_GivenValidUser_RegistrationStatusNewUser() { var user = Substitute.For <IUser>(); user.EmailAddress = "*****@*****.**"; user.Password = "******"; var result = _registrationManager.CheckUserExists(user); Assert.AreEqual(RegistrationStatus.NewUser, result); }
/// <summary> /// Login the specified user. /// </summary> /// <returns>The login.</returns> /// <param name="user">User.</param> public LoginStatus Login(IUser user) { var result = _registrationManager.CheckUserExists(user); if (result == RegistrationStatus.UserExists) { return(_loginManager.Login(user)); } return(LoginStatus.UserDoesNotExist); }