public static void TestToString() { StackFrame frame = new StackFrame("dude", 6, 6); string str = StackTraces.ToString(frame); Assert.AreEqual("NewRelic.Agent.Core.Utils.StackTracesTest.TestToString(dude:6)", str); }
public static void TestListToString() { StackFrame frame = new StackFrame("dude", 6, 6); ICollection <string> strings = StackTraces.ToStringList(new StackFrame[] { frame }); Assert.AreEqual(1, strings.Count); IEnumerator <string> en = strings.GetEnumerator(); Assert.That(en.MoveNext()); Assert.AreEqual(StackTraces.ToString(frame), en.Current); }