test(battle-node): wire-shape test for BuildOpponentJudge
Mirrors BuildOpponentTurnEnd_SerializesTurnStateAndResultCode. Guards JudgeBody's JsonPropertyName keys against rename-induced wire breakage (per feedback_wire_shape_tests pattern).
This commit is contained in:
@@ -170,6 +170,18 @@ public class TypedBodyWireShapeTests
|
||||
Assert.That(node["uri"]!.GetValue<string>(), Is.EqualTo("TurnEnd"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void BuildOpponentJudge_SerializesSpinAndResultCode()
|
||||
{
|
||||
var env = ScriptedLifecycle.BuildOpponentJudge();
|
||||
var json = MsgEnvelope.ToJson(env);
|
||||
var node = JsonNode.Parse(json)!.AsObject();
|
||||
|
||||
Assert.That(node["spin"]!.GetValue<int>(), Is.EqualTo(100));
|
||||
Assert.That(node["resultCode"]!.GetValue<int>(), Is.EqualTo(1));
|
||||
Assert.That(node["uri"]!.GetValue<string>(), Is.EqualTo("Judge"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wire-shape fixture: 30 copies of the legacy DummyCardId (100_011_010L) so the
|
||||
/// existing literal assertions on <c>selfDeck[0].cardId</c> (line 81 above) keep working
|
||||
|
||||
Reference in New Issue
Block a user