AShipHullWithoutATopSpeedIsRefused: the hull carries an unrelated behavior, so a rule that counts any behavior fails

Survivor of the top-speed-any-behavior-counts hand mutant: the cleared fixture hull held no behavior at all. Test-only; builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-12 05:03:02 +02:00
commit 22dba843a5

View file

@ -24,6 +24,7 @@ public sealed class ShipValidationTests
var ship = ShipAuthoringTests.Fixture();
ship.Hull.HullType = type;
ship.Hull.Behaviors.Clear();
ship.Hull.Behaviors.Add(new CapacitorData()); // a hull with other behaviors still has no top speed
if (accepted) ship.Validate();
else Assert.Contains("top speed", Assert.Throws<InvalidOperationException>(() => ship.Validate()).Message);
}