Пример #1
0
    public async Task RegisterUser_IsSuccessful()
    {
        var command = new RegisterUserCommand
        {
            Email    = "*****@*****.**",
            Name     = "bruce.lin",
            Password = "******"
        };

        var userId = await _mediator.Send(command);

        var user = await _userQuery.GetUserAsync(userId);

        Assert.Equal(command.Email, user.Email);
        Assert.Equal(command.Email, user.UserName);
        Assert.Equal(command.Name, user.Name);
        Assert.True(user.IsActive);
    }