コード例 #1
0
        public void LineNumber()
        {
            var context = new StackTraceContext(GetType());

            var(expected, actual) = LineNumbers.Get(context);

            AreEqual(expected, actual);
        }
コード例 #2
0
        public void Delegate()
        {
            var context = new StackTraceContext(GetType());

            var(expected1, actual1) = Delegate1();
            var(expected2, actual2) = Delegate2(context);

            AreEqual(expected1, actual1);
            AreEqual(expected2, actual2);

            (int Expected, int Actaul) Delegate1()
            {
                return(LineNumbers.Get(context));
            }
コード例 #3
0
 static (int Expected, int Actual) Delegate2(StackTraceContext context)
 {
     return(LineNumbers.Get(context));
 }