public void TestDeleteScaleNotInUse() { DifficultyLevelScale scale = _dataGenerator.CreateDifficultyLevelScale(); IDifficultyLevelScaleDao difficultyLevelScaleDao = new DifficultyLevelScaleDao(_graphClient); difficultyLevelScaleDao.Delete(scale); Assert.AreEqual(0, difficultyLevelScaleDao.GetAll().Count); }
public void TestDeleteScaleInUse() { DifficultyLevelScale scale = _dataGenerator.CreateDifficultyLevelScale(); DifficultyLevel levelWithScale = _dataGenerator.CreateDifficultyLevel(difficultyLevelScale: scale); IDifficultyLevelScaleDao difficultyLevelScaleDao = new DifficultyLevelScaleDao(_graphClient); Action action = ()=>difficultyLevelScaleDao.Delete(scale); action.ShouldThrow<NodeInUseException>(); }