From f839de2f7839463f1881731f99dac86771b49d92 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 4 Jan 2026 03:33:57 +0000 Subject: [PATCH 1/2] Initial plan From d7160ce7c32a308c4c919265d8ac646ba2b4f4e0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 4 Jan 2026 03:41:24 +0000 Subject: [PATCH 2/2] Replace explicit ToString() calls with string interpolation Co-authored-by: ptr727 <2061579+ptr727@users.noreply.github.com> --- .husky/pre-commit | 0 UtilitiesTests/FileExAsyncTests.cs | 16 ++++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) mode change 100644 => 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit old mode 100644 new mode 100755 diff --git a/UtilitiesTests/FileExAsyncTests.cs b/UtilitiesTests/FileExAsyncTests.cs index b53b3db..a6fb663 100644 --- a/UtilitiesTests/FileExAsyncTests.cs +++ b/UtilitiesTests/FileExAsyncTests.cs @@ -34,7 +34,7 @@ public async Task DeleteFileAsync_WithExistingFile_ShouldReturnTrue() [Fact] public async Task DeleteDirectoryAsync_WithExistingDirectory_ShouldReturnTrue() { - string tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); + string tempDir = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid()}"); _ = Directory.CreateDirectory(tempDir); try @@ -56,7 +56,7 @@ public async Task DeleteDirectoryAsync_WithExistingDirectory_ShouldReturnTrue() [Fact] public async Task DeleteDirectoryAsync_Recursive_ShouldDeleteAllContents() { - string tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); + string tempDir = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid()}"); _ = Directory.CreateDirectory(tempDir); string subDir = Path.Combine(tempDir, "subdir"); _ = Directory.CreateDirectory(subDir); @@ -83,7 +83,7 @@ public async Task DeleteDirectoryAsync_Recursive_ShouldDeleteAllContents() public async Task RenameFileAsync_WithValidPaths_ShouldRenameFile() { string tempFile = Path.GetTempFileName(); - string newPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() + ".txt"); + string newPath = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid()}.txt"); try { @@ -109,9 +109,9 @@ public async Task RenameFileAsync_WithValidPaths_ShouldRenameFile() [Fact] public async Task RenameFolderAsync_WithValidPaths_ShouldRenameFolder() { - string tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); + string tempDir = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid()}"); _ = Directory.CreateDirectory(tempDir); - string newPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); + string newPath = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid()}"); try { @@ -159,7 +159,7 @@ public async Task WaitFileReadableAsync_WithReadableFile_ShouldReturnTrue() [Fact] public async Task CreateRandomFilledFileAsync_ShouldCreateFile() { - string tempFile = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() + ".dat"); + string tempFile = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid()}.dat"); long fileSize = 1024 * 1024; // 1MB try @@ -182,7 +182,7 @@ public async Task CreateRandomFilledFileAsync_ShouldCreateFile() [Fact] public async Task CreateSparseFileAsync_ShouldCreateFile() { - string tempFile = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() + ".dat"); + string tempFile = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid()}.dat"); long fileSize = 1024 * 1024; // 1MB try @@ -229,7 +229,7 @@ public async Task FileOperationsAsync_WithCancellation_ShouldRespectCancellation [Fact] public async Task DeleteInsideDirectoryAsync_ShouldDeleteContentsOnly() { - string tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); + string tempDir = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid()}"); _ = Directory.CreateDirectory(tempDir); string testFile = Path.Combine(tempDir, "test.txt"); await File.WriteAllTextAsync(testFile, "test content");