Skip to content

Commit

Permalink
Fix Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Shvedun committed Jan 3, 2025
1 parent c1c5bc5 commit e009c80
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ protected override MockFileSystem CreateFs() {
public void Execute_CheckTwoNodes_IfNotChanges() {
ILogger logger = Substitute.For<ILogger>();
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
{
Expand All @@ -48,8 +49,9 @@ public void Execute_CheckTwoNodes_IfNotChanges() {
public void Execute_CheckTwoNodes_IfNodesChanged() {
ILogger logger = Substitute.For<ILogger>();
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"
Expand All @@ -63,15 +65,15 @@ public void Execute_CheckTwoNodes_IfNodesChanged() {
public void CompareDirectories_CorrectReturn_IfNotChanges() {
ILogger logger = Substitute.For<ILogger>();
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();
}

[Test, Category("Unit")]
public void CompareDirectories_CorrectReturn_IfNodesChanged() {
ILogger logger = Substitute.For<ILogger>();
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);
}

Expand Down

0 comments on commit e009c80

Please sign in to comment.