Renames the image MIME resolver and organizes the MIME resolvers

Renames MimeTypes to ImageMimeTypes and moves it into Common/MimeTypes, updates the thumbnail endpoint and its tests, and aligns ThemeMimeTypes on the same frozen dictionary, initializer style and field naming.
This commit is contained in:
BinaryAlley committed 2026-10-13 22:16:57 +03:00
1 parent 1aa427b1e2
commit 4bcd37898c
5 files changed
+33 -32

No files matched your search

@@ -1,16 +1,16 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.SharedKernel.Common.Enums.PhotoLibrary;
using Lumina.Presentation.Api.Common.Utilities;
using Lumina.Presentation.Api.Common.MimeTypes;
using System.Diagnostics.CodeAnalysis;
#endregion
namespace Lumina.Presentation.Api.UnitTests.Common.Utilities;
namespace Lumina.Presentation.Api.UnitTests.Common.MimeTypes;
/// <summary>
/// Contains unit tests for the <see cref="MimeTypes"/> class.
/// Contains unit tests for the <see cref="ImageMimeTypes"/> class.
/// </summary>
[ExcludeFromCodeCoverage]
public class MimeTypesTests
public class ImageMimeTypesTests
{
[Theory]
[InlineData(ImageType.BMP, "image/bmp")] // bmp image type
@@ -21,7 +21,7 @@ public class MimeTypesTests
public void GetMimeType_WhenTypeIsKnown_ShouldReturnTheMappedMimeType(ImageType type, string expectedMimeType)
{
// Act
string result = MimeTypes.GetMimeType(type);
string result = ImageMimeTypes.GetMimeType(type);
// Assert
Assert.Equal(expectedMimeType, result);
@@ -33,7 +33,7 @@ public class MimeTypesTests
public void GetMimeType_WhenTypeIsUnknown_ShouldReturnOpaqueBinaryMimeType(ImageType type)
{
// Act
string result = MimeTypes.GetMimeType(type);
string result = ImageMimeTypes.GetMimeType(type);
// Assert
Assert.Equal("application/octet-stream", result);