public void OnePublicAdsTest() { var ad = new AdVO { Typology = "GARAGE", Description = "Garaje de prueba", Pictures = new List <int>(), HouseSize = 150, Score = 40 }; _adRepository.Save(ad); var data = _service.GetPublicAds(); Assert.NotNull(data); Assert.True(data.Count == 1); Assert.True(data[0].Description == "Garaje de prueba"); _adRepository.Delete(ad); }
public void AddAndRemoveTest() { var ad = new AdVO { Typology = "GARAGE", Description = "Garaje de prueba", Pictures = new List <int>(), HouseSize = 150 }; _adRepository.Save(ad); var value = _adRepository.GetById(ad.Id); Assert.NotNull(value); Assert.True(value.Description == "Garaje de prueba"); _adRepository.Delete(value); Assert.Null(_adRepository.GetById(ad.Id)); }