Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Melnikov <mikhail_melnikov@epam.com>2017-12-19 11:47:45 +0300
committerJoel Martinez <joelmartinez@gmail.com>2017-12-22 23:30:40 +0300
commit232c0a4f4b2a746306231dcb838a48045e6c8b7a (patch)
tree31fc72356471546e8ea85ac5d966614b9623b64a /mdoc/mdoc.Test/JsMemberFormatterTests.cs
parent50e702afe9795d91bf2d1b0e61918ea20bd8e37d (diff)
mdoc: Support for Javascript signatures
Added Javascript usage formatter Added unit tests Added `check-monodocer-javascript` integration test `MemberSignature` and `TypsSignature` can contain just `Usage` attribute now, fixed XSD schema
Diffstat (limited to 'mdoc/mdoc.Test/JsMemberFormatterTests.cs')
-rw-r--r--mdoc/mdoc.Test/JsMemberFormatterTests.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/mdoc/mdoc.Test/JsMemberFormatterTests.cs b/mdoc/mdoc.Test/JsMemberFormatterTests.cs
new file mode 100644
index 00000000..a710457e
--- /dev/null
+++ b/mdoc/mdoc.Test/JsMemberFormatterTests.cs
@@ -0,0 +1,40 @@
+using mdoc.Mono.Documentation.Updater.Formatters;
+using mdoc.Test.SampleClasses;
+using NUnit.Framework;
+
+namespace mdoc.Test
+{
+ [TestFixture]
+ [Category("Javascript")]
+ [Category("Usage")]
+ class JsMemberFormatterTests : BasicFormatterTests<JsMemberFormatter>
+ {
+ protected override JsMemberFormatter formatter => new JsMemberFormatter();
+
+
+ #region Methods
+ [Test]
+ [Category("Methods")]
+ public void Test_AyncMethod()
+ => TestMethodSignature(typeof(SomeClass),
+ "function asyncMethod()",
+ nameof(SomeClass.AsyncMethod));
+ #endregion
+
+ #region Types
+ [Test]
+ [Category("Types")]
+ [Category("Constructors")]
+ public void Test_Constructor_0()
+ => TestTypeSignature(typeof(TestClass),
+ "function TestClass()");
+
+ [Test]
+ [Category("Types")]
+ [Category("Constructors")]
+ public void Test_Constructor_1()
+ => TestTypeSignature(typeof(SomeClass),
+ "function SomeClass(i, j)");
+ #endregion
+ }
+} \ No newline at end of file