mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 16:11:10 +00:00
Adds a restore action for soft deleted bundled themes
This commit is contained in:
1 parent
15945c2e56
commit
7e54c990ad
49 files changed
+1666
-26
No files matched your search
+32
@@ -0,0 +1,32 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Common.Mapping.Themes;
|
||||
using Lumina.Application.Core.Themes.Management.Commands.RestoreTheme;
|
||||
using Lumina.Contracts.Fixtures.Core.Requests.Themes;
|
||||
using Lumina.Contracts.Requests.Themes;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.UnitTests.Common.Mapping.Themes;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="RestoreThemeRequestMapping"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class RestoreThemeRequestMappingTests
|
||||
{
|
||||
private readonly RestoreThemeRequestFixture _restoreThemeRequestFixture = new();
|
||||
|
||||
[Fact]
|
||||
public void ToCommand_WhenMappingRequest_ShouldMapThemeId()
|
||||
{
|
||||
// Arrange
|
||||
RestoreThemeRequest request = _restoreThemeRequestFixture.Create(themeId: "editorial-paper");
|
||||
|
||||
// Act
|
||||
RestoreThemeCommand command = request.ToCommand();
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(command);
|
||||
Assert.Equal(request.ThemeId, command.ThemeId);
|
||||
}
|
||||
}
|
||||
+1
@@ -48,6 +48,7 @@ public class ThemeEntityMappingTests
|
||||
Assert.Equal(theme.InstallSource, result.InstallSource);
|
||||
Assert.Equal(theme.IsCurrent, result.IsCurrent);
|
||||
Assert.Equal(theme.InstalledAtUtc, result.InstalledAtUtc);
|
||||
Assert.Equal(theme.IsDeleted, result.IsDeleted);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in new issue
Block a user