Fix choice option lookup in Barcgal test
CI / test (push) Successful in 2m23s Details

This commit is contained in:
MpakobecEx 2026-10-23 19:11:45 +05:00
parent 61576741eb
commit e60ddfdcb1
1 changed files with 4 additions and 2 deletions

View File

@ -864,15 +864,17 @@ public class GameEngineTests
"круг", StringComparison.OrdinalIgnoreCase) < 0) "круг", StringComparison.OrdinalIgnoreCase) < 0)
{ {
var cardIndex = engine.State.PendingChoice.Options var cardIndex = engine.State.PendingChoice.Options
.ToList()
.FindIndex(option => option.Label.Contains("Flogal")); .FindIndex(option => option.Label.Contains("Flogal"));
Assert.GreaterOrEqual(cardIndex, 0); Assert.True(cardIndex >= 0);
Assert.True(engine.Execute(new ChooseCommand(cardIndex)).Accepted); Assert.True(engine.Execute(new ChooseCommand(cardIndex)).Accepted);
} }
Assert.NotNull(engine.State.PendingChoice); Assert.NotNull(engine.State.PendingChoice);
var circleIndex = engine.State.PendingChoice!.Options var circleIndex = engine.State.PendingChoice!.Options
.ToList()
.FindIndex(option => option.Slot == 2); .FindIndex(option => option.Slot == 2);
Assert.GreaterOrEqual(circleIndex, 0); Assert.True(circleIndex >= 0);
Assert.True(engine.Execute(new ChooseCommand(circleIndex)).Accepted); Assert.True(engine.Execute(new ChooseCommand(circleIndex)).Accepted);
Assert.Equal( Assert.Equal(