Advertisement
pszczyg

Untitled

Jul 27th, 2016
990
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1.    [TestFixture]
  2.    public class DebugUtilsTests
  3.    {
  4.        [Test]
  5.        public void GetCallerName_ReturnsProperName()
  6.        {
  7.            var actual = Deep1();
  8.            Assert.AreEqual($"{nameof(DebugUtilsTests)}.{nameof(Deep3)}", actual);
  9.        }
  10.  
  11.        private string Deep1() => Deep2();
  12.  
  13.        private string Deep2() => Deep3();
  14.  
  15.        private string Deep3() => Deep4();
  16.  
  17.        private string Deep4() => DebugUtils.GetCallerName();
  18.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement