public async Task Exception_message_and_errors() { var message = new MessageWithValidator(); var exception = await Send(message); ObjectApprover.VerifyWithJson(new { exception.Message, exception.Errors }); }
public async Task With_validator_valid() { var message = new MessageWithValidator { Content = "content" }; Assert.Null(await Send(message)); }
public Task With_validator_valid() { var message = new MessageWithValidator { Content = "content" }; return(Send(message)); }
public Task Handle(MessageWithValidator message, IMessageHandlerContext context) { resetEvent.Set(); return(Task.CompletedTask); }
public async Task With_validator_invalid() { var message = new MessageWithValidator(); Assert.NotNull(await Send(message)); }
public Task With_validator_invalid() { var message = new MessageWithValidator(); return(Assert.ThrowsAsync <ValidationException>(() => Send(message))); }
public Task With_uow_validator() { var message = new MessageWithValidator(); return(Assert.ThrowsAsync <ValidationException>(() => Send(message, ValidatorLifecycle.UnitOfWork))); }
public async Task With_uow_validator() { var message = new MessageWithValidator(); Assert.NotNull(await Send(message, ValidatorLifecycle.UnitOfWork)); }