|
1 | 1 | namespace NHS.CohortManager.Tests.PdsProcessorTests; |
2 | 2 |
|
3 | | -using System.Collections.Concurrent; |
4 | | -using System.Data.Services.Client; |
5 | | -using System.Runtime.CompilerServices; |
6 | 3 | using System.Text.Json; |
7 | 4 | using Common; |
8 | 5 | using DataServices.Client; |
9 | | -using Hl7.Fhir.ElementModel.Types; |
10 | | -using Hl7.Fhir.Model; |
11 | 6 | using Microsoft.Extensions.Logging; |
12 | 7 | using Microsoft.Extensions.Options; |
13 | 8 | using Model; |
@@ -52,7 +47,7 @@ public PdsProcessorTests() |
52 | 47 | } |
53 | 48 |
|
54 | 49 | [TestMethod] |
55 | | - public async System.Threading.Tasks.Task ProcessPdsNotFoundResponse_ProcessesResponse_SendsForDistribution() |
| 50 | + public async Task ProcessPdsNotFoundResponse_ProcessesResponse_SendsForDistribution() |
56 | 51 | { |
57 | 52 | var errorResponse = new PdsErrorResponse() |
58 | 53 | { |
@@ -96,7 +91,7 @@ public async System.Threading.Tasks.Task ProcessPdsNotFoundResponse_ProcessesRes |
96 | 91 | } |
97 | 92 |
|
98 | 93 | [TestMethod] |
99 | | - public async System.Threading.Tasks.Task ProcessPdsNotFoundResponse_ProcessesResponse_Logs404Happened() |
| 94 | + public async Task ProcessPdsNotFoundResponse_WithNonInvalidatedResource_LogsError() |
100 | 95 | { |
101 | 96 | var errorResponse = new PdsErrorResponse() |
102 | 97 | { |
@@ -141,7 +136,7 @@ public async System.Threading.Tasks.Task ProcessPdsNotFoundResponse_ProcessesRes |
141 | 136 |
|
142 | 137 |
|
143 | 138 | [TestMethod] |
144 | | - public async System.Threading.Tasks.Task UpsertDemographicRecordFromPDS_Updatesrecord_true() |
| 139 | + public async Task UpsertDemographicRecordFromPDS_WithExistingRecord_ReturnsTrue() |
145 | 140 | { |
146 | 141 | _dataServiceClient.Setup(x => x.GetSingleByFilter(It.IsAny<System.Linq.Expressions.Expression<Func<ParticipantDemographic, bool>>>())).ReturnsAsync(new ParticipantDemographic() |
147 | 142 | { |
@@ -169,7 +164,7 @@ public async System.Threading.Tasks.Task UpsertDemographicRecordFromPDS_Updatesr |
169 | 164 |
|
170 | 165 |
|
171 | 166 | [TestMethod] |
172 | | - public async System.Threading.Tasks.Task UpsertDemographicRecordFromPDS_AddsNewrecord_true() |
| 167 | + public async Task UpsertDemographicRecordFromPDS_WithNewRecord_ReturnsTrue() |
173 | 168 | { |
174 | 169 | var res = await _pdsProcessor.UpsertDemographicRecordFromPDS(new ParticipantDemographic()); |
175 | 170 |
|
@@ -199,7 +194,7 @@ public async System.Threading.Tasks.Task UpsertDemographicRecordFromPDS_AddsNewr |
199 | 194 | } |
200 | 195 |
|
201 | 196 | [TestMethod] |
202 | | - public async System.Threading.Tasks.Task UpsertDemographicRecordFromPDS_FailsToAddNewRecord_False() |
| 197 | + public async Task UpsertDemographicRecordFromPDS_FailsToAddNewRecord_ReturnsFalse() |
203 | 198 | { |
204 | 199 | _dataServiceClient.Setup(x => x.Add(It.IsAny<ParticipantDemographic>())).ReturnsAsync(false); |
205 | 200 | var res = await _pdsProcessor.UpsertDemographicRecordFromPDS(new ParticipantDemographic()); |
@@ -229,7 +224,7 @@ public async System.Threading.Tasks.Task UpsertDemographicRecordFromPDS_FailsToA |
229 | 224 | } |
230 | 225 |
|
231 | 226 | [TestMethod] |
232 | | - public async System.Threading.Tasks.Task UpsertDemographicRecordFromPDS_UpdateRecordFails_False() |
| 227 | + public async Task UpsertDemographicRecordFromPDS_UpdateRecordFails_ReturnsFalse() |
233 | 228 | { |
234 | 229 | _dataServiceClient.Setup(x => x.GetSingleByFilter(It.IsAny<System.Linq.Expressions.Expression<Func<ParticipantDemographic, bool>>>())).ReturnsAsync(new ParticipantDemographic() |
235 | 230 | { |
|
0 commit comments