I've a method with a string parameter and a bool return value. I want to ensure that it always returns true
I tried
myClass.Foo(A<string>.Ignored)
.WithReturnType<bool>()
.Returns(true);
Now I get the following exception
System.ArgumentException: The specified object is not recognized as a fake object. Result StackTrace: bei FakeItEasy.Core.DefaultFakeManagerAccessor.GetFakeManager(Object proxy) bei FakeItEasy.FakeFacade.GetFakeManager(Object fakedObject) bei FakeItEasy.Configuration.FakeConfigurationManager.CallTo(Object fakeObject) bei FakeItEasy.A.CallTo(Object fake) [...]
What am I doing wrong?