コード例 #1
0
        public void XmlDocumentKeyMethodBaseKeyPointerTest()
        {
            var c = typeof(XmlDocumenterTestClassUnsafe);
            var methodWithPointerParam = c.GetMethod("UnsafeMethod");

            Assert.AreEqual(
                "M:FixtureExplorerTest.XmlDocumenterTestClassUnsafe.UnsafeMethod(System.Int32*)",
                XmlDocumentKey.MethodBaseKey(methodWithPointerParam)
                );
        }
コード例 #2
0
        public void XmlDocumentKeyMethodBaseKeyNestedClassTest()
        {
            var testClass       = typeof(XmlDocumenterTestClass.NestedClass);
            var voidConstructor = testClass.GetConstructor(Array.Empty <Type>());

            Assert.AreEqual(
                "M:FixtureExplorerTest.XmlDocumenterTestClass.NestedClass.#ctor",
                XmlDocumentKey.MethodBaseKey(voidConstructor)
                );
        }
コード例 #3
0
        public void XmlDocumentKeyMethodBaseKeyPropertyTest()
        {
            var c = typeof(XmlDocumenterTestClass);
            var setArrayProperty = c.GetMethod("set_ArrayProperty");

            Assert.AreEqual(
                "P:FixtureExplorerTest.XmlDocumenterTestClass.ArrayProperty",
                XmlDocumentKey.MethodBaseKey(setArrayProperty));
            var getArrayProperty = c.GetMethod("get_ArrayProperty");

            Assert.AreEqual(
                "P:FixtureExplorerTest.XmlDocumenterTestClass.ArrayProperty",
                XmlDocumentKey.MethodBaseKey(getArrayProperty)
                );
        }
コード例 #4
0
        public void XmlDocumentKeyMethodBaseKeyTest()
        {
            var c = typeof(XmlDocumenterTestClass);
            var voidConstructor = c.GetConstructor(Array.Empty <Type>());

            Assert.AreEqual(
                "M:FixtureExplorerTest.XmlDocumenterTestClass.#ctor",
                XmlDocumentKey.MethodBaseKey(voidConstructor)
                );
            var nullableDoubleConstructor = c.GetConstructor(new[] { typeof(double?) });

            Assert.AreEqual(
                "M:FixtureExplorerTest.XmlDocumenterTestClass.#ctor(System.Nullable{System.Double})",
                XmlDocumentKey.MethodBaseKey(nullableDoubleConstructor)
                );
            var echoMethod = c.GetMethod("Echo");

            Assert.AreEqual(
                "M:FixtureExplorerTest.XmlDocumenterTestClass.Echo(System.Object@)",
                XmlDocumentKey.MethodBaseKey(echoMethod)
                );
        }
コード例 #5
0
 public void XmlDocumentKeyMethodBaseKeyNullMethodTest()
 {
     Assert.IsNull(XmlDocumentKey.MethodBaseKey(null));
 }