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>
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
using Theriapolis.Core.Rules.Stats;
|
||||
using Xunit;
|
||||
|
||||
namespace Theriapolis.Tests.Rules;
|
||||
|
||||
public sealed class SizeTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(SizeCategory.Small, 1)]
|
||||
[InlineData(SizeCategory.Medium, 1)]
|
||||
[InlineData(SizeCategory.MediumLarge, 1)]
|
||||
[InlineData(SizeCategory.Large, 2)]
|
||||
public void FootprintTiles_MatchesPlanTable(SizeCategory s, int expected)
|
||||
{
|
||||
Assert.Equal(expected, s.FootprintTiles());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(SizeCategory.Small, 1)]
|
||||
[InlineData(SizeCategory.Medium, 1)]
|
||||
[InlineData(SizeCategory.MediumLarge, 1)]
|
||||
[InlineData(SizeCategory.Large, 2)]
|
||||
public void DefaultReachTiles_MatchesPlanTable(SizeCategory s, int expected)
|
||||
{
|
||||
Assert.Equal(expected, s.DefaultReachTiles());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("small", SizeCategory.Small)]
|
||||
[InlineData("medium", SizeCategory.Medium)]
|
||||
[InlineData("medium_large", SizeCategory.MediumLarge)]
|
||||
[InlineData("large", SizeCategory.Large)]
|
||||
public void FromJson_ParsesSnakeCase(string raw, SizeCategory expected)
|
||||
{
|
||||
Assert.Equal(expected, SizeExtensions.FromJson(raw));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void FromJson_UnknownThrows()
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => SizeExtensions.FromJson("gargantuan"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CarryCapacityMult_LargeIsDoubled()
|
||||
{
|
||||
Assert.Equal(2.0f, SizeCategory.Large.CarryCapacityMult());
|
||||
Assert.Equal(0.5f, SizeCategory.Small.CarryCapacityMult());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user