I thought I should maybe add what I am testing too. I am a bit
confused how to test the part what I am at.

public ActionResult Login(string returnUrl, FormCollection form, bool
rememberMe)
        {
            LoginValidation loginValidation = new LoginValidation();
            try
            {
                UpdateModel(loginValidation, form.ToValueProvider());

            }
            catch
            {

                return View("Login");
            }

            if (ModelState.IsValid == true)
            {

                bool valid = authenticate.VerifyUser
(loginValidation.UserName, loginValidation.Password);

                if (valid == false)
                {
                    ModelState.AddModelError("frm_Login", "Either the
Password or UserName is invalid");

                }
                else if (string.IsNullOrEmpty(returnUrl) == false)
                {
                    /* if the user has been sent away from a page that
requires them to login and they do
                     * login then redirect them back to this area*/
                    return Redirect(returnUrl);
                }
                else
                {

                    FormsAuthentication.RedirectFromLoginPage
(loginValidation.UserName, rememberMe);
                }

            }


            return View("Login");
        }

So I tested my validation through unit tests now I am at this part

  bool valid = authenticate.VerifyUser(loginValidation.UserName,
loginValidation.Password);
 if (valid == false)

So how would I make a mockup that would make sure that valid would be
true?



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/RhinoMocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to