diff options
author | Dave Wilson <cdwilson@windows.microsoft.com> | 2019-05-04 00:17:52 +0300 |
---|---|---|
committer | Joel Martinez <joelmartinez@gmail.com> | 2019-05-06 19:32:45 +0300 |
commit | ec8390366e16268f1ff87e78fe52ee2daf66593f (patch) | |
tree | 648f657966f6a58358d82b3a20921985037233f5 /mdoc/mdoc.Test/UWPDocUtilsTests.cs | |
parent | 2579a9a8c5d17e48d9be20000e4b33b81da9980d (diff) |
UWP compiled metadata files use "put_" as the prefix to property setter methods. Enable support to suppress such methods from ecma xml creation.
Diffstat (limited to 'mdoc/mdoc.Test/UWPDocUtilsTests.cs')
-rw-r--r-- | mdoc/mdoc.Test/UWPDocUtilsTests.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mdoc/mdoc.Test/UWPDocUtilsTests.cs b/mdoc/mdoc.Test/UWPDocUtilsTests.cs new file mode 100644 index 00000000..08b869df --- /dev/null +++ b/mdoc/mdoc.Test/UWPDocUtilsTests.cs @@ -0,0 +1,24 @@ +using mdoc.Test.SampleClasses; +using Mono.Documentation.Updater; +using NUnit.Framework; + +namespace mdoc.Test +{ + [TestFixture] + public class UWPDocUtilsTests : BasicTests + { + private const string UWPTestComponentWinMD = "../../../../external/Test/UWPTestComponentCSharp.winmd"; + + [Test] + public void IsIgnored_PutMethodIsGeneratedByProperty_IsIgnoredTrue() + { + var classWithProperties = GetType(UWPTestComponentWinMD, "mdoc.Test.UWP.TestComponent.UwpClassWithProperties"); + + var method = GetMethod(classWithProperties, i => i.Name == "put_MyReadWriteProperty"); + + var isIgnoredPropertyGeneratedMethod = DocUtils.IsIgnored(method); + + Assert.IsTrue(isIgnoredPropertyGeneratedMethod); + } + } +}
\ No newline at end of file |