Removes the redundant contract and enumeration tests

This commit is contained in:
BinaryAlley committed 2026-09-26 17:56:57 +03:00
1 parent 4dce426b38
commit dc2692e208
127 files changed
-6721

No files matched your search

@@ -3,8 +3,6 @@ using Lumina.Domain.SharedKernel.Common.Enums.BookLibrary;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Domain.SharedKernel.UnitTests.Common.Enums.BookLibrary;
@@ -15,12 +13,6 @@ namespace Lumina.Domain.SharedKernel.UnitTests.Common.Enums.BookLibrary;
[ExcludeFromCodeCoverage]
public class BookFormatTests
{
private readonly JsonSerializerOptions _jsonOptions = new()
{
PropertyNameCaseInsensitive = true,
Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) }
};
[Fact]
public void BookFormat_WhenEnumeratingValues_ShouldHaveNoDuplicateValues()
{
@@ -29,22 +21,5 @@ public class BookFormatTests
// Assert
Assert.Equal(values.Length, values.Distinct().Count());
Assert.All(values, value => Assert.True(Enum.IsDefined(value)));
}
[Fact]
public void RoundTrip_WhenSerializingWithCamelCaseConverter_ShouldPreserveEnumValue()
{
// Arrange
foreach (BookFormat value in Enum.GetValues<BookFormat>())
{
// Act
string json = JsonSerializer.Serialize(value, _jsonOptions);
BookFormat deserialized = JsonSerializer.Deserialize<BookFormat>(json, _jsonOptions);
// Assert
Assert.Equal(value, deserialized);
Assert.StartsWith("\"", json, StringComparison.Ordinal);
}
}
}