Using engine.For<>() with an Interface.

Jul 3, 2013 at 3:13 PM
engine.For<>() when using it with an interface doesn't seem to work. For instance the example from the documentation works fine with a concrete class, but when I temp the same thing using an Interface it only matches the first rule, unless i place engine.For<>() in front of every .Setup().

                .Setup(p => p.DateOfBirth)
                .Setup(p => p.Name)
                .Setup(p => p.Phone)
Can it it be used in this way? Any thoughts would be appreciated.
Jul 4, 2013 at 5:53 AM
Hi there,

Yes this should work fine... could you post the complete example (the one that doesn't work), and the one that works so I can have a better look please