The specified object is not recognized as a fake object. Issue

c#-4.0, fakeiteasy, nunit, tdd

Solution

This was my own darn mistake, I needed to make the call say:

A.CallTo(() => myService.MyMethod(listOfStringsFilter)).MustHaveHappened();

Problem

I am having an issue where a FakeItEasy call in an extremely simple test is failing with the error "The specified object is not recognized as a fake object." The call is simple: ``` A.CallTo(myService.MyMethod(listOfStringsFilter)).MustHaveHappened(); ``` The fake is similarly simple (A.Fake()), and fakes out an interfance with one method, that takes in a list and returns a list. In debug mode, I see the instance of myService is of type {Fake IMyInterface}. Anyway, this issue is really holding me up, thanks in advance for your help. Update: This was my own darn mistake, I needed to make the call say: ``` A.CallTo(() => myService.MyMethod(listOfStringsFilter)).MustHaveHappened(); ```

Original source