public void With_New()
		{
			MyClass1 class1 = new MyClassInherited();
			class1.Method();
			
			// this should be one, since we are calling method 
			// on type MyClass1
			Assert.AreEqual(1, class1.Count);
		}
Esempio n. 2
0
        public void With_New()
        {
            MyClass1 class1 = new MyClassInherited();

            class1.Method();

            // this should be one, since we are calling method
            // on type MyClass1
            Assert.AreEqual(1, class1.Count);
        }
		public void With_Reflection()
		{
			MyClass1 class1 = new MyClassInherited();
			
			Type myType = class1.GetType();
			myType.GetMethod("Method").Invoke(class1, null);
			
			// this should be two, since we are getting method dynamically
			// from an object, thus resulting in method MyClassInherited.Method()
			Assert.AreEqual(2, class1.Count);
		}
Esempio n. 4
0
        public void With_Reflection()
        {
            MyClass1 class1 = new MyClassInherited();

            Type myType = class1.GetType();

            myType.GetMethod("Method").Invoke(class1, null);

            // this should be two, since we are getting method dynamically
            // from an object, thus resulting in method MyClassInherited.Method()
            Assert.AreEqual(2, class1.Count);
        }