public void ThrowsInvalidOperationException()
        {
            Exception caughtException = null;
            var       state           = new InvalidTransitionState("Some message");

            var observable = state.Start();

            observable.Subscribe(_ => { }, (Exception exception) => caughtException = exception);

            caughtException.Should().NotBeNull();
            caughtException.Should().BeOfType <InvalidOperationException>();
        }
        public void ThrowsInvalidOperationExceptionWithASpecificMessage(NonEmptyString message)
        {
            if (message.Get.Trim().Length == 0)
            {
                return;
            }

            Exception caughtException = null;
            var       state           = new InvalidTransitionState(message.Get);

            var observable = state.Start();

            observable.Subscribe(_ => { }, (Exception exception) => caughtException = exception);

            caughtException.Message.Should().Be($"Invalid transition: {message}");
        }
        public void DoesNotThrowWhenNobodySubscribesToTheReturnedObservable()
        {
            var state = new InvalidTransitionState("Error.");

            state.Start();
        }