I have an Asp.Net Core 6 Web Api application.
I have Integration tests made with WebApplicationFactory<Program> as recommended here. I Inject it in the xUnit test class with IClassFixture<WebAdminTestApplicationFactory<Program>>.
According to the documentation:
If your class owns a field or property, and its type implements IDisposable, the containing class itself should also implement IDisposable. A class that instantiates an IDisposable implementation and storing it as an instance member, is also responsible for its cleanup.
Then why MSDN examples for Integration tests don't dispose WebApplicationFactory which they have as a field?
Shouldn't WebApplicationFactory be disposed? Because it does implement IDisposable.