Ejemplo n.º 1
0
        public static void TestGetValue14()
        {
            string       propertyName = "Property2";
            Object       obj          = new LaterClass();
            PropertyInfo pi           = GetProperty(typeof(LaterClass), propertyName);


            Assert.Equal(pi.Name, propertyName);

            int value = (int)pi.GetValue(obj);

            Assert.Equal(value, 100);
        }
Ejemplo n.º 2
0
        public static void TestGetValue13()
        {
            string       propertyName = "Property1";
            Object       obj          = new LaterClass();
            PropertyInfo pi           = GetProperty(typeof(LaterClass), propertyName);


            Assert.Equal(pi.Name, propertyName);

            Assert.Throws <ArgumentException>(() =>
            {
                var value = pi.GetValue(obj, null);;
            });
        }
Ejemplo n.º 3
0
        public static void TestGetValue14()
        {
            string propertyName = "Property2";
            Object obj = new LaterClass();
            PropertyInfo pi = GetProperty(typeof(LaterClass), propertyName);


            Assert.Equal(pi.Name, propertyName);

            int value = (int)pi.GetValue(obj);

            Assert.Equal(value, 100);
        }
Ejemplo n.º 4
0
        public static void TestGetValue13()
        {
            string propertyName = "Property1";
            Object obj = new LaterClass();
            PropertyInfo pi = GetProperty(typeof(LaterClass), propertyName);


            Assert.Equal(pi.Name, propertyName);

            Assert.Throws<ArgumentException>(() =>
            {
                var value = pi.GetValue(obj, null); ;
            });
        }