Files
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
external
mdoc
mdoc.Test.Cplusplus
monodoc
Assembly
Mono.Documentation
Mono.Utilities
Monodoc
Monodoc.Ecma
Properties
Resources
Test
Monodoc
EcmaDocTests.cs
HelpSourceTests.cs
NodeTest.cs
RootTreeTest.cs
SettingsTest.cs
TreeTest.cs
Monodoc.Ecma
Monodoc.Generators
monodoc_test
Monodoc.Test.csproj
packages.config
Makefile
jay.sh
monodoc.csproj
monodoc.dll.config
tools
.gitignore
.gitmodules
CONTRIBUTING.md
LICENSE.md
Makefile
README.md
apidoctools.sln
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
linux-packaging-mono/external/api-doc-tools/monodoc/Test/Monodoc/TreeTest.cs
Xamarin Public Jenkins (auto-signing) 536cd135cc Imported Upstream version 5.4.0.167
Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
2017-08-21 15:34:15 +00:00

45 lines
1017 B
C#

using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using NUnit.Framework;
using Monodoc;
namespace MonoTests.Monodoc
{
[TestFixture]
public class TreeTest
{
[Test]
public void TestLoadingTree_2_10 ()
{
TestTreeLoading ("tree-from-2-10.tree", 0, 2);
}
[Test]
public void TestLoadingTree_3_0_old ()
{
TestTreeLoading ("tree-from-3-0-old.tree", 1, 2);
}
[Test]
public void TestLoadingTree_3_0 ()
{
TestTreeLoading ("tree-from-3-0.tree", 1, 2);
}
void TestTreeLoading (string treeFileName, int expectedVersion, int expectedNodeCount, [CallerFilePath] string baseDir = "")
{
var filePath = Path.Combine (Path.GetDirectoryName (baseDir), "..", "monodoc_test", "trees", treeFileName);
var tree = new Tree (null, filePath);
Assert.AreEqual (expectedVersion, tree.VersionNumber);
Assert.IsNotNull (tree.RootNode);
Assert.AreEqual (expectedNodeCount, tree.RootNode.ChildNodes.Count);
}
}
}