Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ConorTill committed Sep 22, 2021
1 parent 3330123 commit 981b3c2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
using System.Threading.Tasks;
using Moq;
using NUnit.Framework;
using SFA.DAS.Authorization.EmployerFeatures.Models;
using SFA.DAS.Authorization.EmployerUserRoles.Options;
using SFA.DAS.Authorization.Features.Services;
using SFA.DAS.Authorization.Services;
using SFA.DAS.EAS.Account.Api.Client;
using SFA.DAS.EAS.Account.Api.Types;
Expand All @@ -18,13 +20,15 @@

namespace SFA.DAS.EmployerFinance.Web.UnitTests.Orchestrators
{
[TestFixture]
public class WhenGettingTransfers
{
private TransfersOrchestrator _orchestrator;
private Mock<IAuthorizationService> _authorisationService;
private Mock<IHashingService> _hashingService;
private Mock<IManageApprenticeshipsService> _maService;
private Mock<IAccountApiClient> _accountApiClient;
private Mock<IFeatureTogglesService<EmployerFeatureToggle>> _featureTogglesService;

private const string HashedAccountId = "123ABC";
private const long AccountId = 1234;
Expand All @@ -36,10 +40,12 @@ public void Setup()
_hashingService = new Mock<IHashingService>();
_maService = new Mock<IManageApprenticeshipsService>();
_accountApiClient = new Mock<IAccountApiClient>();
_featureTogglesService = new Mock<IFeatureTogglesService<EmployerFeatureToggle>>();

_hashingService.Setup(h => h.DecodeValue(HashedAccountId)).Returns(AccountId);
_featureTogglesService.Setup(x => x.GetFeatureToggle(It.IsAny<string>())).Returns(new EmployerFeatureToggle { IsEnabled = true });

_orchestrator = new TransfersOrchestrator(_authorisationService.Object, _hashingService.Object, _maService.Object, _accountApiClient.Object);
_orchestrator = new TransfersOrchestrator(_authorisationService.Object, _hashingService.Object, _maService.Object, _accountApiClient.Object, _featureTogglesService.Object);
}

[Test]
Expand Down

0 comments on commit 981b3c2

Please sign in to comment.