Esempio n. 1
0
        public void IMAGE_Data_ScriptsCorrectly()
        {
            Int32 baseData = 123456;

            byte[] data = BitConverter.GetBytes(baseData);
            EnsureByteArrayIsBigEndianLikeSQLServer(data);

            var fieldInfo = SchemaScriptingTests.FakeColumn("test", "test", 20, "image", false, 0, 0);

            Assert.AreEqual("0x0001E240", FieldScripting.valueAsTSQLLiteral((object)data, fieldInfo), "image");

            Assert.AreEqual("0x0001E240", FieldScripting.formatImage((object)data), "image");
        }