Exemple #1
0
        public static void TestMethodToStringTwoParameters()
        {
            MethodBase method = typeof(StackTrace).GetConstructor(new Type[] { typeof(Exception), typeof(int) });
            string     str    = StackTraces.MethodToString(method);

            Assert.AreEqual("System.Diagnostics.StackTrace..ctor(System.Exception e,System.Int32 skipFrames)", str);
        }
Exemple #2
0
        public static void TestMethodToStringNoParameters()
        {
            MethodInfo method = typeof(StackTrace).GetMethod("GetFrames");
            string     str    = StackTraces.MethodToString(method);

            Assert.AreEqual("System.Diagnostics.StackTrace.GetFrames()", str);
        }
Exemple #3
0
        public static void TestMethodToStringsOneParameter()
        {
            MethodInfo method = typeof(StackTrace).GetMethod("GetFrame");
            string     str    = StackTraces.MethodToString(method);

            Assert.AreEqual("System.Diagnostics.StackTrace.GetFrame(System.Int32 index)", str);
        }