Skip to content

Commit 4d3be45

Browse files
fix: fixing unit tests after merge
1 parent 5c70525 commit 4d3be45

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

tests/UnitTests/CohortDistributionTests/CreateCohortDistributionTests/CreateCohortDistributionTests.cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,19 @@ public CreateCohortDistributionTests()
7070

7171
_cohortDistributionHelper
7272
.Setup(x => x.ValidateCohortDistributionRecordAsync(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<CohortDistributionParticipant>()))
73-
.ReturnsAsync(new ValidationExceptionLog {CreatedException = false, IsFatal = false});
73+
.ReturnsAsync(new ValidationExceptionLog { CreatedException = false, IsFatal = false });
7474

7575
_participantManagementClientMock
7676
.Setup(x => x.GetSingle(It.IsAny<string>()))
77-
.ReturnsAsync(new ParticipantManagement {ExceptionFlag = 0});
78-
77+
.ReturnsAsync(new ParticipantManagement { ExceptionFlag = 0 });
78+
7979
_participantManagementClientMock
8080
.Setup(x => x.Update(It.IsAny<ParticipantManagement>()))
8181
.ReturnsAsync(true);
8282

8383
_sut = new CreateCohortDistribution(_logger.Object, _callFunction.Object, _cohortDistributionHelper.Object,
8484
_exceptionHandler.Object, _azureQueueStorageHelper.Object,
85-
_participantManagementClientMock.Object);
86-
_config.Object);
85+
_participantManagementClientMock.Object, _config.Object);
8786

8887
}
8988

@@ -158,11 +157,11 @@ public async Task RunAsync_AllocateServiceProviderToParticipantRequestFails_Retu
158157

159158
_participantManagementClientMock
160159
.Setup(c => c.GetSingleByFilter(It.IsAny<Expression<Func<ParticipantManagement, bool>>>()))
161-
.ReturnsAsync(new ParticipantManagement {ExceptionFlag = 0});
162-
160+
.ReturnsAsync(new ParticipantManagement { ExceptionFlag = 0 });
161+
163162
_cohortDistributionHelper
164163
.Setup(x => x.RetrieveParticipantDataAsync(It.IsAny<CreateCohortDistributionRequestBody>()))
165-
.ReturnsAsync(new CohortDistributionParticipant() {ScreeningServiceId = "screeningservice", Postcode = "POSTCODE"});
164+
.ReturnsAsync(new CohortDistributionParticipant() { ScreeningServiceId = "screeningservice", Postcode = "POSTCODE" });
166165

167166
_cohortDistributionHelper
168167
.Setup(x => x.AllocateServiceProviderAsync(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>()))
@@ -203,7 +202,7 @@ public async Task RunAsync_TransformDataServiceRequestFails_ReturnEarly()
203202

204203
_participantManagementClientMock
205204
.Setup(c => c.GetSingleByFilter(It.IsAny<Expression<Func<ParticipantManagement, bool>>>()))
206-
.ReturnsAsync(new ParticipantManagement {ExceptionFlag = 0});
205+
.ReturnsAsync(new ParticipantManagement { ExceptionFlag = 0 });
207206

208207
// Act
209208
await _sut.RunAsync(_requestBody);
@@ -309,7 +308,7 @@ public async Task RunAsync_ParticipantHasException_CreatesSystemExceptionLog()
309308
_callFunction.Setup(x => x.SendPost(It.IsAny<string>(), It.IsAny<string>())).ReturnsAsync(response.Object);
310309
_participantManagementClientMock
311310
.Setup(c => c.GetSingleByFilter(It.IsAny<Expression<Func<ParticipantManagement, bool>>>()))
312-
.ReturnsAsync(new ParticipantManagement() {ExceptionFlag = 1});
311+
.ReturnsAsync(new ParticipantManagement() { ExceptionFlag = 1 });
313312

314313
// Act
315314
await _sut.RunAsync(_requestBody);

0 commit comments

Comments
 (0)