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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user