Hi
I'm really new to Rhino Mocks and am having some real trouble getting
my head around the following problem
We are building an MVP site and are using Rhino to mock our View
implementation. I am currently trying to test that a login control
correctly attempts to validate a user. So I have set up my test as
follows
using (mocks.Record())
{
Expect.Call(Presenter.View.Username).Return("[email protected]");
Expect.Call(Presenter.View.Password).Return("password1");
Expect.Call(Presenter.ValidateUser()).Return(false);
}
using (mocks.Playback())
{
//Playback
Presenter.SubmitLogin();
}
I get the following error
System.InvalidOperationException: Previous method
'ILoginBoxView.get_Username();' requires a return value or an
exception to throw.
But I don't really get what it's trying to tell me.
in psuedo-code, I'm trying to say I expect the View to call Username
and Password and return the specified values and I expect that
Presenter.ValidateUser() will be called and I want it to return false.
Can anyone help me clear up what's I'm doing wrong here?
Thanks
Dave
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---