예제 #1
0
        public void IsReference_3()
        {
            test_cls  tmpobj1 = new test_cls();
            Itest_cls Itest   = null;

            Assert.AreEqual(true, Information.IsReference(tmpobj1));
            Assert.AreEqual(true, Information.IsReference(Itest));
        }
예제 #2
0
        public void IsNumeric_3()
        {
            test_cls  tmpobj1 = new test_cls();
            Itest_cls Itest   = null;

            Assert.AreEqual(false, Information.IsNumeric(tmpobj1));
            Assert.AreEqual(false, Information.IsNumeric(Itest));
        }
예제 #3
0
        public void TypeName_1()
        {
            int b = 12;

            int[] a     = new int[3];
            byte  vbyte = 1;

            a[0] = 222;
            short  shr = 2;
            double dbl = 12222;

            System.Single tmpsngl    = 1;
            decimal       dcm        = 22;
            object        obj        = null;
            long          tmplong    = 11111;
            DBNull        testBDNull = DBNull.Value;
            string        tmpStr     = "Test Str";

            System.DateTime tmpDate   = System.DateTime.Parse("5/31/1993");
            bool            tmpbool   = true;
            test_cls        tmp_class = new test_cls();

            Assert.AreEqual("String", Information.TypeName(tmpStr));
            Assert.AreEqual("Integer()", Information.TypeName(a));
            Assert.AreEqual("Byte", Information.TypeName(vbyte));
            Assert.AreEqual("Integer", Information.TypeName(b));
            Assert.AreEqual("DBNull", Information.TypeName(testBDNull));
            Assert.AreEqual("Double", Information.TypeName(dbl));
            Assert.AreEqual("Short", Information.TypeName(shr));
            Assert.AreEqual("Single", Information.TypeName(tmpsngl));
            Assert.AreEqual("Char", Information.TypeName('c'));
            Assert.AreEqual("Decimal", Information.TypeName(dcm));
            Assert.AreEqual("Nothing", Information.TypeName(obj));
            Assert.AreEqual("Date", Information.TypeName(tmpDate));
            Assert.AreEqual("Long", Information.TypeName(tmplong));
            Assert.AreEqual("Boolean", Information.TypeName(tmpbool));
            Assert.AreEqual("test_cls", Information.TypeName(tmp_class));
        }
예제 #4
0
 public void IsArray_3()
 {
     test_cls[] oDT1 = new test_cls[2];
     Assert.AreEqual(true, Information.IsArray(oDT1));
 }