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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user