From e009c8057fd0cf5cea1d5116f0032f53662096ca Mon Sep 17 00:00:00 2001
From: "P.Shvedun"
Date: Fri, 3 Jan 2025 05:08:42 +0200
Subject: [PATCH] Fix Tests
---
.../CheckWebFarmNodeConfigurationsCommand.Tests.cs | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/clio.tests/Command/CheckWebFarmNodeConfigurationsCommand.Tests.cs b/clio.tests/Command/CheckWebFarmNodeConfigurationsCommand.Tests.cs
index 32cecb8..2b3cf6f 100644
--- a/clio.tests/Command/CheckWebFarmNodeConfigurationsCommand.Tests.cs
+++ b/clio.tests/Command/CheckWebFarmNodeConfigurationsCommand.Tests.cs
@@ -33,8 +33,9 @@ protected override MockFileSystem CreateFs() {
public void Execute_CheckTwoNodes_IfNotChanges() {
ILogger logger = Substitute.For();
FileSystem clioFileSystem = new FileSystem(FileSystem);
+ DirectoryComparer directoryComparer = new DirectoryComparer(clioFileSystem, logger);
CheckWebFarmNodeConfigurationsCommand command =
- new CheckWebFarmNodeConfigurationsCommand(logger, clioFileSystem);
+ new CheckWebFarmNodeConfigurationsCommand(logger, clioFileSystem, directoryComparer);
CheckWebFarmNodeConfigurationsOptions options =
new CheckWebFarmNodeConfigurationsOptions
{
@@ -48,8 +49,9 @@ public void Execute_CheckTwoNodes_IfNotChanges() {
public void Execute_CheckTwoNodes_IfNodesChanged() {
ILogger logger = Substitute.For();
FileSystem clioFileSystem = new FileSystem(FileSystem);
+ DirectoryComparer directoryComparer = new DirectoryComparer(clioFileSystem, logger);
CheckWebFarmNodeConfigurationsCommand command =
- new CheckWebFarmNodeConfigurationsCommand(logger, clioFileSystem);
+ new CheckWebFarmNodeConfigurationsCommand(logger, clioFileSystem, directoryComparer);
CheckWebFarmNodeConfigurationsOptions options =
new CheckWebFarmNodeConfigurationsOptions {
Paths = "T:\\Node1-Main,T:\\Node2-Incorrect"
@@ -63,7 +65,7 @@ public void Execute_CheckTwoNodes_IfNodesChanged() {
public void CompareDirectories_CorrectReturn_IfNotChanges() {
ILogger logger = Substitute.For();
FileSystem clioFileSystem = new FileSystem(FileSystem);
- var directoryComparer = new DirectoryComparer(clioFileSystem);
+ var directoryComparer = new DirectoryComparer(clioFileSystem, logger);
directoryComparer.CompareDirectories("T:\\Node1-Main", "T:\\Node3-Correct").Should().BeEmpty();
}
@@ -71,7 +73,7 @@ public void CompareDirectories_CorrectReturn_IfNotChanges() {
public void CompareDirectories_CorrectReturn_IfNodesChanged() {
ILogger logger = Substitute.For();
FileSystem clioFileSystem = new FileSystem(FileSystem);
- var directoryComparer = new DirectoryComparer(clioFileSystem);
+ var directoryComparer = new DirectoryComparer(clioFileSystem, logger);
directoryComparer.CompareDirectories("T:\\Node1-Main", "T:\\Node2-Incorrect").Should().HaveCount(5);
}