diff options
author | Mikhail Melnikov <mikhail_melnikov@epam.com> | 2018-05-10 13:22:17 +0300 |
---|---|---|
committer | Mikhail Melnikov <mikhail_melnikov@epam.com> | 2018-05-10 13:22:17 +0300 |
commit | 03edf10b03e5136508dd8b8bdb21b55af650a819 (patch) | |
tree | 26fc65c78a1d22cfaf3fbd134016e46a16583b48 /mdoc/mdoc.Test/BasicTests.cs | |
parent | 90c6935eaf1336be53ccd6c80037653137a4344b (diff) |
Allow `mdoc assemble` to assemble docs from a single framework #194
Added fx/framework CLI parameter for the assemle command
Filter out types, which are not mentioned in the framework file
Appropriately filter any parameter that has a @FrameworkAlternate attribute
Added unit tests for assemble single framework mode
Added unit tests if no framework passed
Closes #194
Diffstat (limited to 'mdoc/mdoc.Test/BasicTests.cs')
-rw-r--r-- | mdoc/mdoc.Test/BasicTests.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mdoc/mdoc.Test/BasicTests.cs b/mdoc/mdoc.Test/BasicTests.cs index cddbcbd8..c06642c7 100644 --- a/mdoc/mdoc.Test/BasicTests.cs +++ b/mdoc/mdoc.Test/BasicTests.cs @@ -1,7 +1,10 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; +using System.Xml.Linq; using Mono.Cecil; +using Mono.Documentation.Framework; namespace mdoc.Test { @@ -41,5 +44,18 @@ namespace mdoc.Test var moduleName = type.Module.FullyQualifiedName; return GetType(moduleName, type.FullName); } + + protected static XDocument ReadXDocument(string xml) + { + using (TextReader stringReader = new StringReader(xml)) + { + return XDocument.Load(stringReader); + } + } + + protected static string NormalizeXml(string xml) + { + return ReadXDocument(xml).ToString(); + } } }
\ No newline at end of file |