private void ForgotPassword_Failed()
        {
            Mock <IForgotPasswordRuleEngine> mock = new Mock <IForgotPasswordRuleEngine>();

            forgotPasswordRuleEngine = mock.Object;

            var resetPasswordList = new List <ResetPasswordModel>();

            resetPasswordModel = new ResetPasswordModel
            {
                ResetPasswordID    = 1,
                UserID             = 0,
                Email              = "*****@*****.**",
                Phone              = "3453453455",
                PhoneID            = 1,
                OTPCode            = "345",
                SecurityQuestionID = 1,
                SecurityAnswer     = "gdgdfg",
                NewPassword        = "******",
                RequestorIPAddress = "",
                ExpiresOn          = DateTime.Now
            };
            resetPasswordList.Add(resetPasswordModel);

            var allUsers = new Response <ResetPasswordModel>()
            {
                DataItems   = null,
                RowAffected = 0
            };

            //Get User
            Response <ResetPasswordModel> resetPasswordResponse = new Response <ResetPasswordModel>();

            resetPasswordResponse.DataItems   = resetPasswordList.Where(x => x.UserID.Equals(userID)).ToList();
            resetPasswordResponse.RowAffected = 0;

            //Authenticate
            mock.Setup(r => r.SendResetLink(It.IsAny <string>(), It.IsAny <string>()))
            .Returns(resetPasswordResponse);

            mock.Setup(r => r.VerifySecurityDetails(It.IsAny <ResetPasswordModel>()))
            .Returns(resetPasswordResponse);

            mock.Setup(r => r.VerifyOTP(It.IsAny <ResetPasswordModel>()))
            .Returns(resetPasswordResponse);

            mock.Setup(r => r.ResetPassword(It.IsAny <ResetPasswordModel>()))
            .Returns(resetPasswordResponse);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ForgotPasswordController" /> class.
 /// </summary>
 /// <param name="forgotPasswordRuleEngine">The forgot password rule engine.</param>
 public ForgotPasswordController(IForgotPasswordRuleEngine forgotPasswordRuleEngine)
 {
     this.forgotPasswordRuleEngine = forgotPasswordRuleEngine;
 }