Can anyone help with a simple mock for void methods. I'm been trying all
the suggested examples and still cannot the method to be mock correctly.
Below is the code example:
==================================
public class TimerControl : ITimerControl
{
Public void TimerMethod()
{
Start();
}
}
==================================
I've tried the following and it won't work.
ITimerControl target = MockRepository.GenerateMock<ITimerControl>();
target.AssertWasNotCalled(method=>Method.TimerMethod());
============ this did not do nothing, it did not hit the TimerMethod.
And the tried the following also:
ITimerControl mock = MockRepository.GenerateMock<ITimerControl>();
Expect.Call( mock.TimerMethod);
=========== no success.
I'm new to Unit testing and tried very hard to find tutorials on Rhino Mock
and read the documentation, but I'm still a noob in rhino mock and unit
testing. Any help with this simple mock?
-EJ
--
You received this message because you are subscribed to the Google Groups
"Rhino.Mocks" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rhinomocks/-/AUuQUe42OO4J.
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.