예제 #1
0
        public void TestIntegerFormat()
        {
            int?   d;
            string v;

            d = null;
            v = SqlFormat.IntegerFormat(d);
            AssertAreEqual(v, "NULL", "Integer? null");

            d = 1456;
            v = SqlFormat.IntegerFormat(d);
            AssertAreEqual(v, "1456", "Int 1456");

            v = SqlFormat.IntegerFormat(int.MinValue, false);
            AssertAreEqual(v, "0", "Int min non null");

            v = SqlFormat.IntegerFormat(int.MaxValue, false);
            AssertAreEqual(v, "0", "Int min non null");

            v = SqlFormat.IntegerFormat(int.MinValue, true);
            AssertAreEqual(v, "NULL", "int min null");
        }