feat(progression): remaining slice 1 value objects
Lives (floors at zero, exhaustion observable), LevelId, SkillId, PlaythroughId (never self-generates, keeps tests deterministic), StatName enum, LevelTime rejects NaN/infinity. 14 tests. Arithmetic/comparison members deferred to the slices whose behaviour needs them rather than added speculatively.
This commit is contained in:
13
progression.tests/PlaythroughIdTests.cs
Normal file
13
progression.tests/PlaythroughIdTests.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace Mr.BrickAdventures.Progression.Tests;
|
||||
|
||||
public class PlaythroughIdTests
|
||||
{
|
||||
[Fact]
|
||||
public void The_empty_guid_is_not_a_playthrough()
|
||||
{
|
||||
// Ids arrive from an adapter, never from Guid.NewGuid() inside the domain — otherwise every
|
||||
// test touching identity would be non-deterministic. That makes a default-valued guid a
|
||||
// realistic mistake worth refusing.
|
||||
Assert.Throws<ArgumentException>(() => PlaythroughId.Of(Guid.Empty));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user