diff --git a/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/BusinessLogicTests/Services/ScopeBusinessLogic/FillMissingScopesTests.cs b/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/BusinessLogicTests/Services/ScopeBusinessLogic/FillMissingScopesTests.cs index 775ea8b2f..b0a9cb912 100644 --- a/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/BusinessLogicTests/Services/ScopeBusinessLogic/FillMissingScopesTests.cs +++ b/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/BusinessLogicTests/Services/ScopeBusinessLogic/FillMissingScopesTests.cs @@ -31,7 +31,7 @@ public void BeforeEach() private Mock mockDataRepository; // sut - private IScopeBusinessLogic scopeBusinessLogic; + private WebUI.BusinessLogic.Services.ScopeBusinessLogic scopeBusinessLogic; [TestCase(SectorTypes.Private)] [TestCase(SectorTypes.Public)] diff --git a/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/BusinessLogicTests/Services/ScopeBusinessLogic/FindOrgsWhereScopeNotSetTests.cs b/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/BusinessLogicTests/Services/ScopeBusinessLogic/FindOrgsWhereScopeNotSetTests.cs index 0c395ab90..bd3256463 100644 --- a/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/BusinessLogicTests/Services/ScopeBusinessLogic/FindOrgsWhereScopeNotSetTests.cs +++ b/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/BusinessLogicTests/Services/ScopeBusinessLogic/FindOrgsWhereScopeNotSetTests.cs @@ -49,7 +49,7 @@ public void BeforeEach() private List testOrgs; // sut - private IScopeBusinessLogic scopeBusinessLogic; + private WebUI.BusinessLogic.Services.ScopeBusinessLogic scopeBusinessLogic; [TestCase(1)] [TestCase(2)] diff --git a/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/Services/ScopeBusinessLogicTests.cs b/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/Services/ScopeBusinessLogicTests.cs index 7669c2fdc..de453d405 100644 --- a/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/Services/ScopeBusinessLogicTests.cs +++ b/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/Services/ScopeBusinessLogicTests.cs @@ -24,7 +24,7 @@ public class ScopeBusinessLogicTests : AssertionHelper private IList testOrgData; private IList testOrgScopeData; - public IScopeBusinessLogic testScopeBL; + public ScopeBusinessLogic testScopeBL; #region Test Data diff --git a/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/TestHelpers/UiTestHelpers.cs b/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/TestHelpers/UiTestHelpers.cs index 393dfd8bf..f4dc53b0b 100644 --- a/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/TestHelpers/UiTestHelpers.cs +++ b/GenderPayGap.UnitTests/GenderPayGap.WebUI.Tests/TestHelpers/UiTestHelpers.cs @@ -200,13 +200,7 @@ public static IContainer BuildContainerIoC(params object[] dbObjects) builder.RegisterInstance(Config.Configuration); builder.RegisterType().As().InstancePerLifetimeScope(); - builder.Register( - c => c.ResolveAsMock( - false, - typeof(IDataRepository)) - .Object) - .As() - .InstancePerLifetimeScope(); + builder.RegisterType().As().SingleInstance(); builder.Register(g => new MockGovNotify()).As().SingleInstance(); diff --git a/GenderPayGap.WebUI/BackgroundJobs/ScheduledJobs/SetPresumedScopesJob.cs b/GenderPayGap.WebUI/BackgroundJobs/ScheduledJobs/SetPresumedScopesJob.cs index c1ebaf682..43c6ea29f 100644 --- a/GenderPayGap.WebUI/BackgroundJobs/ScheduledJobs/SetPresumedScopesJob.cs +++ b/GenderPayGap.WebUI/BackgroundJobs/ScheduledJobs/SetPresumedScopesJob.cs @@ -5,10 +5,10 @@ namespace GenderPayGap.WebUI.BackgroundJobs.ScheduledJobs public class SetPresumedScopesJob { - private readonly IScopeBusinessLogic scopeBusinessLogic; + private readonly ScopeBusinessLogic scopeBusinessLogic; public SetPresumedScopesJob( - IScopeBusinessLogic scopeBusinessLogic) + ScopeBusinessLogic scopeBusinessLogic) { this.scopeBusinessLogic = scopeBusinessLogic; } diff --git a/GenderPayGap.WebUI/BusinessLogic/Services/ScopeBusinessLogic.cs b/GenderPayGap.WebUI/BusinessLogic/Services/ScopeBusinessLogic.cs index 2908fd15b..868d9e703 100644 --- a/GenderPayGap.WebUI/BusinessLogic/Services/ScopeBusinessLogic.cs +++ b/GenderPayGap.WebUI/BusinessLogic/Services/ScopeBusinessLogic.cs @@ -10,21 +10,7 @@ namespace GenderPayGap.WebUI.BusinessLogic.Services { - public interface IScopeBusinessLogic - { - - OrganisationScope GetLatestScopeBySnapshotYear(long organisationId, int snapshotYear = 0); - - void SetPresumedScopes(); - - HashSet FindOrgsWhereScopeNotSet(); - bool FillMissingScopes(Organisation org); - - void SetScopeStatuses(); - - } - - public class ScopeBusinessLogic : IScopeBusinessLogic + public class ScopeBusinessLogic { public ScopeBusinessLogic(IDataRepository dataRepo) diff --git a/GenderPayGap.WebUI/Startup.cs b/GenderPayGap.WebUI/Startup.cs index 0fe4e3d3a..48f43a474 100644 --- a/GenderPayGap.WebUI/Startup.cs +++ b/GenderPayGap.WebUI/Startup.cs @@ -197,7 +197,7 @@ public IContainer BuildContainerIoC(IServiceCollection services) builder.RegisterType().As().InstancePerLifetimeScope(); builder.RegisterType().As().InstancePerLifetimeScope(); - builder.RegisterType().As().InstancePerLifetimeScope(); + builder.RegisterType().As().InstancePerLifetimeScope(); builder.RegisterType().As().InstancePerLifetimeScope();