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_Property()
        {
            PropertyInfo property = typeof(DocumentedClass).GetProperty("DocumentedProperty");

            Assert.AreEqual("P:MbUnit.TestResources.DocumentedClass.DocumentedProperty",
                            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 FormatId_GenericNestedTypeDefinition()
        {
            Type type = typeof(DocumentedClass.GenericNestedClass <>);

            Assert.AreEqual("T:MbUnit.TestResources.DocumentedClass.GenericNestedClass`1",
                            XmlDocumentationUtils.FormatId(type));
        }
        public void FormatId_Field()
        {
            FieldInfo field = typeof(DocumentedClass).GetField("DocumentedField");

            Assert.AreEqual("F:MbUnit.TestResources.DocumentedClass.DocumentedField",
                            XmlDocumentationUtils.FormatId(field));
        }
        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));
        }
        public void FormatId_Type()
        {
            Type type = typeof(DocumentedClass);

            Assert.AreEqual("T:MbUnit.TestResources.DocumentedClass",
                            XmlDocumentationUtils.FormatId(type));
        }
        public void FormatId_Finalizer()
        {
            MethodInfo method = typeof(DocumentedClass).GetMethod("Finalize", BindingFlags.Instance | BindingFlags.NonPublic);

            Assert.AreEqual("M:MbUnit.TestResources.DocumentedClass.Finalize",
                            XmlDocumentationUtils.FormatId(method));
        }
        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));
        }
        public void FormatId_ConstructorMethod()
        {
            ConstructorInfo method = typeof(DocumentedClass).GetConstructor(new Type[] { });

            Assert.AreEqual("M:MbUnit.TestResources.DocumentedClass.#ctor",
                            XmlDocumentationUtils.FormatId(method));
        }
        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));
        }
        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));
        }
        public void FormatId_Method()
        {
            MethodInfo method = typeof(DocumentedClass).GetMethod("DocumentedMethod", new Type[] { });

            Assert.AreEqual("M:MbUnit.TestResources.DocumentedClass.DocumentedMethod",
                            XmlDocumentationUtils.FormatId(method));
        }
        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));
        }
        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));
        }
 public void FormatId_ThrowsIfNull()
 {
     XmlDocumentationUtils.FormatId(null);
 }