public void TestGetTouristSpotBad() { ContextObl context = ContextFactory.GetMemoryContext(Guid.NewGuid().ToString()); ITouristSpotRepository touristSpotRepo = new TouristSpotRepository(context); touristSpotRepo.Get(aTouristSpot.Id); }
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); }