From 981b3c2d39cca437440a8e7f36983b995ab8dc8c Mon Sep 17 00:00:00 2001 From: Conor Till Date: Wed, 22 Sep 2021 15:06:49 +0100 Subject: [PATCH] Fixing tests --- .../Orchestrators/WhenGettingTransfers.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/SFA.DAS.EmployerFinance.Web.UnitTests/Orchestrators/WhenGettingTransfers.cs b/src/SFA.DAS.EmployerFinance.Web.UnitTests/Orchestrators/WhenGettingTransfers.cs index 4e02342f50..380d6eda3c 100644 --- a/src/SFA.DAS.EmployerFinance.Web.UnitTests/Orchestrators/WhenGettingTransfers.cs +++ b/src/SFA.DAS.EmployerFinance.Web.UnitTests/Orchestrators/WhenGettingTransfers.cs @@ -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; @@ -18,6 +20,7 @@ namespace SFA.DAS.EmployerFinance.Web.UnitTests.Orchestrators { + [TestFixture] public class WhenGettingTransfers { private TransfersOrchestrator _orchestrator; @@ -25,6 +28,7 @@ public class WhenGettingTransfers private Mock _hashingService; private Mock _maService; private Mock _accountApiClient; + private Mock> _featureTogglesService; private const string HashedAccountId = "123ABC"; private const long AccountId = 1234; @@ -36,10 +40,12 @@ public void Setup() _hashingService = new Mock(); _maService = new Mock(); _accountApiClient = new Mock(); + _featureTogglesService = new Mock>(); _hashingService.Setup(h => h.DecodeValue(HashedAccountId)).Returns(AccountId); + _featureTogglesService.Setup(x => x.GetFeatureToggle(It.IsAny())).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]