public void RegisterUser_GivenNewUser_RegistrationStatusSuccess() { var user = Substitute.For <IUser>(); user.EmailAddress = "*****@*****.**"; user.Password = "******"; var result = _registrationManager.Register(user); Assert.AreEqual(RegistrationStatus.Success, result); }
/// <summary> /// Register the specified user. /// </summary> /// <returns>The register.</returns> /// <param name="user">User.</param> public RegistrationStatus Register(IUser user) { var registrationResult = _registrationManager.Register(user); if (registrationResult == RegistrationStatus.Success) { _configurationManager.SaveUsersAsync(_registrationManager.Users); } return(registrationResult); }
public ActionResult Register([FromBody] RegisterModel model) { _registrationManager.Register(model); return(Ok()); }