public void ReturnNullIfDeserializingNull()
        {
            Serializer <byte[]> serializer = new SqlBinarySerializer();

            byte[] actualDeserializedValue = serializer.Deserialize(null);

            Assert.Null(actualDeserializedValue);
        }
        public void DeserializeTheSameAsSqlServer(byte[] plaintext, int length)
        {
            Database.Insert(new SqlParameter("@parameter", SqlDbType.Binary, length)
            {
                Value = plaintext
            });
            byte[] ciphertextBytes         = Database.SelectCiphertext(SqlDbType.Binary);
            byte[] plaintextBytes          = deterministicEncryptionAlgorithm.Decrypt(ciphertextBytes);
            Serializer <byte[]> serializer = new SqlBinarySerializer(length);

            byte[] expectedPlaintext = serializer.Deserialize(plaintextBytes);
            byte[] actualPlaintext   = (byte[])Database.SelectPlaintext(SqlDbType.Binary);

            Assert.Equal(expectedPlaintext, actualPlaintext);
        }