示例#1
0
    public async Task Exception_message_and_errors()
    {
        var message   = new MessageWithValidator();
        var exception = await Send(message);

        ObjectApprover.VerifyWithJson(new { exception.Message, exception.Errors });
    }
示例#2
0
    public async Task With_validator_valid()
    {
        var message = new MessageWithValidator
        {
            Content = "content"
        };

        Assert.Null(await Send(message));
    }
示例#3
0
    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);
 }
示例#5
0
    public async Task With_validator_invalid()
    {
        var message = new MessageWithValidator();

        Assert.NotNull(await Send(message));
    }
示例#6
0
    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)));
    }
示例#8
0
    public async Task With_uow_validator()
    {
        var message = new MessageWithValidator();

        Assert.NotNull(await Send(message, ValidatorLifecycle.UnitOfWork));
    }