public void TestUpdateTouristSpotNullInvalid() { ContextObl context = ContextFactory.GetMemoryContext(Guid.NewGuid().ToString()); ITouristSpotRepository touristSpotRepo = new TouristSpotRepository(context); touristSpotRepo.Update(null); }
public void TestUpdateTouristSpotOK() { ContextObl context = ContextFactory.GetMemoryContext(Guid.NewGuid().ToString()); ITouristSpotRepository touristSpotRepo = new TouristSpotRepository(context); touristSpotRepo.Add(aTouristSpot); aTouristSpot.Name = "Piscinas"; touristSpotRepo.Update(aTouristSpot); List <TouristSpot> listOfTouristSpots = touristSpotRepo.GetAll().ToList(); Assert.AreEqual("Piscinas", listOfTouristSpots[0].Name); }