コード例 #1
0
 public void TestDeleteScaleNotInUse()
 {
     DifficultyLevelScale scale = _dataGenerator.CreateDifficultyLevelScale();
     IDifficultyLevelScaleDao difficultyLevelScaleDao = new DifficultyLevelScaleDao(_graphClient);
     difficultyLevelScaleDao.Delete(scale);
     Assert.AreEqual(0, difficultyLevelScaleDao.GetAll().Count);
 }
コード例 #2
0
 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>();
 }