test(engine-ambient): cover BattleRecoveryInfo setter ambient write-through

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) <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-07 21:42:55 -04:00
parent fe146fde50
commit 18da7fd19e

View File

@@ -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));
}
}