mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 11:11:10 +00:00
Adds metadata aggregation to the media library enrichment job
This commit is contained in:
1 parent
c82fadc7a2
commit
66871ccf62
168 files changed
+3503
-1062
No files matched your search
+11
-2
@@ -1,6 +1,7 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Common.Mapping.UsersManagement.Users;
|
||||
using Lumina.Application.Core.UsersManagement.Settings.Commands.UpdateUserSettings;
|
||||
using Lumina.Contracts.Fixtures.Core.Requests.UsersManagement.Settings;
|
||||
using Lumina.Contracts.Requests.UsersManagement.Settings;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
@@ -13,11 +14,19 @@ namespace Lumina.Application.UnitTests.Common.Mapping.UsersManagement.Users;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class UpdateUserSettingsRequestMappingTests
|
||||
{
|
||||
private readonly UpdateUserSettingsRequestFixture _requestFixture = new();
|
||||
|
||||
[Fact]
|
||||
public void ToCommand_WhenMappingValidRequest_ShouldMapCorrectly()
|
||||
{
|
||||
// Arrange
|
||||
UpdateUserSettingsRequest request = new(IsPaginationEnabled: true, ItemsPerPage: 48, IgnoreThePrefixForAlphaPicker: false, IsThemeCachingEnabled: true);
|
||||
UpdateUserSettingsRequest request = _requestFixture.Create(
|
||||
isPaginationEnabled: true,
|
||||
itemsPerPage: 48,
|
||||
shouldIgnoreThePrefixForAlphaPicker: false,
|
||||
isThemeCachingEnabled: true,
|
||||
shouldAggregateMetadataWhenMissing: false
|
||||
);
|
||||
|
||||
// Act
|
||||
UpdateUserSettingsCommand result = request.ToCommand();
|
||||
@@ -26,7 +35,7 @@ public class UpdateUserSettingsRequestMappingTests
|
||||
Assert.NotNull(result);
|
||||
Assert.Equal(request.IsPaginationEnabled, result.IsPaginationEnabled);
|
||||
Assert.Equal(request.ItemsPerPage, result.ItemsPerPage);
|
||||
Assert.Equal(request.IgnoreThePrefixForAlphaPicker, result.IgnoreThePrefixForAlphaPicker);
|
||||
Assert.Equal(request.ShouldIgnoreThePrefixForAlphaPicker, result.ShouldIgnoreThePrefixForAlphaPicker);
|
||||
Assert.Equal(request.IsThemeCachingEnabled, result.IsThemeCachingEnabled);
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -33,7 +33,7 @@ public class UserSettingsEntityMappingTests
|
||||
Assert.Equal(entity.UserId, result.Value.UserId.Value);
|
||||
Assert.Equal(entity.IsPaginationEnabled, result.Value.IsPaginationEnabled);
|
||||
Assert.Equal(entity.ItemsPerPage, result.Value.ItemsPerPage);
|
||||
Assert.Equal(entity.IgnoreThePrefixForAlphaPicker, result.Value.IgnoreThePrefixForAlphaPicker);
|
||||
Assert.Equal(entity.ShouldIgnoreThePrefixForAlphaPicker, result.Value.ShouldIgnoreThePrefixForAlphaPicker);
|
||||
Assert.Equal(entity.IsThemeCachingEnabled, result.Value.IsThemeCachingEnabled);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class UserSettingsEntityMappingTests
|
||||
Assert.Equal(entity.UserId, result.UserId);
|
||||
Assert.Equal(entity.IsPaginationEnabled, result.IsPaginationEnabled);
|
||||
Assert.Equal(entity.ItemsPerPage, result.ItemsPerPage);
|
||||
Assert.Equal(entity.IgnoreThePrefixForAlphaPicker, result.IgnoreThePrefixForAlphaPicker);
|
||||
Assert.Equal(entity.ShouldIgnoreThePrefixForAlphaPicker, result.ShouldIgnoreThePrefixForAlphaPicker);
|
||||
Assert.Equal(entity.IsThemeCachingEnabled, result.IsThemeCachingEnabled);
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -34,7 +34,7 @@ public class UserSettingsMappingTests
|
||||
Assert.Equal(userId, result.UserId);
|
||||
Assert.Equal(domainEntity.IsPaginationEnabled, result.IsPaginationEnabled);
|
||||
Assert.Equal(domainEntity.ItemsPerPage, result.ItemsPerPage);
|
||||
Assert.Equal(domainEntity.IgnoreThePrefixForAlphaPicker, result.IgnoreThePrefixForAlphaPicker);
|
||||
Assert.Equal(domainEntity.ShouldIgnoreThePrefixForAlphaPicker, result.ShouldIgnoreThePrefixForAlphaPicker);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -52,6 +52,6 @@ public class UserSettingsMappingTests
|
||||
Assert.Equal(userId, result.UserId);
|
||||
Assert.Equal(domainEntity.IsPaginationEnabled, result.IsPaginationEnabled);
|
||||
Assert.Equal(domainEntity.ItemsPerPage, result.ItemsPerPage);
|
||||
Assert.Equal(domainEntity.IgnoreThePrefixForAlphaPicker, result.IgnoreThePrefixForAlphaPicker);
|
||||
Assert.Equal(domainEntity.ShouldIgnoreThePrefixForAlphaPicker, result.ShouldIgnoreThePrefixForAlphaPicker);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user