1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

Update tests

This commit is contained in:
Thomas Rittson
2021-06-28 16:34:34 +10:00
parent fbf5633040
commit 95fd8759de
2 changed files with 11 additions and 2 deletions

View File

@ -30,6 +30,8 @@ namespace Bit.Api.Test.Controllers
private readonly ISsoUserRepository _ssoUserRepository; private readonly ISsoUserRepository _ssoUserRepository;
private readonly IUserRepository _userRepository; private readonly IUserRepository _userRepository;
private readonly IUserService _userService; private readonly IUserService _userService;
private readonly ISendRepository _sendRepository;
private readonly ISendService _sendService;
public AccountsControllerTests() public AccountsControllerTests()
{ {
@ -41,6 +43,8 @@ namespace Bit.Api.Test.Controllers
_organizationUserRepository = Substitute.For<IOrganizationUserRepository>(); _organizationUserRepository = Substitute.For<IOrganizationUserRepository>();
_paymentService = Substitute.For<IPaymentService>(); _paymentService = Substitute.For<IPaymentService>();
_globalSettings = new GlobalSettings(); _globalSettings = new GlobalSettings();
_sendRepository = Substitute.For<ISendRepository>();
_sendService = Substitute.For<ISendService>();
_sut = new AccountsController( _sut = new AccountsController(
_globalSettings, _globalSettings,
_cipherRepository, _cipherRepository,
@ -50,7 +54,9 @@ namespace Bit.Api.Test.Controllers
_paymentService, _paymentService,
_ssoUserRepository, _ssoUserRepository,
_userRepository, _userRepository,
_userService _userService,
_sendRepository,
_sendService
); );
} }

View File

@ -45,6 +45,7 @@ namespace Bit.Core.Test.Services
private readonly CurrentContext _currentContext; private readonly CurrentContext _currentContext;
private readonly GlobalSettings _globalSettings; private readonly GlobalSettings _globalSettings;
private readonly IOrganizationService _organizationService; private readonly IOrganizationService _organizationService;
private readonly ISendRepository _sendRepository;
public UserServiceTests() public UserServiceTests()
{ {
@ -74,6 +75,7 @@ namespace Bit.Core.Test.Services
_currentContext = new CurrentContext(); _currentContext = new CurrentContext();
_globalSettings = new GlobalSettings(); _globalSettings = new GlobalSettings();
_organizationService = Substitute.For<IOrganizationService>(); _organizationService = Substitute.For<IOrganizationService>();
_sendRepository = Substitute.For<ISendRepository>();
_sut = new UserService( _sut = new UserService(
_userRepository, _userRepository,
@ -101,7 +103,8 @@ namespace Bit.Core.Test.Services
_fido2, _fido2,
_currentContext, _currentContext,
_globalSettings, _globalSettings,
_organizationService _organizationService,
_sendRepository
); );
} }