Hi!
Please consider the case when the method I want to test looks like this:
public class Foo {
public void TestMe(<arg list>)
{
[business logic omitted...]
Helper hlp = new Helper();
bool wasHelped = hlp.HelpMe(<arg list>);
[business logic omitted...]
}
}
Since the object "hlp" is initialized within the method that's to be tested, as opposed to being instantiated by the test method, will JustMock allow mocking the (non-virtual, non-static) method "Helper.HelpMe" such that the above call to "HelpMe" is re-routed to the mocked implementation? If so, what would be the syntax for doing this?
Please consider the case when the method I want to test looks like this:
public class Foo {
public void TestMe(<arg list>)
{
[business logic omitted...]
Helper hlp = new Helper();
bool wasHelped = hlp.HelpMe(<arg list>);
[business logic omitted...]
}
}
Since the object "hlp" is initialized within the method that's to be tested, as opposed to being instantiated by the test method, will JustMock allow mocking the (non-virtual, non-static) method "Helper.HelpMe" such that the above call to "HelpMe" is re-routed to the mocked implementation? If so, what would be the syntax for doing this?