We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebd53ad commit 154e954Copy full SHA for 154e954
1 file changed
Boundaries/Comanda.Payments/Tests/Fixtures/WebApplicationFixture.cs
@@ -53,8 +53,13 @@ public async ValueTask InitializeAsync()
53
if (descriptor is not null)
54
services.Remove(descriptor);
55
56
+ descriptor = services.SingleOrDefault(descriptor => descriptor.ServiceType == typeof(IPaymentGateway));
57
+ if (descriptor is not null)
58
+ services.Remove(descriptor);
59
+
60
services.AddSingleton(_ => _databaseFixture.Client);
61
services.AddSingleton(_ => _databaseFixture.Database);
62
+ services.AddSingleton<IPaymentGateway, PaymentGatewayMock>();
63
});
64
65
0 commit comments