Пример #1
0
        public void TestGetTouristSpotBad()
        {
            ContextObl             context         = ContextFactory.GetMemoryContext(Guid.NewGuid().ToString());
            ITouristSpotRepository touristSpotRepo = new TouristSpotRepository(context);

            touristSpotRepo.Get(aTouristSpot.Id);
        }
Пример #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);
        }