Example #1
0
        public void TestUpdateTouristSpotNullInvalid()
        {
            ContextObl             context         = ContextFactory.GetMemoryContext(Guid.NewGuid().ToString());
            ITouristSpotRepository touristSpotRepo = new TouristSpotRepository(context);

            touristSpotRepo.Update(null);
        }
Example #2
0
        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);
        }