public void The_saga_state_machine_should_add_value_for_sagas() { var workflow = new RegisterUserStateMachine(); Assert.AreEqual(RegisterUserStateMachine.Initial, workflow.CurrentState); workflow.Consume(new RegisterUser(_transactionId, _username, _password, _displayName, _email)); Assert.AreEqual(RegisterUserStateMachine.WaitingForEmailValidation, workflow.CurrentState); }
public void The_good_times_should_roll() { var workflow = new RegisterUserStateMachine(); workflow.CurrentState.ShouldEqual(RegisterUserStateMachine.Initial); workflow.Consume(new RegisterUser(_transactionId, _username, _password, _displayName, _email)); workflow.CurrentState.ShouldEqual(RegisterUserStateMachine.WaitingForEmailValidation); workflow.Consume(new UserValidated(_transactionId)); workflow.CurrentState.ShouldEqual(RegisterUserStateMachine.Completed); }
public void The_visualizer_should_work() { var workflow = new RegisterUserStateMachine(); StateMachineInspector.Trace(workflow); }