1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-26 17:37:36 +01:00
bitwarden-server/test/Core.Test/Services/LicensingServiceTests.cs
2020-01-10 08:47:58 -05:00

50 lines
1.7 KiB
C#

using System;
using Bit.Core.Repositories;
using Bit.Core.Services;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
using NSubstitute;
using Xunit;
namespace Bit.Core.Test.Services
{
public class LicensingServiceTests
{
private readonly LicensingService _sut;
private readonly GlobalSettings _globalSettings;
private readonly IUserRepository _userRepository;
private readonly IOrganizationRepository _organizationRepository;
private readonly IOrganizationUserRepository _organizationUserRepository;
private readonly IWebHostEnvironment _hostingEnvironment;
private readonly ILogger<LicensingService> _logger;
public LicensingServiceTests()
{
_userRepository = Substitute.For<IUserRepository>();
_organizationRepository = Substitute.For<IOrganizationRepository>();
_organizationUserRepository = Substitute.For<IOrganizationUserRepository>();
_hostingEnvironment = Substitute.For<IWebHostEnvironment>();
_logger = Substitute.For<ILogger<LicensingService>>();
_globalSettings = new GlobalSettings();
_sut = new LicensingService(
_userRepository,
_organizationRepository,
_organizationUserRepository,
_hostingEnvironment,
_logger,
_globalSettings
);
}
// Remove this test when we add actual tests. It only proves that
// we've properly constructed the system under test.
[Fact(Skip = "Needs additional work")]
public void ServiceExists()
{
Assert.NotNull(_sut);
}
}
}