예제 #1
0
        public void MethodFunc2()
        {
            var actual = NameOf.Method <MethodTests, int>(x => this.DummyMethod(0));

            Assert.AreEqual(nameof(this.DummyMethod), actual);
        }
예제 #2
0
        public void MethodFunc()
        {
            var actual = NameOf.Method <MethodTests>(x => DummyMethod(0));

            Assert.AreEqual("DummyMethod", actual);
        }
예제 #3
0
        public void MethodAction2()
        {
            var actual = NameOf.Method(() => this.DummyMethod(0));

            Assert.AreEqual(nameof(this.DummyMethod), actual);
        }
예제 #4
0
        public void MethodAction()
        {
            var actual = NameOf.Method(() => DummyMethod(0));

            Assert.AreEqual("DummyMethod", actual);
        }