Add test for Start
MODIFY
WalletWasabi.Tests/UnitTests/StateMachineTests.cs
WalletWasabi.Tests/UnitTests/StateMachineTests.cs
@@ -36,6 +36,19 @@ public class StateMachineTests
entered.Should().BeFalse();
}
+ [Fact]
+ public void Starting_after_initialization_executes_entry_actions()
+ {
+ StateMachine<PhoneState, PhoneTrigger> sut = new(PhoneState.Disconnected);
+ var entered = false;
+ sut.Configure(PhoneState.Disconnected)
+ .OnEntry(() => entered = true);
+
+ sut.Start();
+
+ entered.Should().BeTrue();
+ }
+
[Fact]
public void Exiting_state_with_exit_action_should_execute_it()
{

Add test for Start