Files
przygody-pana-cegly/progression.tests/SkillLevelTests.cs
Gabriel Kaszewski 313a5315b1 feat(progression): Coins, LevelTime, SkillLevel core invariants (slice 1)
three bug-encoding invariants, one red/green cycle each:
- Coins.TrySubtract fails instead of clamping
- LevelTime rejects zero (continued-run zero best-times)
- SkillLevel has no zero (unowned is absence, not Level=1)

plan: drop signed NetCoins; add Attempt outcome as idempotency guard
2026-07-28 18:22:46 +02:00

14 lines
548 B
C#

namespace Mr.BrickAdventures.Progression.Tests;
public class SkillLevelTests
{
[Fact]
public void There_is_no_level_zero_because_unowned_is_absence()
{
// SkillData.Level defaults to 1 today, so "not owned" and "owned at level 1" are the same
// value and nothing can tell them apart. A Playthrough records only the skills it owns, so
// absence from that record is the only way to say "unowned" — level zero must not exist.
Assert.Throws<ArgumentOutOfRangeException>(() => SkillLevel.Of(0));
}
}