From 783f7ea8e2209a028b6284e9d7dc83dc202f41aa Mon Sep 17 00:00:00 2001 From: Eric Brunner Date: Mon, 16 Dec 2024 12:53:14 +0100 Subject: [PATCH] fix: unit test argument --- .../Features/Create/CreateSnapshotTests.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Applications/ConsumerApi/test/ConsumerApi.Tests.Performance.SnapshotCreator.Tests/Features/Create/CreateSnapshotTests.cs b/Applications/ConsumerApi/test/ConsumerApi.Tests.Performance.SnapshotCreator.Tests/Features/Create/CreateSnapshotTests.cs index f3983426ed..38e67cf143 100644 --- a/Applications/ConsumerApi/test/ConsumerApi.Tests.Performance.SnapshotCreator.Tests/Features/Create/CreateSnapshotTests.cs +++ b/Applications/ConsumerApi/test/ConsumerApi.Tests.Performance.SnapshotCreator.Tests/Features/Create/CreateSnapshotTests.cs @@ -36,7 +36,7 @@ public async Task Handle_ShouldReturnSuccessStatusMessage_WhenPoolConfigurationI { // Arrange var fullFilePath = GetFullFilePath(poolConfigJsonFilename); - var command = new CreateSnapshot.Command("http://baseaddress", "clientId", "clientSecret", fullFilePath, ClearDatabase: false, BackupDatabase: false); + var command = new CreateSnapshot.Command("http://baseaddress", "clientId", "clientSecret", fullFilePath, ClearDatabase: false, BackupDatabase: false, ClearOnly: false); A.CallTo(() => _poolConfigurationJsonReader.Read(command.JsonFilePath)).Returns( new PerformanceTestConfiguration( @@ -82,7 +82,7 @@ public async Task Handle_ShouldReturnFailureStatusMessage_WhenPoolConfigurationI { // Arrange var fullFilePath = GetFullFilePath(poolConfigJsonFilename); - var command = new CreateSnapshot.Command("http://baseaddress", "clientId", "clientSecret", fullFilePath, ClearDatabase: false, BackupDatabase: false); + var command = new CreateSnapshot.Command("http://baseaddress", "clientId", "clientSecret", fullFilePath, ClearDatabase: false, BackupDatabase: false, ClearOnly: false); A.CallTo(() => _poolConfigurationJsonReader.Read(command.JsonFilePath)).Returns(null as PerformanceTestConfiguration); @@ -102,7 +102,8 @@ public async Task Handle_ShouldReturnFailureStatusMessage_WhenPoolConfigurationI public async Task Handle_ShouldReturnFailureStatusMessage_WhenExceptionIsThrown() { // Arrange - var command = new CreateSnapshot.Command("http://baseaddress", "clientId", "clientSecret", GetFullFilePath("pool-config.test.json"), ClearDatabase: false, BackupDatabase: false); + var command = new CreateSnapshot.Command("http://baseaddress", "clientId", "clientSecret", GetFullFilePath("pool-config.test.json"), ClearDatabase: false, BackupDatabase: false, + ClearOnly: false); var expectedException = new Exception("some exception"); A.CallTo(() => _poolConfigurationJsonReader.Read(command.JsonFilePath)).ThrowsAsync(expectedException); @@ -123,7 +124,7 @@ public async Task Handle_ShouldReturnFailureStatusMessage_WhenPoolConfigurationF { // Arrange var fullFilePath = GetFullFilePath("not-existing-pool-config.test.json"); - var command = new CreateSnapshot.Command("http://baseaddress", "clientId", "clientSecret", fullFilePath, ClearDatabase: false, BackupDatabase: false); + var command = new CreateSnapshot.Command("http://baseaddress", "clientId", "clientSecret", fullFilePath, ClearDatabase: false, BackupDatabase: false, ClearOnly: false); // Act var result = await _sut.Handle(command, CancellationToken.None);