Thanks again for the suggestion. However, in JustMock we have a feature called partial mocking and it is also possible to ignore instance for a specific setup.
Therefore, I can easily do :
var helper =
Mock.Arrange(() => helper.HelpMe(Arg.AnyInt)).Returns(
Here the TestMe
method looks like:
Helper hlp =
wasHelped = hlp.HelpMe(arg1);
Therefore, you can easily mock a method without ever passing the dependency.
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>