1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using NUnit.Framework;
using Monodoc;
namespace MonoTests.Monodoc
{
[TestFixture]
public class NodeTest
{
const string BaseDir = "../../class/monodoc/Test/monodoc_test/";
[Test]
public void LegacyNodesTest_30 ()
{
TestLegacyNodesSameAsChildNodes ("tree-from-3-0.tree");
}
[Test]
public void LegacyNodesTest_210 ()
{
TestLegacyNodesSameAsChildNodes ("tree-from-2-10.tree");
}
[Test]
public void LegacyNodesTest_30old ()
{
TestLegacyNodesSameAsChildNodes ("tree-from-3-0-old.tree");
}
void TestLegacyNodesSameAsChildNodes (string treeFileName)
{
var filePath = Path.Combine (BaseDir, "trees", treeFileName);
var tree = new Tree (null, filePath);
CollectionAssert.AreEqual (tree.RootNode.ChildNodes, tree.RootNode.Nodes);
}
}
}
|