pszczyg

Untitled

Jul 27th, 2016
782
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.    }
RAW Paste Data