public void TestDeleteUsed() { Summit summit = _dataGenerator.CreateSummit(); Route route = _dataGenerator.CreateRouteInSummit(summit: summit); ISummitDao summitDao = new SummitDao(_graphClient); Action action = () => summitDao.Delete(summit); action.ShouldThrow <NodeInUseException>(); }
public void TestDeleteUnused() { SummitGroup summitGroup = _dataGenerator.CreateSummitGroup(); Summit summit = _dataGenerator.CreateSummit(summitGroup: summitGroup); ISummitDao summitDao = new SummitDao(_graphClient); summitDao.Delete(summit); Assert.AreEqual(0, summitDao.GetAllIn(summitGroup).Count); }