Publish Ludarium source
Public source validation / source (push) Successful in 2m16s

This commit is contained in:
Ludarium release export
2026-09-03 02:08:58 +02:00
commit df869819ce
339 changed files with 46455 additions and 0 deletions
@@ -0,0 +1,27 @@
using Ludarium.Application;
using Ludarium.Domain;
namespace Ludarium.UnitTests;
public sealed class LibraryExperiencePolicyTests
{
[Fact]
public void SmartCollectionRulesNormalizeTagsAndPlatform()
{
var input = LibraryExperiencePolicy.Normalize(new GameCollectionInput(" Favorites ", " curated ",
CollectionKind.Smart, new CollectionRule(Platform: "SNES", Tags: [" Co-Op ", "co-op"]), true));
Assert.Equal("Favorites", input.Name);
Assert.Equal("snes", input.Rule?.Platform);
Assert.Equal(["co-op"], Assert.IsType<string[]>(input.Rule?.Tags));
}
[Fact]
public void PersonalStateRejectsRatingsOutsideDocumentedRange() =>
Assert.Throws<ArgumentException>(() => LibraryExperiencePolicy.Normalize(new GameUserStateInput(false,
GamePlayStatus.Backlog, 11, null, null, null, 0, null)));
[Fact]
public void ExternalMediaRejectsInsecureUrls() =>
Assert.Throws<ArgumentException>(() => LibraryExperiencePolicy.Normalize(new GameMediaInput(
GameMediaKind.Screenshot, "Screenshot", "http://example.test/image.png")));
}