예제 #1
0
        public AboutObjects GetObjectInfo()
        {
            AboutObjects ao = new AboutObjects();

            functions.PullAboutDetails(SessionID(), ref ao);

            return(ao);
        }
예제 #2
0
        public static void objectToString()
        {
            AboutObjects ob = new AboutObjects();

            Console.WriteLine("Object to string");
            String expected = ob.GetType().ToString();

            Console.WriteLine(ob.ToString() == expected);
            Assert.AreEqual(ob.ToString(), ob.GetType().ToString());
        }
예제 #3
0
        public static void allClassesInheritFromObject()
        {
            AboutObjects ob = new AboutObjects();

            Console.WriteLine("Classes inherit from objects");
            List <Type> ancestors = getAncestors(ob);

            Console.WriteLine(ancestors[0] == ob.GetType());
            Console.WriteLine(ancestors[1] == ob.GetType().BaseType);
            Assert.AreEqual(ancestors[0], ob.GetType());
            Assert.AreEqual(ancestors[1], ob.GetType().BaseType);
        }