public void ThrowsException_WhenDefiningNonTreeHierarchy()
        {
            var stateDefinitionBuilder = new StateDefinitionsBuilder <States, Events>();

            stateDefinitionBuilder
            .DefineHierarchyOn(States.A)
            .WithHistoryType(HistoryType.None)
            .WithInitialSubState(States.B);

            Action action = () =>
            {
                stateDefinitionBuilder
                .DefineHierarchyOn(States.C)
                .WithHistoryType(HistoryType.None)
                .WithInitialSubState(States.B);
            };

            action.Should().Throw <InvalidOperationException>();
        }
        public void ThrowsException_WhenInitialStateIsSuperStateItselfInAnHierarchy()
        {
            var stateDefinitionsBuilder = new StateDefinitionsBuilder <States, Events>();

            Action action = () => stateDefinitionsBuilder
                            .DefineHierarchyOn(States.B)
                            .WithHistoryType(HistoryType.None)
                            .WithInitialSubState(States.B)
                            .WithSubState(States.B1)
                            .WithSubState(States.B2);

            action.Should().Throw <ArgumentException>();
        }