public void EqualsWorksAsExpected() { EncryptionSettings encryptionSettings = new EncryptionSettings <byte>(dataEncryptionKey, EncryptionType.Deterministic, StandardSerializerFactory.Default.GetDefaultSerializer <byte>()); Assert.False(encryptionSettings.Equals(new EncryptionSettings <bool>(dataEncryptionKey, EncryptionType.Deterministic, StandardSerializerFactory.Default.GetDefaultSerializer <bool>()))); Assert.False(encryptionSettings.Equals(new EncryptionSettings <byte>(dataEncryptionKey, EncryptionType.Randomized, StandardSerializerFactory.Default.GetDefaultSerializer <byte>()))); Assert.False(encryptionSettings.Equals(new EncryptionSettings <byte>(new ProtectedDataEncryptionKey("CEK", keyEncryptionKey), EncryptionType.Deterministic, StandardSerializerFactory.Default.GetDefaultSerializer <byte>()))); Assert.False(encryptionSettings.Equals(new EncryptionSettings <byte>(null, EncryptionType.Deterministic, StandardSerializerFactory.Default.GetDefaultSerializer <byte>()))); Assert.True(encryptionSettings.Equals(new EncryptionSettings <byte>(new ProtectedDataEncryptionKey("CEK", keyEncryptionKey, encryptedDataEncryptionKey), EncryptionType.Deterministic, StandardSerializerFactory.Default.GetDefaultSerializer <byte>()))); }