11namespace DigitalLearningSolutions . Web . Tests . Controllers . TrackingSystem . Centre . Dashboard
22{
33 using System . Collections . Generic ;
4- using DigitalLearningSolutions . Data . DataServices ;
54 using DigitalLearningSolutions . Data . Models ;
65 using DigitalLearningSolutions . Web . Controllers . TrackingSystem . Centre . Dashboard ;
76 using DigitalLearningSolutions . Web . Helpers ;
@@ -21,16 +20,16 @@ public class DashboardControllerTests
2120
2221 private DashboardController dashboardController = null ! ;
2322 private IDashboardInformationService dashboardInformationService = null ! ;
24- private ISystemNotificationsDataService systemNotificationsDataService = null ! ;
23+ private ISystemNotificationsService systemNotificationsService = null ! ;
2524
2625 [ SetUp ]
2726 public void Setup ( )
2827 {
2928 dashboardInformationService = A . Fake < IDashboardInformationService > ( ) ;
30- systemNotificationsDataService = A . Fake < ISystemNotificationsDataService > ( ) ;
29+ systemNotificationsService = A . Fake < ISystemNotificationsService > ( ) ;
3130 dashboardController = new DashboardController (
3231 dashboardInformationService ,
33- systemNotificationsDataService
32+ systemNotificationsService
3433 ) . WithMockHttpContext ( httpRequest , response : httpResponse )
3534 . WithMockUser ( true )
3635 . WithMockServices ( )
@@ -41,7 +40,7 @@ public void Setup()
4140 public void Index_redirects_to_Notifications_page_when_unacknowledged_notifications_have_not_been_skipped ( )
4241 {
4342 // Given
44- A . CallTo ( ( ) => systemNotificationsDataService . GetUnacknowledgedSystemNotifications ( A < int > . _ ) )
43+ A . CallTo ( ( ) => systemNotificationsService . GetUnacknowledgedSystemNotifications ( A < int > . _ ) )
4544 . Returns ( new List < SystemNotification > { SystemNotificationTestHelper . GetDefaultSystemNotification ( ) } ) ;
4645
4746 // When
@@ -61,7 +60,7 @@ public void Index_redirects_to_Notifications_page_when_unacknowledged_notificati
6160 public void Index_goes_to_Index_page_when_unacknowledged_notifications_have_been_skipped ( )
6261 {
6362 // Given
64- A . CallTo ( ( ) => systemNotificationsDataService . GetUnacknowledgedSystemNotifications ( A < int > . _ ) )
63+ A . CallTo ( ( ) => systemNotificationsService . GetUnacknowledgedSystemNotifications ( A < int > . _ ) )
6564 . Returns ( new List < SystemNotification > { SystemNotificationTestHelper . GetDefaultSystemNotification ( ) } ) ;
6665 A . CallTo ( ( ) => httpRequest . Cookies ) . Returns (
6766 ControllerContextHelper . SetUpFakeRequestCookieCollection ( SystemNotificationCookieHelper . CookieName , "7" )
@@ -89,7 +88,7 @@ public void Index_goes_to_Index_page_when_unacknowledged_notifications_have_been
8988 public void Index_returns_not_found_when_dashboard_information_is_null ( )
9089 {
9190 // Given
92- A . CallTo ( ( ) => systemNotificationsDataService . GetUnacknowledgedSystemNotifications ( A < int > . _ ) )
91+ A . CallTo ( ( ) => systemNotificationsService . GetUnacknowledgedSystemNotifications ( A < int > . _ ) )
9392 . Returns ( new List < SystemNotification > ( ) ) ;
9493 A . CallTo ( ( ) => dashboardInformationService . GetDashboardInformationForCentre ( A < int > . _ , A < int > . _ ) ) . Returns (
9594 null
@@ -106,7 +105,7 @@ public void Index_returns_not_found_when_dashboard_information_is_null()
106105 public void Index_goes_to_Index_page_when_no_unacknowledged_notifications_exist ( )
107106 {
108107 // Given
109- A . CallTo ( ( ) => systemNotificationsDataService . GetUnacknowledgedSystemNotifications ( A < int > . _ ) )
108+ A . CallTo ( ( ) => systemNotificationsService . GetUnacknowledgedSystemNotifications ( A < int > . _ ) )
110109 . Returns ( new List < SystemNotification > ( ) ) ;
111110 A . CallTo ( ( ) => dashboardInformationService . GetDashboardInformationForCentre ( A < int > . _ , A < int > . _ ) ) . Returns (
112111 new CentreDashboardInformation (
0 commit comments