Ejemplo n.º 1
0
        public void TestMethodProtected()
        {
            // direct
            MethodInfo m = IntrospectionUtil.FindMethod(typeof(ClassFixtureC), "setProtectedC", __INTEGER_ARG, true, false);

            Assert.AreEqual(m, protectedCMethod);

            //inherited
            m = IntrospectionUtil.FindMethod(typeof(ClassFixtureD), "setProtectedC", __INTEGER_ARG, true, false);
            Assert.AreEqual(m, protectedCMethod);
        }
Ejemplo n.º 2
0
        public void TestMethodDefault()
        {
            // direct
            MethodInfo m = IntrospectionUtil.FindMethod(typeof(ClassFixtureC), "setInternalC", __INTEGER_ARG, true, false);

            Assert.AreEqual(m, defaultCMethod);

            //inherited
            m = IntrospectionUtil.FindMethod(typeof(ClassFixtureD), "setInternalC", __INTEGER_ARG, true, false);
            Assert.AreEqual(m, defaultCMethod);
        }
Ejemplo n.º 3
0
        public void TestMethodPrivate()
        {
            //direct
            MethodInfo m = IntrospectionUtil.FindMethod(typeof(ClassFixtureC), "setPrivateC", __INTEGER_ARG, true, false);

            Assert.AreEqual(m, privateCMethod);

            try
            {
                IntrospectionUtil.FindMethod(typeof(ClassFixtureD), "setPrivateC", __INTEGER_ARG, true, false);
                Assert.Fail("Private method should not be inherited");
            }
            catch (ArgumentException)
            {
            }
        }