Caching: README section on element ids; the hex refusal names the derived form for readable ids

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-14 20:31:44 +02:00
commit e3f497197d
3 changed files with 33 additions and 1 deletions

View file

@ -135,6 +135,13 @@ namespace GameCult.Caching.Tests
Assert.Throws<CultElementIdException>(() => Assign(grid, "r", deterministic: false));
}
[Test]
public void TheHexRefusalNamesTheDerivedFormForReadableIds()
{
var refusal = Assert.Throws<CultElementIdException>(() => Assign(new HHasIds { Items = { new EIded { Id = "root" } } }, "r", deterministic: false))!;
Assert.That(refusal.Message, Does.Contain("12 lowercase hex").And.Contain("[CultElementId(nameof(Member))]"));
}
[Test]
public void ARandomIdMustBeTwelveLowercaseHexCharactersAndADerivedIdNeedOnlyBeText()
{