Exemplo n.º 1
0
        public void CastToBinary(bool value, byte expected)
        {
            var type    = PrimitiveTypes.Boolean();
            var boolean = new SqlBoolean(value);

            var casted = type.Cast(boolean, PrimitiveTypes.VarBinary());

            var expectedArray = new[] { expected };

            Assert.IsType <SqlBinary>(casted);
            Assert.Equal(expectedArray, ((SqlBinary)casted).ToByteArray());
        }