Skip to content

Commit 51acdc8

Browse files
committed
TD-3938-Contrller refactor -DataService reference removed from the controller.
1 parent 89903c5 commit 51acdc8

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

DigitalLearningSolutions.Web.Tests/Controllers/TrackingSystem/Delegates/EmailDelegatesControllerTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
namespace DigitalLearningSolutions.Web.Tests.Controllers.TrackingSystem.Delegates
22
{
33
using System.Collections.Generic;
4-
using DigitalLearningSolutions.Data.DataServices;
4+
//using DigitalLearningSolutions.Data.DataServices;
55
using DigitalLearningSolutions.Data.Models.SearchSortFilterPaginate;
66
using DigitalLearningSolutions.Data.Models.User;
7-
7+
88
using DigitalLearningSolutions.Data.Utilities;
99
using DigitalLearningSolutions.Web.Controllers.TrackingSystem.Delegates;
1010
using DigitalLearningSolutions.Web.Helpers;
@@ -24,7 +24,7 @@ public class EmailDelegatesControllerTests
2424
private EmailDelegatesController emailDelegatesController = null!;
2525
private HttpRequest httpRequest = null!;
2626
private HttpResponse httpResponse = null!;
27-
private IJobGroupsDataService jobGroupsDataService = null!;
27+
private IJobGroupsService jobGroupsService = null!;
2828
private IPasswordResetService passwordResetService = null!;
2929
private PromptsService promptsHelper = null!;
3030
private ISearchSortFilterPaginateService searchSortFilterPaginateService = null!;
@@ -38,7 +38,7 @@ public void Setup()
3838
centreRegistrationPromptsService = A.Fake<ICentreRegistrationPromptsService>();
3939
promptsHelper = new PromptsService(centreRegistrationPromptsService);
4040
userService = A.Fake<IUserService>();
41-
jobGroupsDataService = A.Fake<IJobGroupsDataService>();
41+
jobGroupsService = A.Fake<IJobGroupsService>();
4242
passwordResetService = A.Fake<IPasswordResetService>();
4343
searchSortFilterPaginateService = A.Fake<ISearchSortFilterPaginateService>();
4444
config = A.Fake<IConfiguration>();
@@ -51,7 +51,7 @@ public void Setup()
5151

5252
emailDelegatesController = new EmailDelegatesController(
5353
promptsHelper,
54-
jobGroupsDataService,
54+
jobGroupsService,
5555
passwordResetService,
5656
userService,
5757
searchSortFilterPaginateService,

DigitalLearningSolutions.Web/Controllers/TrackingSystem/Delegates/EmailDelegatesController.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace DigitalLearningSolutions.Web.Controllers.TrackingSystem.Delegates
33
using System;
44
using System.Collections.Generic;
55
using System.Linq;
6-
using DigitalLearningSolutions.Data.DataServices;
6+
//using DigitalLearningSolutions.Data.DataServices;
77
using DigitalLearningSolutions.Data.Enums;
88
using DigitalLearningSolutions.Data.Extensions;
99
using DigitalLearningSolutions.Data.Helpers;
@@ -29,7 +29,7 @@ public class EmailDelegatesController : Controller
2929
{
3030
private const string EmailDelegateFilterCookieName = "EmailDelegateFilter";
3131
private readonly PromptsService promptsService;
32-
private readonly IJobGroupsDataService jobGroupsDataService;
32+
private readonly IJobGroupsService jobGroupsService;
3333
private readonly IPasswordResetService passwordResetService;
3434
private readonly IUserService userService;
3535
private readonly ISearchSortFilterPaginateService searchSortFilterPaginateService;
@@ -38,7 +38,7 @@ public class EmailDelegatesController : Controller
3838

3939
public EmailDelegatesController(
4040
PromptsService promptsService,
41-
IJobGroupsDataService jobGroupsDataService,
41+
IJobGroupsService jobGroupsService,
4242
IPasswordResetService passwordResetService,
4343
IUserService userService,
4444
ISearchSortFilterPaginateService searchSortFilterPaginateService,
@@ -47,7 +47,7 @@ IClockUtility clockUtility
4747
)
4848
{
4949
this.promptsService = promptsService;
50-
this.jobGroupsDataService = jobGroupsDataService;
50+
this.jobGroupsService = jobGroupsService;
5151
this.passwordResetService = passwordResetService;
5252
this.userService = userService;
5353
this.searchSortFilterPaginateService = searchSortFilterPaginateService;
@@ -70,7 +70,7 @@ public IActionResult Index(
7070
Request,
7171
EmailDelegateFilterCookieName
7272
);
73-
var jobGroups = jobGroupsDataService.GetJobGroupsAlphabetical();
73+
var jobGroups = jobGroupsService.GetJobGroupsAlphabetical();
7474
var customPrompts = promptsService.GetCentreRegistrationPrompts(User.GetCentreIdKnownNotNull());
7575
var delegateUsers = GetDelegateUserCards();
7676

@@ -123,7 +123,7 @@ public IActionResult Index(
123123
Request,
124124
EmailDelegateFilterCookieName
125125
);
126-
var jobGroups = jobGroupsDataService.GetJobGroupsAlphabetical();
126+
var jobGroups = jobGroupsService.GetJobGroupsAlphabetical();
127127
var customPrompts = promptsService.GetCentreRegistrationPrompts(User.GetCentreIdKnownNotNull());
128128

129129
var promptsWithOptions = customPrompts.Where(customPrompt => customPrompt.Options.Count > 0);
@@ -167,7 +167,7 @@ public IActionResult Index(
167167
[Route("AllEmailDelegateItems")]
168168
public IActionResult AllEmailDelegateItems(IEnumerable<int> selectedIds)
169169
{
170-
var jobGroups = jobGroupsDataService.GetJobGroupsAlphabetical();
170+
var jobGroups = jobGroupsService.GetJobGroupsAlphabetical();
171171
var customPrompts = promptsService.GetCentreRegistrationPrompts(User.GetCentreIdKnownNotNull());
172172
var delegateUsers = GetDelegateUserCards();
173173

0 commit comments

Comments
 (0)