public void CheckCommandCodesWhenResettingToInitialState(Controller controller, SecretPanelSemanticModel semanticModel, HistoryRecordingCommandChannel commandChannel, EventCodeSequences sequences)
        {
            // Arrange
            var expected = new[] { semanticModel.UnlockDoorCmd.Code, semanticModel.LockPanelCmd.Code }.ToList();

            // Act
            controller.HandleEventCode(semanticModel.DoorClosed.Code);
            controller.HandleEventCode(semanticModel.DoorOpened.Code);

            // Assert
            commandChannel.EventCodeHistory.Should().Equal(expected);
        }
        public void CheckCommandCodesWhenUnlockingPanelViaRouteA(Controller controller, SecretPanelSemanticModel semanticModel, HistoryRecordingCommandChannel commandChannel, EventCodeSequences sequences)
        {
            // Arrange
            var codes = sequences.EventSequenceToUnlockPanelViaRouteA.ToList();

            var expected = new[] { semanticModel.UnlockPanelCmd.Code, semanticModel.LockDoorCmd.Code }.ToList();

            // Act
            codes.ForEach(x => controller.HandleEventCode(x.Code));

            // Assert
            commandChannel.EventCodeHistory.Should().Equal(expected);
        }
        public void UnlockPanelViaRouteB(Controller controller, SecretPanelSemanticModel semanticModel, EventCodeSequences sequences)
        {
            // Arrange
            var codes = sequences.EventSequenceToUnlockPanelViaRouteB.ToList();

            // Act
            codes.ForEach(x => controller.HandleEventCode(x.Code));

            // Assert
            controller.CurrentState.Should().Be(semanticModel.UnlockedPanelState);
        }
        public void SendResetEventAfterMovingToANewState(Controller controller, SecretPanelSemanticModel semanticModel, EventCodeSequences sequences)
        {
            // Arrange
            var codes = sequences.EventSequenceWithReset.ToList();

            // Act
            codes.ForEach(x => controller.HandleEventCode(x.Code));

            // Assert
            controller.CurrentState.Should().Be(semanticModel.IdleState);
        }