public void ConsumingStarted_WhenStmInReceivingStartedState_Throws(EventStreamConsumerStateMachine stm)
        {
            stm.ReceivingStarted();

            Assert.Throws <InvalidOperationException>(() => stm.ConsumingStarted());
        }
 private static void Receive(EventStreamConsumerStateMachine stm, int eventCount)
 {
     stm.ReceivingStarted();
     stm.ReceivingCompleted(eventCount);
 }
        public void ReceivingStarted_WhenStmInReceivingCompletedState_DoesNotThrow(EventStreamConsumerStateMachine stm, int eventCount)
        {
            Receive(stm, eventCount);

            stm.ReceivingStarted();
        }
 public void ReceivingStarted_WhenStmInInitalState_DoesNotThrow(EventStreamConsumerStateMachine stm)
 {
     stm.ReceivingStarted();
 }