public void Length() { var type = new SqlChar(5, encoding, CompressionContext.NoCompression); Assert.Throws <ArgumentException>(() => type.GetValue(new byte[4])); Assert.Throws <ArgumentException>(() => type.GetValue(new byte[6])); }
public void GetValue() { var type = new SqlChar(5, encoding, CompressionContext.NoCompression); byte[] input; input = new byte[] { 0x48, 0x65, 0x6C, 0x6C, 0x6F }; Assert.AreEqual("Hello", type.GetValue(input)); }