Browse Source

Renamed namespace

Piotr Czajkowski 1 month ago
parent
commit
5d038c1155

+ 1 - 1
ProcessFiles/Interfaces/IDirectory.cs

@@ -1,6 +1,6 @@
 using System.IO;
 
-namespace ProcessFiles.Interfaces
+namespace FileOperations.Interfaces
 {
     public interface IDirectory
     {

+ 1 - 1
ProcessFiles/Interfaces/IFile.cs

@@ -1,6 +1,6 @@
 using System.IO;
 
-namespace ProcessFiles.Interfaces
+namespace FileOperations.Interfaces
 {
     public interface IFile
     {

+ 1 - 1
ProcessFiles/Interfaces/IFileSystem.cs

@@ -1,4 +1,4 @@
-namespace ProcessFiles.Interfaces
+namespace FileOperations.Interfaces
 {
     public interface IFileSystem
     {

+ 1 - 1
ProcessFiles/Interfaces/IPath.cs

@@ -1,4 +1,4 @@
-namespace ProcessFiles.Interfaces
+namespace FileOperations.Interfaces
 {
     public interface IPath
     {

+ 3 - 3
ProcessFiles/Models/DefaultDirectory.cs

@@ -1,7 +1,7 @@
-using ProcessFiles.Interfaces;
-using System.IO;
+using System.IO;
+using FileOperations.Interfaces;
 
-namespace ProcessFiles.Models
+namespace FileOperations.Models
 {
     public class DefaultDirectory : IDirectory
     {

+ 3 - 3
ProcessFiles/Models/DefaultFile.cs

@@ -1,7 +1,7 @@
-using ProcessFiles.Interfaces;
-using System.IO;
+using System.IO;
+using FileOperations.Interfaces;
 
-namespace ProcessFiles.Models
+namespace FileOperations.Models
 {
     public class DefaultFile : IFile
     {

+ 2 - 2
ProcessFiles/Models/DefaultFileSystem.cs

@@ -1,6 +1,6 @@
-using ProcessFiles.Interfaces;
+using FileOperations.Interfaces;
 
-namespace ProcessFiles.Models
+namespace FileOperations.Models
 {
     public class DefaultFileSystem : IFileSystem
     {

+ 3 - 3
ProcessFiles/Models/DefaultPath.cs

@@ -1,7 +1,7 @@
-using ProcessFiles.Interfaces;
-using System.IO;
+using System.IO;
+using FileOperations.Interfaces;
 
-namespace ProcessFiles.Models
+namespace FileOperations.Models
 {
     public class DefaultPath : IPath
     {

+ 1 - 1
ProcessFiles/Models/ResultEnum.cs

@@ -1,4 +1,4 @@
-namespace ProcessFiles.Models
+namespace FileOperations.Models
 {
     public enum Result
     {

+ 4 - 4
ProcessFiles/ProcessFiles.cs

@@ -1,11 +1,11 @@
-using ProcessFiles.Interfaces;
-using ProcessFiles.Models;
-using System;
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
+using FileOperations.Interfaces;
+using FileOperations.Models;
 
-namespace ProcessFiles
+namespace FileOperations
 {
     public class ProcessFiles(IFileSystem? fileSystem = null)
     {

+ 7 - 7
ProcessFilesTests/ProcessFilesTests.cs

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

+ 5 - 5
ProcessFilesTests/ProcessFiles_UnitTests.cs

@@ -1,5 +1,5 @@
 using NSubstitute;
-using ProcessFiles.Interfaces;
+using FileOperations.Interfaces;
 using Xunit;
 
 namespace ProcessFilesTests
@@ -18,7 +18,7 @@ namespace ProcessFilesTests
             var fakeFileSystem = Substitute.For<IFileSystem>();
             fakeFileSystem.File.Exists(Arg.Any<string>()).Returns(false);
 
-            var test = new ProcessFiles.ProcessFiles(fakeFileSystem);
+            var test = new FileOperations.ProcessFiles(fakeFileSystem);
             var errors = test.Process(["./imaginaryFolder/imaginaryTest.txt"], "txt", TestAction);
             Assert.NotEmpty(errors);
             Assert.Empty(result);
@@ -39,7 +39,7 @@ namespace ProcessFilesTests
             fakeFileSystem.File.Exists(Arg.Any<string>()).Returns(true);
             fakeFileSystem.Path.GetExtension(Arg.Any<string>()).Returns(string.Empty);
 
-            var test = new ProcessFiles.ProcessFiles(fakeFileSystem);
+            var test = new FileOperations.ProcessFiles(fakeFileSystem);
             var errors = test.Process(["imaginaryNoExtension"], "abc", TestAction);
             Assert.NotEmpty(errors);
             Assert.Empty(result);
@@ -61,7 +61,7 @@ namespace ProcessFilesTests
             fakeFileSystem.File.Exists(Arg.Any<string>()).Returns(true);
             fakeFileSystem.Path.GetExtension(Arg.Any<string>()).Returns("def");
 
-            var test = new ProcessFiles.ProcessFiles(fakeFileSystem);
+            var test = new FileOperations.ProcessFiles(fakeFileSystem);
             var errors = test.Process(["imaginaryFile"], "abc", TestAction);
             Assert.NotEmpty(errors);
             Assert.Empty(result);
@@ -84,7 +84,7 @@ namespace ProcessFilesTests
             fakeFileSystem.Path.GetExtension(Arg.Any<string>()).Returns("txt");
 
             const string expectedValue = "imaginary.txt";
-            var test = new ProcessFiles.ProcessFiles(fakeFileSystem);
+            var test = new FileOperations.ProcessFiles(fakeFileSystem);
             var errors = test.Process([expectedValue], "txt", TestAction);
             Assert.Empty(errors);
             Assert.Equal(expectedValue, result);