Skip to content

Commit

Permalink
Avoid race condition (probably)
Browse files Browse the repository at this point in the history
  • Loading branch information
KCFindstr committed Oct 26, 2022
1 parent 92e9734 commit e5b236e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RabiRiichi.Tests/Scenario/ScenarioActionCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ public ScenarioInquiryMatcher ApplyAction<T>(int playerId, Predicate<T> matcher
=> ApplyAction(playerId, true, matcher);

public ScenarioInquiryMatcher AssertAutoFinish(bool autoFinish = true) {
onFinish();
if (autoFinish) {
Assert.IsTrue(inquiry.hasExecuted, "Inquiry not executed");
} else {
Assert.IsFalse(inquiry.hasExecuted, "Inquiry auto executed");
inquiry.Finish();
}
onFinish();
return this;
}

Expand All @@ -203,8 +203,8 @@ public ScenarioInquiryMatcher AssertNoMoreActions(int playerId) {
}

public ScenarioInquiryMatcher Finish() {
inquiry.Finish();
onFinish();
inquiry.Finish();
return this;
}
}
Expand Down

0 comments on commit e5b236e

Please sign in to comment.