Standardizes test conventions and documentation

This commit is contained in:
BinaryAlley committed 2026-08-24 14:20:08 -07:00
1 parent 7aeed04255
commit f42dc709de
190 files changed
+2180 -2814

No files matched your search

@@ -26,6 +26,7 @@ public class GetDirectoriesEndpointTests : IClassFixture<AuthenticatedLuminaApiF
{
private HttpClient _client;
private readonly AuthenticatedLuminaApiFactory _apiFactory;
private readonly FileSystemStructureFixture _fileSystemStructureFixture = new();
private readonly JsonSerializerOptions _jsonOptions = new()
{
ReferenceHandler = ReferenceHandler.Preserve,
@@ -56,8 +57,7 @@ public class GetDirectoriesEndpointTests : IClassFixture<AuthenticatedLuminaApiF
public async Task GetDirectories_WhenCalledWithValidPathAndHiddenChildrenAndNotIncludeHiddenElements_ShouldReturnNoDirectories()
{
// Arrange
FileSystemStructureFixture fileSystemFixture = new();
string testPath = fileSystemFixture.CreateFileSystemStructure();
string testPath = _fileSystemStructureFixture.CreateFileSystemStructure();
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath;
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath; // two levels to get to the element that has a hidden element as child
string encodedPath = Uri.EscapeDataString(testPath);
@@ -79,7 +79,7 @@ public class GetDirectoriesEndpointTests : IClassFixture<AuthenticatedLuminaApiF
}
finally
{
fileSystemFixture.CleanupFileSystemStructure();
_fileSystemStructureFixture.CleanupFileSystemStructure();
}
}
@@ -87,8 +87,7 @@ public class GetDirectoriesEndpointTests : IClassFixture<AuthenticatedLuminaApiF
public async Task GetDirectories_WhenCalledWithValidPathAndWithIncludeHiddenElements_ShouldReturnDirectoriesWithHiddenElements()
{
// Arrange
FileSystemStructureFixture fileSystemFixture = new();
string testPath = fileSystemFixture.CreateFileSystemStructure();
string testPath = _fileSystemStructureFixture.CreateFileSystemStructure();
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath;
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath; // two levels to get to the element that has a hidden element as child
string encodedPath = Uri.EscapeDataString(testPath);
@@ -118,7 +117,7 @@ public class GetDirectoriesEndpointTests : IClassFixture<AuthenticatedLuminaApiF
}
finally
{
fileSystemFixture.CleanupFileSystemStructure();
_fileSystemStructureFixture.CleanupFileSystemStructure();
}
}
@@ -26,6 +26,7 @@ public class GetFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory
{
private HttpClient _client;
private readonly AuthenticatedLuminaApiFactory _apiFactory;
private readonly FileSystemStructureFixture _fileSystemStructureFixture = new();
private readonly JsonSerializerOptions _jsonOptions = new()
{
ReferenceHandler = ReferenceHandler.Preserve,
@@ -56,8 +57,7 @@ public class GetFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory
public async Task GetFiles_WhenCalledWithValidPathAndNotIncludeHiddenElements_ShouldReturnFilesWithoutHiddenElements()
{
// Arrange
FileSystemStructureFixture fileSystemFixture = new();
string testPath = fileSystemFixture.CreateFileSystemStructure();
string testPath = _fileSystemStructureFixture.CreateFileSystemStructure();
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath;
bool includeHiddenElements = false;
try
@@ -85,7 +85,7 @@ public class GetFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory
}
finally
{
fileSystemFixture.CleanupFileSystemStructure();
_fileSystemStructureFixture.CleanupFileSystemStructure();
}
}
@@ -93,8 +93,7 @@ public class GetFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory
public async Task GetFiles_WhenCalledWithValidPathAndHiddenChildrenAndNotIncludeHiddenElements_ShouldReturnNoFiles()
{
// Arrange
FileSystemStructureFixture fileSystemFixture = new();
string testPath = fileSystemFixture.CreateFileSystemStructure();
string testPath = _fileSystemStructureFixture.CreateFileSystemStructure();
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath;
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath; // two levels to get to the element that has a hidden element as child
bool includeHiddenElements = false;
@@ -117,7 +116,7 @@ public class GetFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory
}
finally
{
fileSystemFixture.CleanupFileSystemStructure();
_fileSystemStructureFixture.CleanupFileSystemStructure();
}
}
@@ -125,8 +124,7 @@ public class GetFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory
public async Task GetFiles_WhenCalledWithValidPathAndWithIncludeHiddenElements_ShouldReturnFilesWithHiddenElements()
{
// Arrange
FileSystemStructureFixture fileSystemFixture = new();
string testPath = fileSystemFixture.CreateFileSystemStructure();
string testPath = _fileSystemStructureFixture.CreateFileSystemStructure();
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath;
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath; // two levels to get to the element that has a hidden element as child
bool includeHiddenElements = true;
@@ -158,7 +156,7 @@ public class GetFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory
}
finally
{
fileSystemFixture.CleanupFileSystemStructure();
_fileSystemStructureFixture.CleanupFileSystemStructure();
}
}
@@ -26,6 +26,7 @@ public class GetTreeFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
{
private HttpClient _client;
private readonly AuthenticatedLuminaApiFactory _apiFactory;
private readonly FileSystemStructureFixture _fileSystemStructureFixture = new();
private readonly JsonSerializerOptions _jsonOptions = new()
{
ReferenceHandler = ReferenceHandler.Preserve,
@@ -56,8 +57,7 @@ public class GetTreeFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
public async Task GetTreeFiles_WhenCalledWithValidPathAndNotIncludeHiddenElements_ShouldReturnTreeFilesWithoutHiddenElements()
{
// Arrange
FileSystemStructureFixture fileSystemFixture = new();
string testPath = fileSystemFixture.CreateFileSystemStructure();
string testPath = _fileSystemStructureFixture.CreateFileSystemStructure();
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath;
bool includeHiddenElements = false;
try
@@ -85,7 +85,7 @@ public class GetTreeFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
}
finally
{
fileSystemFixture.CleanupFileSystemStructure();
_fileSystemStructureFixture.CleanupFileSystemStructure();
}
}
@@ -93,8 +93,7 @@ public class GetTreeFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
public async Task GetTreeFiles_WhenCalledWithValidPathAndHiddenChildrenAndNotIncludeHiddenElements_ShouldReturnNoTreeFiles()
{
// Arrange
FileSystemStructureFixture fileSystemFixture = new();
string testPath = fileSystemFixture.CreateFileSystemStructure();
string testPath = _fileSystemStructureFixture.CreateFileSystemStructure();
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath;
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath; // two levels to get to the element that has a hidden element as child
bool includeHiddenElements = false;
@@ -118,7 +117,7 @@ public class GetTreeFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
}
finally
{
fileSystemFixture.CleanupFileSystemStructure();
_fileSystemStructureFixture.CleanupFileSystemStructure();
}
}
@@ -126,8 +125,7 @@ public class GetTreeFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
public async Task GetTreeFiles_WhenCalledWithValidPathAndWithIncludeHiddenElements_ShouldReturnTreeFilesWithHiddenElements()
{
// Arrange
FileSystemStructureFixture fileSystemFixture = new();
string testPath = fileSystemFixture.CreateFileSystemStructure();
string testPath = _fileSystemStructureFixture.CreateFileSystemStructure();
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath;
testPath = System.IO.Path.GetDirectoryName(testPath) ?? testPath; // two levels to get to the element that has a hidden element as child
bool includeHiddenElements = true;
@@ -159,7 +157,7 @@ public class GetTreeFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
}
finally
{
fileSystemFixture.CleanupFileSystemStructure();
_fileSystemStructureFixture.CleanupFileSystemStructure();
}
}
[Fact]