1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-12 16:48:12 -05:00
bitwarden/test/Core.Test/Services/StripePaymentServiceTests.cs
Addison Beck fee5c932db
started charging sales tax on seat/storage upgrades and auto renewals (#1034)
* started charging sales tax on seat/storage upgrades and auto renewals

* Code review fixes for auto-renewing subscriptions charging sales tax
2020-12-09 14:04:46 -05:00

49 lines
1.6 KiB
C#

using System;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Microsoft.Extensions.Logging;
using NSubstitute;
using Xunit;
namespace Bit.Core.Test.Services
{
public class StripePaymentServiceTests
{
private readonly StripePaymentService _sut;
private readonly ITransactionRepository _transactionRepository;
private readonly IUserRepository _userRepository;
private readonly IAppleIapService _appleIapService;
private readonly GlobalSettings _globalSettings;
private readonly ILogger<StripePaymentService> _logger;
private readonly ITaxRateRepository _taxRateRepository;
public StripePaymentServiceTests()
{
_transactionRepository = Substitute.For<ITransactionRepository>();
_userRepository = Substitute.For<IUserRepository>();
_appleIapService = Substitute.For<IAppleIapService>();
_globalSettings = new GlobalSettings();
_logger = Substitute.For<ILogger<StripePaymentService>>();
_taxRateRepository = Substitute.For<ITaxRateRepository>();
_sut = new StripePaymentService(
_transactionRepository,
_userRepository,
_globalSettings,
_appleIapService,
_logger,
_taxRateRepository
);
}
// Remove this test when we add actual tests. It only proves that
// we've properly constructed the system under test.
[Fact]
public void ServiceExists()
{
Assert.NotNull(_sut);
}
}
}