Skip to content

Commit ff08a98

Browse files
TD-3906 RegisterDelegateByCentreController - refactor (Controller-Service-Repository pattern)
1 parent b37b51b commit ff08a98

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

DigitalLearningSolutions.Web.Tests/Controllers/Register/RegisterDelegateByCentreControllerTests.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
{
33
using System;
44
using System.Reflection;
5-
using DigitalLearningSolutions.Data.DataServices.UserDataService;
65
using DigitalLearningSolutions.Data.Enums;
76
using DigitalLearningSolutions.Data.Exceptions;
87
using DigitalLearningSolutions.Data.Models.Centres;
@@ -37,7 +36,6 @@ public class RegisterDelegateByCentreControllerTests
3736
private IJobGroupsService jobGroupsService = null!;
3837
private PromptsService promptsService = null!;
3938
private IRegistrationService registrationService = null!;
40-
private IUserDataService userDataService = null!;
4139
private IUserService userService = null!;
4240
private IClockUtility clockUtility = null!;
4341
private IMultiPageFormService multiPageFormService = null!;
@@ -47,7 +45,6 @@ public class RegisterDelegateByCentreControllerTests
4745
public void Setup()
4846
{
4947
jobGroupsService = A.Fake<IJobGroupsService>();
50-
userDataService = A.Fake<IUserDataService>();
5148
userService = A.Fake<IUserService>();
5249
promptsService = A.Fake<PromptsService>();
5350
cryptoService = A.Fake<ICryptoService>();
@@ -62,7 +59,6 @@ public void Setup()
6259
jobGroupsService,
6360
promptsService,
6461
cryptoService,
65-
userDataService,
6662
registrationService,
6763
config,
6864
clockUtility,
@@ -145,7 +141,7 @@ public void PersonalInformationPost_updates_tempdata_correctly()
145141
Centre = 1,
146142
};
147143
A.CallTo(
148-
() => userDataService.CentreSpecificEmailIsInUseAtCentre(
144+
() => userService.CentreSpecificEmailIsInUseAtCentre(
149145
model.CentreSpecificEmail!,
150146
model.Centre.Value
151147
)

DigitalLearningSolutions.Web/Controllers/Register/RegisterDelegateByCentreController.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ namespace DigitalLearningSolutions.Web.Controllers.Register
22
{
33
using System;
44
using System.Collections.Generic;
5-
using DigitalLearningSolutions.Data.DataServices;
6-
using DigitalLearningSolutions.Data.DataServices.UserDataService;
75
using DigitalLearningSolutions.Data.Enums;
86
using DigitalLearningSolutions.Data.Exceptions;
97
using DigitalLearningSolutions.Data.Extensions;
@@ -38,7 +36,6 @@ public class RegisterDelegateByCentreController : Controller
3836
private readonly IJobGroupsService jobGroupsService;
3937
private readonly PromptsService promptsService;
4038
private readonly IRegistrationService registrationService;
41-
private readonly IUserDataService userDataService;
4239
private readonly IClockUtility clockUtility;
4340
private readonly IUserService userService;
4441
private readonly IMultiPageFormService multiPageFormService;
@@ -48,7 +45,6 @@ public RegisterDelegateByCentreController(
4845
IJobGroupsService jobGroupsService,
4946
PromptsService promptsService,
5047
ICryptoService cryptoService,
51-
IUserDataService userDataService,
5248
IRegistrationService registrationService,
5349
IConfiguration config,
5450
IClockUtility clockUtility,
@@ -59,7 +55,6 @@ IGroupsService groupsService
5955
{
6056
this.jobGroupsService = jobGroupsService;
6157
this.promptsService = promptsService;
62-
this.userDataService = userDataService;
6358
this.registrationService = registrationService;
6459
this.cryptoService = cryptoService;
6560
this.config = config;

0 commit comments

Comments
 (0)