From 18da7fd19ea20ade05dcf535a03794b32b5eed8c Mon Sep 17 00:00:00 2001 From: gamer147 Date: Sun, 7 Jun 2026 21:42:55 -0400 Subject: [PATCH] test(engine-ambient): cover BattleRecoveryInfo setter ambient write-through MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setter is the asymmetric one (write-through inside scope, unlike ViewerId's no-op-in-scope) — adding parity with the SetRealTimeNetworkBattle ambient setter test to catch future regressions if the routing branch is touched. Co-Authored-By: Claude Opus 4.6 (1M context) --- SVSim.BattleEngine.Tests/BattleAmbientTests.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SVSim.BattleEngine.Tests/BattleAmbientTests.cs b/SVSim.BattleEngine.Tests/BattleAmbientTests.cs index e4a6ca2..00952b4 100644 --- a/SVSim.BattleEngine.Tests/BattleAmbientTests.cs +++ b/SVSim.BattleEngine.Tests/BattleAmbientTests.cs @@ -189,4 +189,15 @@ public class BattleAmbientTests using var _ = BattleAmbient.Enter(ctx); Assert.That(Wizard.Data.BattleRecoveryInfo, Is.SameAs(info)); } + + [Test] + public void BattleRecoveryInfo_SetInsideScope_WritesAmbient() + { + var ctx = new BattleAmbientContext(); + using var _ = BattleAmbient.Enter(ctx); + var info = (Wizard.BattleRecoveryInfo)System.Runtime.Serialization + .FormatterServices.GetUninitializedObject(typeof(Wizard.BattleRecoveryInfo)); + Wizard.Data.BattleRecoveryInfo = info; + Assert.That(ctx.RecoveryInfo, Is.SameAs(info)); + } }