Пример #1
0
 public void TearDown()
 {
     // It's important to dispose a WebApplicationFactory
     // so that it properly shuts down the in memory server after
     // each test. Otherwise it can leak memory and processes.
     _factory.Dispose();
 }
        public void OneTimeTearDown()
        {
            using var scope = _factory.Services.CreateScope();
            var dbContext = scope.ServiceProvider.GetRequiredService <ApplicationDbContext>();

            dbContext.Database.EnsureDeleted();

            _client.Dispose();
            _factory.Dispose();
        }
Пример #3
0
 public void Dispose()
 {
     _factory.Dispose();
 }
 //Tests...
 public void Dispose() {
     _scope.Dispose();
     _factory.Dispose();
     //Dispose and cleanup anything else...
 }
Пример #5
0
 public void Dispose()
 {
     _factory?.Dispose();
     _client?.Dispose();
 }
Пример #6
0
 public void Cleanup() => _factory.Dispose();