test(battle-node): wire-shape test + refresh stale comment for v1.1
Final-review follow-ups: - BuildOpponentTurnStart's doc comment claimed the v1 client sits indefinitely — true before the loop closure, false after. Updated to describe the pair with BuildOpponentTurnEnd. - TypedBodyWireShapeTests had no coverage for BuildOpponentTurnEnd; added the literal-JSON test so a future JsonPropertyName rename on TurnEndBody is caught.
This commit is contained in:
@@ -158,6 +158,18 @@ public class TypedBodyWireShapeTests
|
||||
Assert.That(node["uri"]!.GetValue<string>(), Is.EqualTo("TurnStart"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void BuildOpponentTurnEnd_SerializesTurnStateAndResultCode()
|
||||
{
|
||||
var env = ScriptedLifecycle.BuildOpponentTurnEnd();
|
||||
var json = MsgEnvelope.ToJson(env);
|
||||
var node = JsonNode.Parse(json)!.AsObject();
|
||||
|
||||
Assert.That(node["turnState"]!.GetValue<int>(), Is.EqualTo(0));
|
||||
Assert.That(node["resultCode"]!.GetValue<int>(), Is.EqualTo(1));
|
||||
Assert.That(node["uri"]!.GetValue<string>(), Is.EqualTo("TurnEnd"));
|
||||
}
|
||||
|
||||
/// <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