To use the standard IoC container inside your Xunit tests, I would recommend to use a separate fixture. Inside this fixture you can add all dependencies to the ServiceCollection and build the ServiceProvider:
Now you can use the IoC container inside your tests by injecting the fixture inside the constructor: