public void DestroyTree_Twice_ReturnsFalse() { const int treeUserID = 10; CSGTree tree = CSGTree.Create(treeUserID); CSGManager.ClearDirty(tree); var result1 = tree.Destroy(); var result2 = tree.Destroy(); Assert.AreEqual(true, result1); Assert.AreEqual(false, result2); TestUtility.ExpectInvalidTree(ref tree); Assert.AreEqual(0, CSGManager.TreeCount); Assert.AreEqual(0, CSGManager.TreeNodeCount); }
public void DestroyTree_Twice_ReturnsFalse() { const int treeUserID = 10; CSGTree tree = CSGTree.Create(treeUserID); CompactHierarchyManager.ClearDirty(tree); var result1 = tree.Destroy(); var result2 = tree.Destroy(); LogAssert.Expect(LogType.Error, new Regex("is invalid")); Assert.IsTrue(result1); Assert.IsFalse(result2); TestUtility.ExpectInvalidTree(ref tree); }
public void DestroyTree() { const int treeUserID = 10; CSGTree tree = CSGTree.Create(treeUserID); CompactHierarchyManager.ClearDirty(tree); var result = tree.Destroy(); Assert.IsTrue(result); TestUtility.ExpectInvalidTree(ref tree); }
public void DestroyTree() { const int treeUserID = 10; CSGTree tree = CSGTree.Create(treeUserID); CSGManager.ClearDirty(tree); var result = tree.Destroy(); Assert.AreEqual(true, result); TestUtility.ExpectInvalidTree(ref tree); Assert.AreEqual(0, CSGManager.TreeCount, "Expected 0 Trees to Exist"); Assert.AreEqual(0, CSGManager.TreeNodeCount, "Expected 0 TreeNodes to Exist"); }