public void GetXmlDocumentation_Method()
        {
            MethodInfo method = typeof(DocumentedClass).GetMethod("DocumentedMethod", new Type[] { });

            Assert.AreEqual("<summary>\nA documented method.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(method));
        }
        public void FormatId_Indexer()
        {
            PropertyInfo property = typeof(DocumentedClass).GetProperty("Item");

            Assert.AreEqual("P:MbUnit.TestResources.DocumentedClass.Item(System.Int32)",
                            XmlDocumentationUtils.FormatId(property));
        }
        public void FormatId_Event()
        {
            EventInfo @event = typeof(DocumentedClass).GetEvent("DocumentedEvent");

            Assert.AreEqual("E:MbUnit.TestResources.DocumentedClass.DocumentedEvent",
                            XmlDocumentationUtils.FormatId(@event));
        }
        public void GetXmlDocumentation_Event()
        {
            EventInfo @event = typeof(DocumentedClass).GetEvent("DocumentedEvent");

            Assert.AreEqual("<summary>\nA documented event.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(@event));
        }
        public void GetXmlDocumentation_Indexer()
        {
            PropertyInfo property = typeof(DocumentedClass).GetProperty("Item");

            Assert.AreEqual("<summary>\nA documented indexer.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(property));
        }
        public void GetXmlDocumentation_Field()
        {
            FieldInfo field = typeof(DocumentedClass).GetField("DocumentedField");

            Assert.AreEqual("<summary>\nA documented field.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(field));
        }
        public void GetXmlDocumentation_Property()
        {
            PropertyInfo property = typeof(DocumentedClass).GetProperty("DocumentedProperty");

            Assert.AreEqual("<summary>\nA documented property.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(property));
        }
        public void GetXmlDocumentation_Type()
        {
            Type type = typeof(DocumentedClass);

            Assert.AreEqual("<summary>\nA documented class.\n</summary>\n<remarks>\nThe XML documentation of this test is significant.\n  Including the leading whitespace on this line.\n    And the extra 8 trailing spaces on this line!\n</remarks>",
                            XmlDocumentationUtils.GetXmlDocumentation(type));
        }
        public void GetXmlDocumentation_GenericNestedTypeDefinition()
        {
            Type type = typeof(DocumentedClass.GenericNestedClass <>);

            Assert.AreEqual("<summary>\nA documented generic nested class.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(type));
        }
Пример #10
0
        public void FormatId_ConstructorMethodWithParameters()
        {
            ConstructorInfo method = typeof(DocumentedClass).GetConstructor(new Type[] { typeof(int) });

            Assert.AreEqual("M:MbUnit.TestResources.DocumentedClass.#ctor(System.Int32)",
                            XmlDocumentationUtils.FormatId(method));
        }
Пример #11
0
        public void FormatId_Finalizer()
        {
            MethodInfo method = typeof(DocumentedClass).GetMethod("Finalize", BindingFlags.Instance | BindingFlags.NonPublic);

            Assert.AreEqual("M:MbUnit.TestResources.DocumentedClass.Finalize",
                            XmlDocumentationUtils.FormatId(method));
        }
Пример #12
0
        public void FormatId_ConstructorMethod()
        {
            ConstructorInfo method = typeof(DocumentedClass).GetConstructor(new Type[] { });

            Assert.AreEqual("M:MbUnit.TestResources.DocumentedClass.#ctor",
                            XmlDocumentationUtils.FormatId(method));
        }
Пример #13
0
        public void FormatId_ExplicitConversionOperatorMethod()
        {
            MethodInfo method = typeof(DocumentedClass).GetMethod("op_Explicit");

            Assert.AreEqual("M:MbUnit.TestResources.DocumentedClass.op_Explicit(MbUnit.TestResources.DocumentedClass)~System.Double",
                            XmlDocumentationUtils.FormatId(method));
        }
Пример #14
0
        public void FormatId_OperatorMethod()
        {
            MethodInfo method = typeof(DocumentedClass).GetMethod("op_Addition");

            Assert.AreEqual("M:MbUnit.TestResources.DocumentedClass.op_Addition(MbUnit.TestResources.DocumentedClass,MbUnit.TestResources.DocumentedClass)",
                            XmlDocumentationUtils.FormatId(method));
        }
Пример #15
0
        public void FormatId_GenericIndexer()
        {
            PropertyInfo method = typeof(DocumentedClass.GenericNestedClass <int>).GetProperty("Item");

            Assert.AreEqual("P:MbUnit.TestResources.DocumentedClass.GenericNestedClass`1.Item(`0)",
                            XmlDocumentationUtils.FormatId(method));
        }
Пример #16
0
        public void FormatId_Property()
        {
            PropertyInfo property = typeof(DocumentedClass).GetProperty("DocumentedProperty");

            Assert.AreEqual("P:MbUnit.TestResources.DocumentedClass.DocumentedProperty",
                            XmlDocumentationUtils.FormatId(property));
        }
Пример #17
0
        public void FormatId_Method()
        {
            MethodInfo method = typeof(DocumentedClass).GetMethod("DocumentedMethod", new Type[] { });

            Assert.AreEqual("M:MbUnit.TestResources.DocumentedClass.DocumentedMethod",
                            XmlDocumentationUtils.FormatId(method));
        }
Пример #18
0
        public void FormatId_Field()
        {
            FieldInfo field = typeof(DocumentedClass).GetField("DocumentedField");

            Assert.AreEqual("F:MbUnit.TestResources.DocumentedClass.DocumentedField",
                            XmlDocumentationUtils.FormatId(field));
        }
Пример #19
0
        public void GetXmlDocumentation_Finalizer()
        {
            MethodInfo method = typeof(DocumentedClass).GetMethod("Finalize", BindingFlags.Instance | BindingFlags.NonPublic);

            Assert.AreEqual("<summary>\nA documented finalizer.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(method));
        }
Пример #20
0
        public void FormatId_GenericNestedTypeDefinition()
        {
            Type type = typeof(DocumentedClass.GenericNestedClass <>);

            Assert.AreEqual("T:MbUnit.TestResources.DocumentedClass.GenericNestedClass`1",
                            XmlDocumentationUtils.FormatId(type));
        }
Пример #21
0
        public void GetXmlDocumentation_ConstructorMethod()
        {
            ConstructorInfo method = typeof(DocumentedClass).GetConstructor(new Type[] { });

            Assert.AreEqual("<summary>\nA documented constructor.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(method));
        }
Пример #22
0
        public void GetXmlDocumentation_ConstructorMethodWithParameters()
        {
            ConstructorInfo method = typeof(DocumentedClass).GetConstructor(new Type[] { typeof(int) });

            Assert.AreEqual("<summary>\nA documented constructor with parameters.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(method));
        }
Пример #23
0
        public void GetXmlDocumentation_ExplicitConversionOperatorMethod()
        {
            MethodInfo method = typeof(DocumentedClass).GetMethod("op_Explicit");

            Assert.AreEqual("<summary>\nA documented explicit conversion operator.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(method));
        }
Пример #24
0
        public void FormatId_Type()
        {
            Type type = typeof(DocumentedClass);

            Assert.AreEqual("T:MbUnit.TestResources.DocumentedClass",
                            XmlDocumentationUtils.FormatId(type));
        }
Пример #25
0
        public void GetXmlDocumentation_OperatorMethod()
        {
            MethodInfo method = typeof(DocumentedClass).GetMethod("op_Addition");

            Assert.AreEqual("<summary>\nA documented operator.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(method));
        }
Пример #26
0
        public void GetXmlDocumentation_GenericIndexer()
        {
            PropertyInfo method = typeof(DocumentedClass.GenericNestedClass <int>).GetProperty("Item");

            Assert.AreEqual("<summary>\nA documented generic indexer.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(method));
        }
Пример #27
0
        public void FormatId_OverloadedMethodWithParameters()
        {
            MethodInfo method = typeof(DocumentedClass).GetMethod("DocumentedMethod",
                                                                  new Type[] { typeof(int), typeof(DocumentedClass), typeof(DocumentedClass.GenericNestedClass <int>) });

            Assert.AreEqual("M:MbUnit.TestResources.DocumentedClass.DocumentedMethod(System.Int32,MbUnit.TestResources.DocumentedClass,MbUnit.TestResources.DocumentedClass.GenericNestedClass{System.Int32})",
                            XmlDocumentationUtils.FormatId(method));
        }
Пример #28
0
        public void GetXmlDocumentation_GenericMethodDefinitionWithParameters()
        {
            MethodInfo method = typeof(DocumentedClass.GenericNestedClass <int>).
                                GetMethod("DocumentedGenericMethodWithParameters").GetGenericMethodDefinition();

            Assert.AreEqual("<summary>\nA documented generic method with parameters.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(method));
        }
Пример #29
0
        public void GetXmlDocumentation_OverloadedMethodWithParameters()
        {
            MethodInfo method = typeof(DocumentedClass).GetMethod("DocumentedMethod",
                                                                  new Type[] { typeof(int), typeof(DocumentedClass), typeof(DocumentedClass.GenericNestedClass <int>) });

            Assert.AreEqual("<summary>\nA documented overloaded method with parameters.\n</summary>",
                            XmlDocumentationUtils.GetXmlDocumentation(method));
        }
Пример #30
0
        public void FormatId_GenericMethodDefinitionWithParameters()
        {
            MethodInfo method = typeof(DocumentedClass.GenericNestedClass <int>).
                                GetMethod("DocumentedGenericMethodWithParameters").GetGenericMethodDefinition();

            Assert.AreEqual("M:MbUnit.TestResources.DocumentedClass.GenericNestedClass`1.DocumentedGenericMethodWithParameters``1(``0,`0,System.Int32)",
                            XmlDocumentationUtils.FormatId(method));
        }