public async Task Deve_atualizar_Contato_com_sucesso() { var nome = "TestAtualizar"; var contatoViewModel = CreateViewModel(nome: nome); var id = await _contatosAppService.Create(contatoViewModel); contatoViewModel.Id = id; contatoViewModel.Nome = $"{contatoViewModel.Nome}_XXXXXX"; Assert.True(await _contatosAppService.Update(contatoViewModel)); Assert.True(NotificationContext.Successfully); }
public async Task <IActionResult> Update(int id, [FromBody] ContatoViewModel viewModel) { return(await TryExecuteAsync(_contatosAppService.Update(viewModel))); }