using NUnit.Framework; using ProjectM.Simulation; namespace ProjectM.Tests { /// /// Pure-function tests for (no ECS world): the deterministic, save-reproducible /// wave size. Pins the lower bound and the per-epoch ramp. /// /// 2026-08-07 audit purge: the IsChargerSlot / weighted-composition tests are gone with the 4-kind MixBands /// model. They were green the whole time while the behaviour they certified could not execute — no prefab /// carried ChargerAuthoring, so every weighted slot resolved to Grunt at runtime. That false confidence is /// exactly what the audit flagged. Recover them from git alongside MixBands if the model returns. /// public class ZoneEnemyMathTests { [Test] public void WaveSize_LowerBoundedAtOne() { Assert.AreEqual(1, ZoneEnemyMath.WaveSize(0, 0), "an occupied arena always has at least one enemy"); Assert.AreEqual(1, ZoneEnemyMath.WaveSize(-5, 0), "epoch is floored at 1 internally"); } [Test] public void WaveSize_BaselinePlusOnePerEpoch() { Assert.AreEqual(5, ZoneEnemyMath.WaveSize(1, 5), "epoch 1 == the baked base count"); Assert.AreEqual(7, ZoneEnemyMath.WaveSize(3, 5), "epoch 3: baseline 5 + (3-1) ramp"); } [Test] public void WaveSize_NegativeBaseCount_StillFights() { Assert.AreEqual(1, ZoneEnemyMath.WaveSize(1, -4), "a mis-authored negative base count still fights"); } [Test] public void WaveSize_Deterministic() { for (int epoch = 1; epoch < 9; epoch++) Assert.AreEqual(ZoneEnemyMath.WaveSize(epoch, 5), ZoneEnemyMath.WaveSize(epoch, 5), "same inputs must give the same wave size — a replayed wave is identical"); } } }