I have a test class that is using In Memory DB. So in the constructor we create the db context and pass it to the service constructor so that we can use this service instance in every test case:
private readonly IService _service;
private readonly Context _context;
public MyTestClass() {
_context = CreateContext();
_service = new Service(_context);
}
However, I would like to ignore that constructor setup in one specific test case so that I can populate the context the way I need and instantiate the service with that recently created context for that specific test case. Is it possible?