Пример #1
0
 public void TestDeleteNormal()
 {
     Route route = _dataGenerator.CreateRouteInArea();
     Variation variationWithoutLogEntries = _dataGenerator.CreateVariation(route:route);
     IVariationDao variationDao = new VariationDao(_graphClient);
     variationDao.Delete(variationWithoutLogEntries);
     Assert.AreEqual(0, variationDao.GetAllOn(route).Count);
 }
Пример #2
0
        public void TestDeleteInUse()
        {
            Variation variationWithLogEntry = _dataGenerator.CreateVariation();
            LogEntry logEntry = _dataGenerator.CreateLogEntry(variationWithLogEntry);

            IVariationDao variationDao = new VariationDao(_graphClient);
            Action action = ()=> variationDao.Delete(variationWithLogEntry);
            action.ShouldThrow<NodeInUseException>();
        }