public void TestRegistrationNotExist() { int expected = FASTConstant.RETURN_VAL_NOT_FOUND; int actual = _userProcess.RegisterUser(11222222); Assert.AreEqual(expected, actual); }
public ActionResult Register(RegistrationModel registrationModel) { UserProcess userProcessor = new UserProcess(); int result = userProcessor.RegisterUser(registrationModel.EmployeeID); if (result == FASTConstant.RETURN_VAL_SUCCESS) { TempData[FASTConstant.TMPDATA_RESULT] = FASTConstant.SUCCESSFUL; TempData[FASTConstant.TMPDATA_EXTRAMESSAGE] = "An email confirmation will be sent to you. This will contain a random generated initial password. You can change the password inside the user area"; } else { TempData[FASTConstant.TMPDATA_RESULT] = FASTConstant.FAILURE; TempData[FASTConstant.TMPDATA_EXTRAMESSAGE] = "Registration failed. Please try again or contact the AppAdmin."; } TempData[FASTConstant.TMPDATA_SOURCE] = "User Registration"; TempData[FASTConstant.TMPDATA_CONTROLLER] = "Home"; TempData[FASTConstant.TMPDATA_ACTION] = "Index"; return(View("~/Views/Shared/Result.cshtml")); }