Пример #1
0
        public void ConfirmationMessageIsDispatched_WhenStateIsNotAwaitingConfirmationMessage_ThrowException()
        {
            var processManager = Create();

            var(processId, gsrnNumber, effectiveDate) = CreateTestValues();

            if (processId.Value != null)
            {
                var @event = new ConfirmationMessageDispatched(processId.Value);

                Assert.Throws <InvalidProcessManagerStateException>(() => processManager.When(@event));
            }
        }
Пример #2
0
        public void When(ConfirmationMessageDispatched @event)
        {
            switch (_state)
            {
            case State.AwaitingConfirmationMessageDispatch:
                SetInternalState(State.AwaitingMeteringPointDetailsDispatch);
                SendCommand(new SendMeteringPointDetails(_processId !));
                break;

            default:
                ThrowIfStateDoesNotMatch(@event);
                break;
            }
        }
Пример #3
0
 public Task Handle(ConfirmationMessageDispatched notification, CancellationToken cancellationToken)
 {
     throw new System.NotImplementedException();
 }