I am trying to test to see if injected service was used within the service I am testing and wondered if that will be possible at all?
public class MyService
{
private readonly IInjectedService _injectedservice;
public MyService(IInjectedService injectedService1)
{
_injectedservice = injectedService1
}
public string Method1(int value)
{
_injectedservice.Generate();
}
}
I have UnitTest to test MyService class, but I want to determine if the InjectedService was used or ran within the MyService. In my test I am mocking the IInjectedService injectedService1 service to pass through