public void TargetProcessIsDown() { TransportMock.ResetAllOnMessageHandlers(); TransportMock.OnCreateEntityCommand <BugDTO>().Reply( x => new TargetProcessExceptionThrownMessage { ExceptionString = "TargetProcess is down." }); }
private void AddReplyForCreateCommand <TDto, TReplyMessage>(ICollection <TDto> dtos) where TReplyMessage : EntityCreatedMessage <TDto>, ISagaMessage, new() where TDto : DataTransferObject, new() { TransportMock.OnCreateEntityCommand <TDto>().Reply( x => { x.ID = GetNextId(); dtos.Add(x); return(new TReplyMessage { Dto = x }); }); }