Exemple #1
0
        public void GetNameExt_Test()
        {
            ((TestPropertyNames)null).GetPropertyName(x => x.D2).ShouldEqual("D2");

            var obj = new TestPropertyNames();

            obj.GetPropertyName(x => x.D2).ShouldEqual("D2");
        }
Exemple #2
0
        public void GetNameForObject_Test()
        {
            var sut = new TestPropertyNames();

            ReflectionHelper.GetName(() => sut.D2).ShouldEqual("D2");
            ReflectionHelper.GetName(() => sut.S2).ShouldEqual("S2");
            ReflectionHelper.GetName(() => sut.I2).ShouldEqual("I2");
        }