@@ -61,7 +61,7 @@ public async Task Process_NotAvailable_NewReminderNotification_AddedOK()
6161
6262 // Mock correspondence repository
6363 _correspondenceRepositoryMock
64- . Setup ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , false , true , false , It . IsAny < CancellationToken > ( ) ) )
64+ . Setup ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , CorrespondenceSyncType . NotificationEvents , It . IsAny < CancellationToken > ( ) ) )
6565 . ReturnsAsync ( correspondence ) ;
6666 _correspondenceNotificationRepositoryMock
6767 . Setup ( x => x . AddNotification ( It . IsAny < CorrespondenceNotificationEntity > ( ) , It . IsAny < CancellationToken > ( ) ) )
@@ -75,7 +75,7 @@ public async Task Process_NotAvailable_NewReminderNotification_AddedOK()
7575 Assert . Equal ( correspondenceId , result . AsT0 ) ;
7676
7777 // Verify correct calls to Correspondence repository
78- _correspondenceRepositoryMock . Verify ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , false , true , false , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
78+ _correspondenceRepositoryMock . Verify ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , CorrespondenceSyncType . NotificationEvents , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
7979 _correspondenceRepositoryMock . VerifyNoOtherCalls ( ) ;
8080
8181 _correspondenceNotificationRepositoryMock . Verify ( x => x . AddNotification ( It . Is < CorrespondenceNotificationEntity > ( n =>
@@ -119,7 +119,7 @@ public async Task Process_Available_NewReminderNotification_AddedOK()
119119
120120 // Mock correspondence repository
121121 _correspondenceRepositoryMock
122- . Setup ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , false , true , false , It . IsAny < CancellationToken > ( ) ) )
122+ . Setup ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , CorrespondenceSyncType . NotificationEvents , It . IsAny < CancellationToken > ( ) ) )
123123 . ReturnsAsync ( correspondence ) ;
124124 _correspondenceNotificationRepositoryMock
125125 . Setup ( x => x . AddNotification ( It . IsAny < CorrespondenceNotificationEntity > ( ) , It . IsAny < CancellationToken > ( ) ) )
@@ -133,7 +133,7 @@ public async Task Process_Available_NewReminderNotification_AddedOK()
133133 Assert . Equal ( correspondenceId , result . AsT0 ) ;
134134
135135 // Verify correct calls to Correspondence repository
136- _correspondenceRepositoryMock . Verify ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , false , true , false , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
136+ _correspondenceRepositoryMock . Verify ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , CorrespondenceSyncType . NotificationEvents , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
137137 _correspondenceRepositoryMock . VerifyNoOtherCalls ( ) ;
138138
139139 _correspondenceNotificationRepositoryMock . Verify ( x => x . AddNotification ( It . Is < CorrespondenceNotificationEntity > ( n =>
@@ -186,7 +186,7 @@ public async Task Process_NotAvailable_MultipleNewNotifications_AddedOK()
186186
187187 // Mock correspondence repository
188188 _correspondenceRepositoryMock
189- . Setup ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , false , true , false , It . IsAny < CancellationToken > ( ) ) )
189+ . Setup ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , CorrespondenceSyncType . NotificationEvents , It . IsAny < CancellationToken > ( ) ) )
190190 . ReturnsAsync ( correspondence ) ;
191191 _correspondenceNotificationRepositoryMock
192192 . Setup ( x => x . AddNotification ( It . IsAny < CorrespondenceNotificationEntity > ( ) , It . IsAny < CancellationToken > ( ) ) )
@@ -200,7 +200,7 @@ public async Task Process_NotAvailable_MultipleNewNotifications_AddedOK()
200200 Assert . Equal ( correspondenceId , result . AsT0 ) ;
201201
202202 // Verify correct calls to Correspondence repository
203- _correspondenceRepositoryMock . Verify ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , false , true , false , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
203+ _correspondenceRepositoryMock . Verify ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , CorrespondenceSyncType . NotificationEvents , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
204204 _correspondenceRepositoryMock . VerifyNoOtherCalls ( ) ;
205205
206206 _correspondenceNotificationRepositoryMock . Verify ( x => x . AddNotification ( It . Is < CorrespondenceNotificationEntity > ( n =>
@@ -245,7 +245,7 @@ public async Task Process_NotAvailable_DuplicateNotification_NotAdded()
245245
246246 // Mock correspondence repository
247247 _correspondenceRepositoryMock
248- . Setup ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , false , true , false , It . IsAny < CancellationToken > ( ) ) )
248+ . Setup ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , CorrespondenceSyncType . NotificationEvents , It . IsAny < CancellationToken > ( ) ) )
249249 . ReturnsAsync ( correspondence ) ;
250250 _correspondenceNotificationRepositoryMock
251251 . Setup ( x => x . AddNotification ( It . IsAny < CorrespondenceNotificationEntity > ( ) , It . IsAny < CancellationToken > ( ) ) )
@@ -259,7 +259,7 @@ public async Task Process_NotAvailable_DuplicateNotification_NotAdded()
259259 Assert . Equal ( correspondenceId , result . AsT0 ) ;
260260
261261 // Verify correct calls to Correspondence repository
262- _correspondenceRepositoryMock . Verify ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , false , true , false , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
262+ _correspondenceRepositoryMock . Verify ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , CorrespondenceSyncType . NotificationEvents , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
263263 _correspondenceRepositoryMock . VerifyNoOtherCalls ( ) ;
264264 // Verify that no new notification was added
265265 _correspondenceNotificationRepositoryMock . VerifyNoOtherCalls ( ) ;
@@ -300,7 +300,7 @@ public async Task Process_NotAvailable_DuplicateNotificationWithOffset_NotAdded(
300300
301301 // Mock correspondence repository
302302 _correspondenceRepositoryMock
303- . Setup ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , false , true , false , It . IsAny < CancellationToken > ( ) ) )
303+ . Setup ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , CorrespondenceSyncType . NotificationEvents , It . IsAny < CancellationToken > ( ) ) )
304304 . ReturnsAsync ( correspondence ) ;
305305 _correspondenceNotificationRepositoryMock
306306 . Setup ( x => x . AddNotification ( It . IsAny < CorrespondenceNotificationEntity > ( ) , It . IsAny < CancellationToken > ( ) ) )
@@ -314,7 +314,7 @@ public async Task Process_NotAvailable_DuplicateNotificationWithOffset_NotAdded(
314314 Assert . Equal ( correspondenceId , result . AsT0 ) ;
315315
316316 // Verify correct calls to Correspondence repository
317- _correspondenceRepositoryMock . Verify ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , false , true , false , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
317+ _correspondenceRepositoryMock . Verify ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , CorrespondenceSyncType . NotificationEvents , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
318318 _correspondenceRepositoryMock . VerifyNoOtherCalls ( ) ;
319319 // Verify that no new notification was added
320320 _correspondenceNotificationRepositoryMock . VerifyNoOtherCalls ( ) ;
@@ -345,7 +345,7 @@ public async Task Process_CorrespondenceNotFound_ReturnError()
345345
346346 // Mock correspondence repository
347347 _correspondenceRepositoryMock
348- . Setup ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , false , true , false , It . IsAny < CancellationToken > ( ) ) )
348+ . Setup ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , CorrespondenceSyncType . NotificationEvents , It . IsAny < CancellationToken > ( ) ) )
349349 . ReturnsAsync ( ( CorrespondenceEntity ? ) null ) ;
350350
351351 // Act
@@ -356,7 +356,7 @@ public async Task Process_CorrespondenceNotFound_ReturnError()
356356 Assert . Equal ( System . Net . HttpStatusCode . NotFound , result . AsT1 . StatusCode ) ;
357357
358358 // Verify correct calls to Correspondence repository
359- _correspondenceRepositoryMock . Verify ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , false , true , false , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
359+ _correspondenceRepositoryMock . Verify ( x => x . GetCorrespondenceByIdForSync ( correspondenceId , CorrespondenceSyncType . NotificationEvents , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
360360 _correspondenceRepositoryMock . VerifyNoOtherCalls ( ) ;
361361 // Verify that no new notification was added
362362 _correspondenceNotificationRepositoryMock . VerifyNoOtherCalls ( ) ;
0 commit comments