예제 #1
0
        public void TestPropertyPublic()
        {
            // direct
            PropertyInfo m = IntrospectionUtil.FindProperty(typeof(ClassFixtureE), "PublicE", false);

            Assert.AreEqual(m, publicEProperty);

            //inherited
            m = IntrospectionUtil.FindProperty(typeof(ClassFixtureF), "PublicE", true);
            Assert.AreEqual(m, publicEProperty);
        }
예제 #2
0
        public void TestPropertyDefault()
        {
            // direct
            PropertyInfo m = IntrospectionUtil.FindProperty(typeof(ClassFixtureE), "InternalE", false);

            Assert.AreEqual(m, defaultEProperty);

            //inherited
            m = IntrospectionUtil.FindProperty(typeof(ClassFixtureF), "InternalE", true);
            Assert.AreEqual(m, defaultEProperty);
        }
예제 #3
0
        public void TestPropertyPrivate()
        {
            // direct
            PropertyInfo m = IntrospectionUtil.FindProperty(typeof(ClassFixtureE), "PrivateE", false);

            Assert.AreEqual(m, privateEProperty);

            try
            {
                IntrospectionUtil.FindProperty(typeof(ClassFixtureF), "PrivateE", true);
                Assert.Fail("Should Be Null");
            }
            catch (ArgumentException)
            {
            }
        }