How do you fake a class with FakeItEasy that implements multiple interfaces.
e.g. A class that implements both IFoo and IBar
I've tried the following but it doesn't work
A.Fake<IFoo>(builder => builder.Implements<IBar>());
How do you fake a class with FakeItEasy that implements multiple interfaces.
e.g. A class that implements both IFoo and IBar
I've tried the following but it doesn't work
A.Fake<IFoo>(builder => builder.Implements<IBar>());
Well, it actually works, if do type casting.
A.Fake<IFoo>(...)returnsIFoo, and FakeItEasy simply knows nothing about any aggregate type/interface which would implement bothIFooandIBar, hence manual type casting toIBaris required.produces