public void C10_rootContainsTest() { ContainsNode root = new ContainsNode("root", null, true); Assert.AreNotEqual(null, root); Assert.AreEqual(0, root.getNbDocuments()); Assert.AreEqual(null, root.next()); Assert.AreEqual("root", root.getName()); Assert.AreEqual(null, root.getParent()); }
public void C11_rootChildrensContainsTest() { ContainsNode root = new ContainsNode("root", null, true); ContainsNode child1 = new ContainsNode("child1", root, true); ContainsNode child11 = new ContainsNode("child11", child1, true); ContainsNode child2 = new ContainsNode("child2", root, true); ContainsNode child21 = new ContainsNode("child21", child2, true); ContainsNode child22 = new ContainsNode("child22", child2, true); Assert.AreEqual("child11", child11.getName(), "child11.getDocumentName()"); Assert.AreEqual("child1", child11.getParent().getName(), "child11.getParent()"); Assert.AreEqual("child22", child22.getName(), "child22.getDocumentName()"); Assert.AreEqual("child2", child22.getParent().getName(), "child22.getParent()"); Assert.AreEqual("child2", child2.getName(), "child2.getDocumentName()"); Assert.AreEqual("root", child2.getParent().getName(), "child2.getParent()"); }