Files
TheriapolisV3/Theriapolis.Tests/Rules/ProficiencyBonusTests.cs
T
Christopher Wiebe b451f83174 Initial commit: Theriapolis baseline at port/godot branch point
Captures the pre-Godot-port state of the codebase. This is the rollback
anchor for the Godot port (M0 of theriapolis-rpg-implementation-plan-godot-port.md).
All Phase 0 through Phase 6.5 work is included; Phase 7 is in flight.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:40:51 -07:00

37 lines
849 B
C#

using Theriapolis.Core.Rules.Stats;
using Xunit;
namespace Theriapolis.Tests.Rules;
public sealed class ProficiencyBonusTests
{
[Theory]
[InlineData(1, 2)]
[InlineData(2, 2)]
[InlineData(3, 2)]
[InlineData(4, 2)]
[InlineData(5, 3)]
[InlineData(6, 3)]
[InlineData(8, 3)]
[InlineData(9, 4)]
[InlineData(12, 4)]
[InlineData(13, 5)]
[InlineData(16, 5)]
[InlineData(17, 6)]
[InlineData(20, 6)]
public void ForLevel_MatchesD20Table(int level, int expected)
{
Assert.Equal(expected, ProficiencyBonus.ForLevel(level));
}
[Theory]
[InlineData(0)]
[InlineData(-1)]
[InlineData(21)]
[InlineData(100)]
public void ForLevel_OutOfRange_Throws(int level)
{
Assert.Throws<ArgumentOutOfRangeException>(() => ProficiencyBonus.ForLevel(level));
}
}