public void ReturnNullIfSerializingNull()
        {
            Serializer <short?> serializer = new SqlNullableSmallintSerializer();

            byte[] actualSerializedValue = serializer.Serialize(null);

            Assert.Null(actualSerializedValue);
        }
        public void SerializeTheSameAsSqlServer(short?plaintext)
        {
            Serializer <short?> serializer = new SqlNullableSmallintSerializer();

            byte[] serializedPlaintext = serializer.Serialize(plaintext);
            byte[] expectedCiphertext  = deterministicEncryptionAlgorithm.Encrypt(serializedPlaintext);

            Database.Insert(new SqlParameter("@parameter", SqlDbType.SmallInt)
            {
                Value = plaintext
            });
            byte[] actualCiphertext = Database.SelectCiphertext(SqlDbType.SmallInt);

            Assert.Equal(expectedCiphertext, actualCiphertext);
        }