Beispiel #1
0
        public void Length()
        {
            var type = new SqlChar(5, CompressionContext.NoCompression);

            Assert.Throws<ArgumentException>(() => type.GetValue(new byte[4]));
            Assert.Throws<ArgumentException>(() => type.GetValue(new byte[6]));
        }
Beispiel #2
0
        public void GetValue()
        {
            var type = new SqlChar(5, CompressionContext.NoCompression);
            byte[] input;

            input = new byte[] { 0x48, 0x65, 0x6C, 0x6C, 0x6F };
            Assert.AreEqual("Hello", type.GetValue(input));
        }