コード例 #1
0
        public void TestLongFormat()
        {
            long?  d;
            string v;

            d = null;
            v = SqlFormat.LongFormat(d);
            AssertAreEqual(v, "NULL", "Long? null");

            d = 1456;
            v = SqlFormat.LongFormat(d);
            AssertAreEqual(v, "1456", "Long 1456");

            v = SqlFormat.LongFormat(long.MinValue, false);
            AssertAreEqual(v, "0", "Long min non null");

            v = SqlFormat.LongFormat(long.MaxValue, false);
            AssertAreEqual(v, "0", "Long min non null");

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