Пример #1
0
        public void TestBooleanFormat()
        {
            string v = SqlFormat.BooleanFormat(true);

            AssertAreEqual(v, "1", "Test True");

            v = SqlFormat.BooleanFormat(false);
            AssertAreEqual(v, "0", "Test False");

            bool?b = null;

            v = SqlFormat.BooleanFormat(b);
            AssertAreEqual(v, "NULL", "Test boolean Null");

            b = true;
            v = SqlFormat.BooleanFormat(b);
            AssertAreEqual(v, "1", "Test True?");

            b = false;
            v = SqlFormat.BooleanFormat(b);
            AssertAreEqual(v, "0", "Test False?");
        }