public void DeserializeTheSameAsSqlServer(float plaintext)
        {
            Database.Insert(new SqlParameter("@parameter", SqlDbType.Real)
            {
                Value = plaintext
            });
            byte[]            ciphertextBytes   = Database.SelectCiphertext(SqlDbType.Real);
            byte[]            plaintextBytes    = deterministicEncryptionAlgorithm.Decrypt(ciphertextBytes);
            SqlRealSerializer serializer        = new SqlRealSerializer();
            float             expectedPlaintext = serializer.Deserialize(plaintextBytes);
            float             actualPlaintext   = (float)Database.SelectPlaintext(SqlDbType.Real);

            Assert.Equal(expectedPlaintext, actualPlaintext);
        }
        public void ShouldThrowIfDeserializingLessThanFourBytes(byte[] data)
        {
            SqlRealSerializer serializer = new SqlRealSerializer();

            Assert.Throws <ArgumentOutOfRangeException>(() => serializer.Deserialize(data));
        }
        public void ShouldThrowIfDeserializingNull()
        {
            SqlRealSerializer serializer = new SqlRealSerializer();

            Assert.Throws <ArgumentNullException>(() => serializer.Deserialize(null));
        }