Exemple #1
0
        public void Alterar_Tarefa_Sucesso()
        {
            var alterarTarefaRequest = new AlterarTarefaRequest()
            {
                Descricao = "Alteração de tarefa com sucesso.",
                UsuarioId = 1,
                Situacao  = Service.Enum.SituacaoEnum.Feitos
            };

            var tarefa = _tarefaAdapter.ConverteAlterarTarefaRequestParaTarefa(alterarTarefaRequest);

            _tarefaRepositoryMock.Setup(repository => repository.Criar(tarefa)).Returns(true);
            var response = _tarefaService.Alterar(alterarTarefaRequest);

            Assert.True(response);
        }
 public bool Alterar(Tarefa tarefa)
 {
     try
     {
         return(service.Alterar(tarefa));
     }
     catch (Exception error)
     {
         Console.WriteLine($"Erro ao Alterar Tarefa! Erro: ", error.Message);
         throw;
     }
 }