From 1f13d1491f567d1878849aeb6e73dd13aa44147b Mon Sep 17 00:00:00 2001 From: Richard Webb Date: Mon, 6 Apr 2020 19:21:24 +0100 Subject: [PATCH] Add a ZipCrypto/7zip interop test to the ZipEncryptionHandling tests --- .../Zip/ZipEncryptionHandling.cs | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/test/ICSharpCode.SharpZipLib.Tests/Zip/ZipEncryptionHandling.cs b/test/ICSharpCode.SharpZipLib.Tests/Zip/ZipEncryptionHandling.cs index 3f8f64427..2f6259492 100644 --- a/test/ICSharpCode.SharpZipLib.Tests/Zip/ZipEncryptionHandling.cs +++ b/test/ICSharpCode.SharpZipLib.Tests/Zip/ZipEncryptionHandling.cs @@ -15,33 +15,31 @@ public class ZipEncryptionHandling [Test] [Category("Encryption")] [Category("Zip")] - public void Aes128Encryption() + [TestCase(CompressionMethod.Stored)] + [TestCase(CompressionMethod.Deflated)] + public void Aes128Encryption(CompressionMethod compressionMethod) { - CreateZipWithEncryptedEntries("foo", 128); + CreateZipWithEncryptedEntries("foo", 128, compressionMethod); } [Test] [Category("Encryption")] [Category("Zip")] - public void Aes128EncryptionStored() + [TestCase(CompressionMethod.Stored)] + [TestCase(CompressionMethod.Deflated)] + public void Aes256Encryption(CompressionMethod compressionMethod) { - CreateZipWithEncryptedEntries("foo", 128, CompressionMethod.Stored); + CreateZipWithEncryptedEntries("foo", 256, compressionMethod); } [Test] [Category("Encryption")] [Category("Zip")] - public void Aes256Encryption() + [TestCase(CompressionMethod.Stored)] + [TestCase(CompressionMethod.Deflated)] + public void ZipCryptoEncryption(CompressionMethod compressionMethod) { - CreateZipWithEncryptedEntries("foo", 256); - } - - [Test] - [Category("Encryption")] - [Category("Zip")] - public void Aes256EncryptionStored() - { - CreateZipWithEncryptedEntries("foo", 256, CompressionMethod.Stored); + CreateZipWithEncryptedEntries("foo", 0, compressionMethod); } [Test]