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

            touristSpotRepo.Get(aTouristSpot.Id);
        }
Example #2
0
        public void TestGetTouristSpotOK()
        {
            ContextObl             context         = ContextFactory.GetMemoryContext(Guid.NewGuid().ToString());
            ITouristSpotRepository touristSpotRepo = new TouristSpotRepository(context);
            IRepository <Region>   regionRepo      = new BaseRepository <Region>(context);

            regionRepo.Add(aRegion);
            touristSpotRepo.Add(aTouristSpot);
            TouristSpot touristSpotOfDb = touristSpotRepo.Get(aTouristSpot.Id);

            Assert.AreEqual(aTouristSpot, touristSpotOfDb);
        }