1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

Add Stripe Adapter and IBraintreeGateway to DI (#1596)

This commit is contained in:
Oscar Hinton
2021-09-27 23:01:13 +02:00
committed by GitHub
parent 66629b2f1c
commit 63c8070b01
5 changed files with 373 additions and 181 deletions

View File

@ -2,6 +2,7 @@
using Bit.Core.Repositories;
using Bit.Core.Services;
using Bit.Core.Settings;
using Braintree;
using Microsoft.Extensions.Logging;
using NSubstitute;
using Xunit;
@ -18,6 +19,8 @@ namespace Bit.Core.Test.Services
private readonly GlobalSettings _globalSettings;
private readonly ILogger<StripePaymentService> _logger;
private readonly ITaxRateRepository _taxRateRepository;
private readonly IStripeAdapter _stripeAdapter;
private readonly IBraintreeGateway _braintreeGateway;
public StripePaymentServiceTests()
{
@ -27,14 +30,17 @@ namespace Bit.Core.Test.Services
_globalSettings = new GlobalSettings();
_logger = Substitute.For<ILogger<StripePaymentService>>();
_taxRateRepository = Substitute.For<ITaxRateRepository>();
_stripeAdapter = Substitute.For<IStripeAdapter>();
_braintreeGateway = Substitute.For<IBraintreeGateway>();
_sut = new StripePaymentService(
_transactionRepository,
_userRepository,
_globalSettings,
_appleIapService,
_logger,
_taxRateRepository
_taxRateRepository,
_stripeAdapter,
_braintreeGateway
);
}