public void StackNodeDoesNoContainRemovedElements() { // Create a stack StackNode stack = CreateStackNode(k_DefaultX, k_DefaultY); stack.AddElement(m_Node1); stack.AddElement(m_Node2); // Verify that a node is properly removed from its containing stack stack.RemoveElement(m_Node1); Assert.AreEqual(1, stack.childCount); Assert.IsFalse(stack.Contains(m_Node1)); Assert.IsNull(m_Node1.parent); stack.RemoveElement(m_Node2); Assert.AreEqual(0, stack.childCount); Assert.IsFalse(stack.Contains(m_Node2)); Assert.IsNull(m_Node2.parent); }