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:
14
progression.tests/LevelIdTests.cs
Normal file
14
progression.tests/LevelIdTests.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Mr.BrickAdventures.Progression.Tests;
|
||||
|
||||
public class LevelIdTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("")]
|
||||
[InlineData(" ")]
|
||||
public void A_blank_id_is_not_a_level(string value)
|
||||
{
|
||||
// Levels are addressed by a stable authored id, never by position in a list. An unset
|
||||
// field in a .tres would otherwise become a valid id that silently collides with itself.
|
||||
Assert.Throws<ArgumentException>(() => LevelId.Of(value));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user