public void TestChildSceneNodeRemoval() { SceneManager sceneManager = new StubSceneManager("Manager under test"); SceneNode node = sceneManager.CreateSceneNode("testNode"); SceneNode childNode = node.CreateChildSceneNode("childNode"); Assert.IsTrue(ManagerContainsNode(sceneManager, childNode), "A child node was created but not added to the scene graph."); node.RemoveChild(childNode.Name); Assert.IsTrue(ManagerContainsNode(sceneManager, childNode), "A child node was removed from its parent but also incorrectly removed from the scene graph."); }
public void TestChildSceneNodeRemoval() { SceneManager sceneManager = new StubSceneManager( "Manager under test" ); SceneNode node = sceneManager.CreateSceneNode( "testNode" ); SceneNode childNode = node.CreateChildSceneNode( "childNode" ); Assert.IsTrue( ManagerContainsNode( sceneManager, childNode ), "A child node was created but not added to the scene graph." ); node.RemoveChild( childNode.Name ); Assert.IsTrue( ManagerContainsNode( sceneManager, childNode ), "A child node was removed from its parent but also incorrectly removed from the scene graph." ); }
public void TestChildSceneNodeDestructionByName() { SceneManager sceneManager = new StubSceneManager("Manager under test"); SceneNode node = sceneManager.CreateSceneNode("testNode"); SceneNode childNode = node.CreateChildSceneNode("childNode"); Assert.IsTrue(ManagerContainsNode(sceneManager, childNode), "A child node was created but not added to the scene graph."); node.RemoveAndDestroyChild(childNode.Name); Assert.IsFalse(ManagerContainsNode(sceneManager, childNode), "A child node was destroyed but not removed from the scene graph."); }
public void TestChildSceneNodeDestructionByName() { SceneManager sceneManager = new StubSceneManager( "Manager under test" ); SceneNode node = sceneManager.CreateSceneNode( "testNode" ); SceneNode childNode = node.CreateChildSceneNode( "childNode" ); Assert.IsTrue( ManagerContainsNode( sceneManager, childNode ), "A child node was created but not added to the scene graph." ); node.RemoveAndDestroyChild( childNode.Name ); Assert.IsFalse( ManagerContainsNode( sceneManager, childNode ), "A child node was destroyed but not removed from the scene graph." ); }