Maybe someone has a better way, but this is what I've done in the past:
[Test]
public void Test()
{
int count = 0;
var mock = MockRepository.GenerateStub<IFoo>();
mock.Stub(o => o.Bar()).WhenCalled(m => count++);
mock.Bar();
mock.Bar();
mock.Bar();
Assert.AreEqual(3, count);
}
On Sat, Sep 26, 2009 at 5:25 AM, kofisarfo <[email protected]> wrote:
>
> Thanks
> Kofi
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---