|
@@ -39,7 +39,7 @@ namespace ProcessFilesTests
|
|
result = Path.GetFileName(value);
|
|
result = Path.GetFileName(value);
|
|
}
|
|
}
|
|
|
|
|
|
- var test = new ProcessFiles.ProcessFiles();
|
|
|
|
|
|
+ var test = new FileOperations.ProcessFiles();
|
|
var errors = test.Process([TestFolder], "txt", TestAction);
|
|
var errors = test.Process([TestFolder], "txt", TestAction);
|
|
Assert.Empty(errors);
|
|
Assert.Empty(errors);
|
|
Assert.Equal(ExpectedInFolder, result);
|
|
Assert.Equal(ExpectedInFolder, result);
|
|
@@ -59,7 +59,7 @@ namespace ProcessFilesTests
|
|
result.Add(Path.GetFileName(value));
|
|
result.Add(Path.GetFileName(value));
|
|
}
|
|
}
|
|
|
|
|
|
- var test = new ProcessFiles.ProcessFiles();
|
|
|
|
|
|
+ var test = new FileOperations.ProcessFiles();
|
|
var errors = test.Process([TestFolder], "txt", TestAction, true);
|
|
var errors = test.Process([TestFolder], "txt", TestAction, true);
|
|
Assert.Empty(errors);
|
|
Assert.Empty(errors);
|
|
Assert.True(CheckResult(result, expectedInSubFolder));
|
|
Assert.True(CheckResult(result, expectedInSubFolder));
|
|
@@ -74,7 +74,7 @@ namespace ProcessFilesTests
|
|
result.Add(Path.GetFileName(value));
|
|
result.Add(Path.GetFileName(value));
|
|
}
|
|
}
|
|
|
|
|
|
- var test = new ProcessFiles.ProcessFiles();
|
|
|
|
|
|
+ var test = new FileOperations.ProcessFiles();
|
|
var errors = test.Process(["./testFiles/subFolder", TestFile], "txt", TestAction);
|
|
var errors = test.Process(["./testFiles/subFolder", TestFile], "txt", TestAction);
|
|
Assert.Empty(errors);
|
|
Assert.Empty(errors);
|
|
Assert.True(CheckResult(result, expectedInSubFolder));
|
|
Assert.True(CheckResult(result, expectedInSubFolder));
|
|
@@ -89,7 +89,7 @@ namespace ProcessFilesTests
|
|
result = Path.GetFileName(value);
|
|
result = Path.GetFileName(value);
|
|
}
|
|
}
|
|
|
|
|
|
- var test = new ProcessFiles.ProcessFiles();
|
|
|
|
|
|
+ var test = new FileOperations.ProcessFiles();
|
|
var errors = test.Process([TestFile], "txt", TestAction);
|
|
var errors = test.Process([TestFile], "txt", TestAction);
|
|
Assert.Empty(errors);
|
|
Assert.Empty(errors);
|
|
Assert.Equal(ExpectedInFolder, result);
|
|
Assert.Equal(ExpectedInFolder, result);
|
|
@@ -104,7 +104,7 @@ namespace ProcessFilesTests
|
|
result = value;
|
|
result = value;
|
|
}
|
|
}
|
|
|
|
|
|
- var test = new ProcessFiles.ProcessFiles();
|
|
|
|
|
|
+ var test = new FileOperations.ProcessFiles();
|
|
var errors = test.Process(["./testFiles/test.txt"], "txt", TestAction);
|
|
var errors = test.Process(["./testFiles/test.txt"], "txt", TestAction);
|
|
Assert.NotEmpty(errors);
|
|
Assert.NotEmpty(errors);
|
|
Assert.Empty(result);
|
|
Assert.Empty(result);
|
|
@@ -119,7 +119,7 @@ namespace ProcessFilesTests
|
|
result = value;
|
|
result = value;
|
|
}
|
|
}
|
|
|
|
|
|
- var test = new ProcessFiles.ProcessFiles();
|
|
|
|
|
|
+ var test = new FileOperations.ProcessFiles();
|
|
var errors = test.Process([TestFile], "abc", TestAction);
|
|
var errors = test.Process([TestFile], "abc", TestAction);
|
|
Assert.NotEmpty(errors);
|
|
Assert.NotEmpty(errors);
|
|
Assert.Empty(result);
|
|
Assert.Empty(result);
|
|
@@ -134,7 +134,7 @@ namespace ProcessFilesTests
|
|
result.Add(Path.GetFileName(value));
|
|
result.Add(Path.GetFileName(value));
|
|
}
|
|
}
|
|
|
|
|
|
- var test = new ProcessFiles.ProcessFiles();
|
|
|
|
|
|
+ var test = new FileOperations.ProcessFiles();
|
|
var errors = test.Process([TestFolder], ["txt", "json"], TestAction, true);
|
|
var errors = test.Process([TestFolder], ["txt", "json"], TestAction, true);
|
|
Assert.Empty(errors);
|
|
Assert.Empty(errors);
|
|
Assert.True(CheckResult(result, expectedInSubFolderMultipleExtensions));
|
|
Assert.True(CheckResult(result, expectedInSubFolderMultipleExtensions));
|