Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
16 changes: 8 additions & 8 deletions UtilitiesTests/FileExAsyncTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand All @@ -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
{
Expand All @@ -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
{
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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");
Expand Down