mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 19:21:10 +00:00
Aligns the test fixture field names with their types and tidies the remaining tests
This commit is contained in:
1 parent
95e771191e
commit
a514335a10
99 files changed
+1523
-1499
No files matched your search
+2
-2
@@ -34,7 +34,7 @@ public class DeleteThemeEndpointTests : IClassFixture<AuthenticatedLuminaApiFact
|
||||
{
|
||||
private HttpClient _client;
|
||||
private readonly AuthenticatedLuminaApiFactory _apiFactory;
|
||||
private readonly TestThemeArchiveFixture _themeArchiveFixture = new();
|
||||
private readonly TestThemeArchiveFixture _testThemeArchiveFixture = new();
|
||||
private readonly List<string> _installedThemeIds = [];
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
{
|
||||
@@ -184,7 +184,7 @@ public class DeleteThemeEndpointTests : IClassFixture<AuthenticatedLuminaApiFact
|
||||
private async Task<string> InstallThemeAsync()
|
||||
{
|
||||
string themeId = $"test-theme-{Guid.NewGuid():N}";
|
||||
byte[] archiveBytes = _themeArchiveFixture.Create(themeId);
|
||||
byte[] archiveBytes = _testThemeArchiveFixture.Create(themeId);
|
||||
|
||||
using MultipartFormDataContent multipartContent = [];
|
||||
using ByteArrayContent fileContent = new(archiveBytes);
|
||||
|
||||
+4
-4
@@ -36,7 +36,7 @@ public class InstallThemeEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
|
||||
{
|
||||
private HttpClient _client;
|
||||
private readonly AuthenticatedLuminaApiFactory _apiFactory;
|
||||
private readonly TestThemeArchiveFixture _themeArchiveFixture = new();
|
||||
private readonly TestThemeArchiveFixture _testThemeArchiveFixture = new();
|
||||
private readonly List<string> _installedThemeIds = [];
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
{
|
||||
@@ -67,7 +67,7 @@ public class InstallThemeEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
|
||||
{
|
||||
// Arrange
|
||||
string themeId = $"test-theme-{Guid.NewGuid():N}";
|
||||
byte[] archiveBytes = _themeArchiveFixture.Create(themeId);
|
||||
byte[] archiveBytes = _testThemeArchiveFixture.Create(themeId);
|
||||
using MultipartFormDataContent multipartContent = [];
|
||||
using ByteArrayContent fileContent = new(archiveBytes);
|
||||
multipartContent.Add(fileContent, "file", "theme.zip");
|
||||
@@ -163,7 +163,7 @@ public class InstallThemeEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
|
||||
{
|
||||
// Arrange
|
||||
HttpClient nonAdminClient = await _apiFactory.CreateAuthenticatedClientAsync();
|
||||
byte[] archiveBytes = _themeArchiveFixture.Create();
|
||||
byte[] archiveBytes = _testThemeArchiveFixture.Create();
|
||||
using MultipartFormDataContent multipartContent = [];
|
||||
using ByteArrayContent fileContent = new(archiveBytes);
|
||||
multipartContent.Add(fileContent, "file", "theme.zip");
|
||||
@@ -191,7 +191,7 @@ public class InstallThemeEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
|
||||
{
|
||||
// Arrange
|
||||
HttpClient anonymousClient = _apiFactory.CreateClient();
|
||||
byte[] archiveBytes = _themeArchiveFixture.Create();
|
||||
byte[] archiveBytes = _testThemeArchiveFixture.Create();
|
||||
using MultipartFormDataContent multipartContent = [];
|
||||
using ByteArrayContent fileContent = new(archiveBytes);
|
||||
multipartContent.Add(fileContent, "file", "theme.zip");
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ public class RestoreThemeEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
|
||||
{
|
||||
private HttpClient _client;
|
||||
private readonly AuthenticatedLuminaApiFactory _apiFactory;
|
||||
private readonly TestThemeArchiveFixture _themeArchiveFixture = new();
|
||||
private readonly TestThemeArchiveFixture _testThemeArchiveFixture = new();
|
||||
private readonly List<string> _installedThemeIds = [];
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
{
|
||||
@@ -184,7 +184,7 @@ public class RestoreThemeEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
|
||||
private async Task<string> InstallUserThemeAsync()
|
||||
{
|
||||
string themeId = $"test-theme-{Guid.NewGuid():N}";
|
||||
byte[] archiveBytes = _themeArchiveFixture.Create(themeId);
|
||||
byte[] archiveBytes = _testThemeArchiveFixture.Create(themeId);
|
||||
|
||||
using MultipartFormDataContent multipartContent = [];
|
||||
using ByteArrayContent fileContent = new(archiveBytes);
|
||||
|
||||
+2
-2
@@ -35,7 +35,7 @@ public class SetCurrentThemeEndpointTests : IClassFixture<AuthenticatedLuminaApi
|
||||
{
|
||||
private HttpClient _client;
|
||||
private readonly AuthenticatedLuminaApiFactory _apiFactory;
|
||||
private readonly TestThemeArchiveFixture _themeArchiveFixture = new();
|
||||
private readonly TestThemeArchiveFixture _testThemeArchiveFixture = new();
|
||||
private readonly SetCurrentThemeRequestFixture _setCurrentThemeRequestFixture = new();
|
||||
private readonly List<string> _installedThemeIds = [];
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
@@ -191,7 +191,7 @@ public class SetCurrentThemeEndpointTests : IClassFixture<AuthenticatedLuminaApi
|
||||
private async Task<string> InstallThemeAsync(string? themeId = null)
|
||||
{
|
||||
string resolvedThemeId = themeId ?? $"test-theme-{Guid.NewGuid():N}";
|
||||
byte[] archiveBytes = _themeArchiveFixture.Create(resolvedThemeId);
|
||||
byte[] archiveBytes = _testThemeArchiveFixture.Create(resolvedThemeId);
|
||||
|
||||
using MultipartFormDataContent multipartContent = [];
|
||||
using ByteArrayContent fileContent = new(archiveBytes);
|
||||
|
||||
Reference in new issue
Block a user