public void CreateUser_WithMandatoryParameters_Calls_CreateUserCommand_Once() { _createUserCommand.Setup(s => s.Execute(createUserModel)).ReturnsAsync(1); Task <int> result = _createUser.Execute(createUserModel); _createUserCommand.Verify(v => v.Execute(createUserModel), Times.Once); }
public void CreateUser_WithoutFirstName_NeverCalls_CreateUserCommand() { createUserModel.FirstName = string.Empty; Task <int> result = _createUser.Execute(createUserModel); _createUserCommand.Verify(v => v.Execute(createUserModel), Times.Never); }
public async Task CreateUser(string nome, string login, string email, int roleId) { await createUser.Execute(nome, login, email, roleId); }
public async Task <Guid> Post([FromBody] UserCreateModel user) { return(await _createUser.Execute(user.To())); }
public async Task <Domain.Entities.Usuario> CreateUser(string nome, string login, string email, int roleId) { return(await createUser.Execute(nome, login, email, roleId)); }