test(battle-node): delete scripted participant + scripted-only builder tests

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-03 19:55:00 -04:00
parent 3fe378d801
commit 963adbbd1b
4 changed files with 0 additions and 255 deletions

View File

@@ -166,62 +166,6 @@ public class ScriptedLifecycleTests
"single-arg overload (non-interactive opponent) keeps the placeholder hand.");
}
[Test]
public void BuildClientSwap_has_empty_idxList_in_RawBody()
{
var env = ScriptedLifecycle.BuildClientSwap();
Assert.That(env.Uri, Is.EqualTo(NetworkBattleUri.Swap));
Assert.That(env.ViewerId, Is.EqualTo(ScriptedLifecycle.FakeOpponentViewerId));
var raw = (RawBody)env.Body;
Assert.That(raw.Entries.ContainsKey("idxList"), Is.True);
var idx = (System.Collections.IEnumerable)raw.Entries["idxList"]!;
Assert.That(idx.Cast<object>().Count(), Is.EqualTo(0), "bot keeps its dealt hand (empty mulligan).");
}
[Test]
public void BuildClientHandshakeFrames_carry_expected_uris()
{
Assert.That(ScriptedLifecycle.BuildClientInitNetwork().Uri, Is.EqualTo(NetworkBattleUri.InitNetwork));
Assert.That(ScriptedLifecycle.BuildClientInitBattle().Uri, Is.EqualTo(NetworkBattleUri.InitBattle));
Assert.That(ScriptedLifecycle.BuildClientLoaded().Uri, Is.EqualTo(NetworkBattleUri.Loaded));
}
[Test]
public void BuildOpponentTurnStart_HasUriTurnStartAndSpin()
{
var env = ScriptedLifecycle.BuildOpponentTurnStart();
Assert.That(env.Uri, Is.EqualTo(NetworkBattleUri.TurnStart));
var body = (OpponentTurnStartBody)env.Body;
Assert.That(body.Spin, Is.EqualTo(100));
}
[Test]
public void BuildOpponentTurnEnd_emits_TurnEnd_uri_with_turn_state_zero()
{
var env = ScriptedLifecycle.BuildOpponentTurnEnd();
Assert.That(env.Uri, Is.EqualTo(NetworkBattleUri.TurnEnd));
Assert.That(env.ViewerId, Is.EqualTo(ScriptedLifecycle.FakeOpponentViewerId));
Assert.That(env.Cat, Is.EqualTo(EmitCategory.Battle));
var body = (TurnEndBody)env.Body;
Assert.That(body.TurnState, Is.EqualTo(0));
Assert.That(body.ResultCode, Is.EqualTo(1));
}
[Test]
public void BuildOpponentJudge_emits_Judge_uri_with_spin_and_default_result_code()
{
var env = ScriptedLifecycle.BuildOpponentJudge();
Assert.That(env.Uri, Is.EqualTo(NetworkBattleUri.Judge));
Assert.That(env.ViewerId, Is.EqualTo(ScriptedLifecycle.FakeOpponentViewerId));
Assert.That(env.Cat, Is.EqualTo(EmitCategory.Battle));
var body = (JudgeBody)env.Body;
Assert.That(body.Spin, Is.EqualTo(ScriptedProfiles.OpponentJudgeSpin));
Assert.That(body.ResultCode, Is.EqualTo(1));
}
private static MatchContext FixtureCtx(IReadOnlyList<long>? deck = null) => new(
SelfDeckCardIds: deck ?? Enumerable.Range(1, 30).Select(i => 100_011_010L).ToList(),
ClassId: "1", CharaId: "1", CardMasterName: "card_master_node_10015",

View File

@@ -147,42 +147,6 @@ public class TypedBodyWireShapeTests
Assert.That(node["oppo"]!.AsArray().Count, Is.EqualTo(3));
}
[Test]
public void BuildOpponentTurnStart_SerializesSpinAndResultCode()
{
var env = ScriptedLifecycle.BuildOpponentTurnStart();
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("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"));
}
[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