public void Delete_DeletesBeerInDatabase_BeerList() { Beer testBeer = new Beer(1, "Tecate", "Lager", 4.5, 15); testBeer.Save(); testBeer.Delete(); List <Beer> resultList = Beer.GetAll(); List <Beer> testList = new List <Beer> { }; CollectionAssert.AreEqual(testList, resultList); }
public void EliminarCerveza() { int ultimaId = ObtenerUltimaID(); Beer cerveza = new Beer(ultimaId); bool seElimino = cerveza.Delete(); // confirmamos Beer cervezaEliminada = new Beer(ultimaId); bool noExiste = cervezaEliminada.Id < 1; Assert.IsTrue(seElimino && noExiste, $"No elimino de la base de datos"); }