When I use Repeat.Any() it doesn't show any error though I don't call GetMood() Method ,but if i don't use n doesn't call GetMood then it shows Excpetion of type ExpectationViolationException.Can somebody tell me what is the use of repeat.any().
MockRepository mocks = new MockRepository();
IAnimal animal = mocks.DynamicMock<IAnimal>();
using (mocks.Record())
{
//Expect.Call(animal.GetMood()).Return("punit");
Expect.Call(animal.GetMood()).Return("Punit").Repeat.Any();
}
//animal.GetMood();
mocks.ReplayAll();
mocks.VerifyAll();