Skip to content

Commit d1f0632

Browse files
author
fabien.menager
committed
Refactor GraphTestsBase to use IDbContextFactory for context creation
1 parent b20d8cd commit d1f0632

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/PhenX.EntityFrameworkCore.BulkInsert.Tests/Tests/Graph/GraphTestsBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
namespace PhenX.EntityFrameworkCore.BulkInsert.Tests.Tests.Graph;
1010

11-
public abstract class GraphTestsBase<TDbContext>(TestDbContainer dbContainer) : IAsyncLifetime
11+
public abstract class GraphTestsBase<TDbContext>(IDbContextFactory dbContextFactory) : IAsyncLifetime
1212
where TDbContext : TestDbContext, new()
1313
{
1414
private readonly Guid _run = Guid.NewGuid();
1515
private TDbContext _context = null!;
1616

1717
public async Task InitializeAsync()
1818
{
19-
_context = await dbContainer.CreateContextAsync<TDbContext>("graph");
19+
_context = await dbContextFactory.CreateContextAsync<TDbContext>("graph");
2020
}
2121

2222
public Task DisposeAsync()

0 commit comments

Comments
 (0)