public void Update() { InitializeDataBase(); Pendencia pedencia = new Pendencia() { Id = 2, Descricao = "Luiz Atualizado", Data = "sla" }; // Use a clean instance of the context to run the test using (var context = new PendenciaContext(options)) { PendenciaController pendenciaController = new PendenciaController(context); Pendencia cli = pendenciaController.PutPendencia(2, pedencia).Result.Value; Assert.Equal(pedencia.Descricao, cli.Descricao); } }
public void Update() { InitializeDataBase(); Pendencia pendencia = new Pendencia() { Id = 3, Descricao = "Descrição 3", Data = "06/04/2021" }; // Use a clean instance of the context to run the test using (var context = new PendenciaContext(options)) { PendenciaController pendenciaController = new PendenciaController(context); Pendencia pend = pendenciaController.PutPendencia(3, pendencia).Result.Value; Assert.Equal("Descrição 3", pend.Descricao); } }