public void TestDeleteInUse() { Area area = _dataGenerator.CreateArea(); Route route = _dataGenerator.CreateRouteInArea(area: area); IAreaDao areaDao = new AreaDao(_graphClient); Action action = ()=>areaDao.Delete(area); action.ShouldThrow<NodeInUseException>(); }
public void TestDeleteNotInUse() { Country country = _dataGenerator.CreateCountry(); Area area = _dataGenerator.CreateArea(country:country); IAreaDao areaDao = new AreaDao(_graphClient); areaDao.Delete(area); Assert.AreEqual(0,areaDao.GetAllIn(country).Count); }