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.
15 lines
465 B
C#
15 lines
465 B
C#
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));
|
|
}
|
|
}
|