Skip to content

Commit 292f344

Browse files
committed
Fix tests to reference OtherDbContext instead of DefaultDbContext for "other" keyed services in ServiceCollection tests.
1 parent 5dce6c0 commit 292f344

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/Tests.CodeOfChaos.Types.UnitOfWork/ServiceCollectionTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public async Task AddUnitOfWork_ShouldRegister_UnitOfWorkServices_WithKeyedServi
5454
// Act
5555
var defaultUnitOfWorkFactory = provider.GetKeyedService<IUnitOfWorkFactory<DefaultDbContext>>("default");
5656
var defaultUnitOfWork = provider.GetKeyedService<IUnitOfWork<DefaultDbContext>>("default");
57-
var otherUnitOfWorkFactory = provider.GetKeyedService<IUnitOfWorkFactory<DefaultDbContext>>("other");
58-
var otherUnitOfWork = provider.GetKeyedService<IUnitOfWork<DefaultDbContext>>("other");
57+
var otherUnitOfWorkFactory = provider.GetKeyedService<IUnitOfWorkFactory<OtherDbContext>>("other");
58+
var otherUnitOfWork = provider.GetKeyedService<IUnitOfWork<OtherDbContext>>("other");
5959

6060
// Assert
6161
await Assert.That(defaultUnitOfWorkFactory).IsNotNull()
@@ -101,8 +101,8 @@ public async Task AddReadonlyUnitOfWork_ShouldRegister_ReadonlyUnitOfWorkService
101101
// Act
102102
var defaultReadonlyUnitOfWorkFactory = provider.GetKeyedService<IReadonlyUnitOfWorkFactory<DefaultDbContext>>("default");
103103
var defaultReadonlyUnitOfWork = provider.GetKeyedService<IReadonlyUnitOfWork<DefaultDbContext>>("default");
104-
var otherReadonlyUnitOfWorkFactory = provider.GetKeyedService<IReadonlyUnitOfWorkFactory<DefaultDbContext>>("other");
105-
var otherReadonlyUnitOfWork = provider.GetKeyedService<IReadonlyUnitOfWork<DefaultDbContext>>("other");
104+
var otherReadonlyUnitOfWorkFactory = provider.GetKeyedService<IReadonlyUnitOfWorkFactory<OtherDbContext>>("other");
105+
var otherReadonlyUnitOfWork = provider.GetKeyedService<IReadonlyUnitOfWork<OtherDbContext>>("other");
106106

107107
// Assert
108108
await Assert.That(defaultReadonlyUnitOfWorkFactory).IsNotNull()

0 commit comments

Comments
 (0)