diff --git a/pgpainless-core/src/test/java/org/bouncycastle/PGPUtilWrapperTest.java b/pgpainless-core/src/test/java/org/bouncycastle/PGPUtilWrapperTest.java index 8c2b432b..1c0093f3 100644 --- a/pgpainless-core/src/test/java/org/bouncycastle/PGPUtilWrapperTest.java +++ b/pgpainless-core/src/test/java/org/bouncycastle/PGPUtilWrapperTest.java @@ -22,13 +22,13 @@ import org.bouncycastle.util.io.Streams; import org.junit.jupiter.api.TestTemplate; import org.junit.jupiter.api.extension.ExtendWith; import org.pgpainless.implementation.ImplementationFactory; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.PGPUtilWrapper; public class PGPUtilWrapperTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testGetDecoderStream() throws IOException { ByteArrayInputStream msg = new ByteArrayInputStream("Foo\nBar".getBytes(StandardCharsets.UTF_8)); diff --git a/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/DecryptAndVerifyMessageTest.java b/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/DecryptAndVerifyMessageTest.java index 79e6fae0..da00f7a0 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/DecryptAndVerifyMessageTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/DecryptAndVerifyMessageTest.java @@ -25,7 +25,7 @@ import org.pgpainless.algorithm.SymmetricKeyAlgorithm; import org.pgpainless.key.SubkeyIdentifier; import org.pgpainless.key.TestKeys; import org.pgpainless.key.util.KeyRingUtils; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class DecryptAndVerifyMessageTest { @@ -42,7 +42,7 @@ public class DecryptAndVerifyMessageTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void decryptMessageAndVerifySignatureTest() throws Exception { String encryptedMessage = TestKeys.MSG_SIGN_CRYPT_JULIET_JULIET; diff --git a/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/DecryptHiddenRecipientMessage.java b/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/DecryptHiddenRecipientMessage.java index 3ea67b62..5c63a996 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/DecryptHiddenRecipientMessage.java +++ b/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/DecryptHiddenRecipientMessage.java @@ -22,12 +22,12 @@ import org.pgpainless.PGPainless; import org.pgpainless.algorithm.EncryptionPurpose; import org.pgpainless.key.SubkeyIdentifier; import org.pgpainless.key.info.KeyRingInfo; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class DecryptHiddenRecipientMessage { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testDecryptionWithWildcardRecipient() throws IOException, PGPException { String secretKeyAscii = "-----BEGIN PGP PRIVATE KEY BLOCK-----\n" + "Comment: Bob's OpenPGP Transferable Secret Key\n" + diff --git a/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/ModificationDetectionTests.java b/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/ModificationDetectionTests.java index db6fb9f3..2ca265ea 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/ModificationDetectionTests.java +++ b/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/ModificationDetectionTests.java @@ -24,7 +24,7 @@ import org.pgpainless.PGPainless; import org.pgpainless.exception.MessageNotIntegrityProtectedException; import org.pgpainless.exception.ModificationDetectionException; import org.pgpainless.key.protection.SecretKeyRingProtector; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.Passphrase; public class ModificationDetectionTests { @@ -208,7 +208,7 @@ public class ModificationDetectionTests { * @throws PGPException in case of a pgp error */ @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testMissingMDCThrowsByDefault() throws IOException, PGPException { PGPSecretKeyRingCollection secretKeyRings = getDecryptionKey(); @@ -228,7 +228,7 @@ public class ModificationDetectionTests { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testTamperedCiphertextThrows() throws IOException, PGPException { ByteArrayInputStream in = new ByteArrayInputStream(MESSAGE_TAMPERED_CIPHERTEXT.getBytes(StandardCharsets.UTF_8)); DecryptionStream decryptionStream = PGPainless.decryptAndOrVerify() @@ -243,7 +243,7 @@ public class ModificationDetectionTests { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testIgnoreTamperedCiphertext() throws IOException, PGPException { ByteArrayInputStream in = new ByteArrayInputStream(MESSAGE_TAMPERED_CIPHERTEXT.getBytes(StandardCharsets.UTF_8)); DecryptionStream decryptionStream = PGPainless.decryptAndOrVerify() @@ -259,7 +259,7 @@ public class ModificationDetectionTests { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testTamperedMDCThrowsByDefault() throws IOException, PGPException { ByteArrayInputStream in = new ByteArrayInputStream(MESSAGE_TAMPERED_MDC.getBytes(StandardCharsets.UTF_8)); DecryptionStream decryptionStream = PGPainless.decryptAndOrVerify() @@ -274,7 +274,7 @@ public class ModificationDetectionTests { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testIgnoreTamperedMDC() throws IOException, PGPException { ByteArrayInputStream in = new ByteArrayInputStream(MESSAGE_TAMPERED_MDC.getBytes(StandardCharsets.UTF_8)); DecryptionStream decryptionStream = PGPainless.decryptAndOrVerify() @@ -289,7 +289,7 @@ public class ModificationDetectionTests { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testTruncatedMDCThrows() throws IOException, PGPException { ByteArrayInputStream in = new ByteArrayInputStream(MESSAGE_TRUNCATED_MDC.getBytes(StandardCharsets.UTF_8)); DecryptionStream decryptionStream = PGPainless.decryptAndOrVerify() @@ -303,7 +303,7 @@ public class ModificationDetectionTests { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testMDCWithBadCTBThrows() throws IOException, PGPException { ByteArrayInputStream in = new ByteArrayInputStream(MESSAGE_MDC_WITH_BAD_CTB.getBytes(StandardCharsets.UTF_8)); DecryptionStream decryptionStream = PGPainless.decryptAndOrVerify() @@ -318,7 +318,7 @@ public class ModificationDetectionTests { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testIgnoreMDCWithBadCTB() throws IOException, PGPException { ByteArrayInputStream in = new ByteArrayInputStream(MESSAGE_MDC_WITH_BAD_CTB.getBytes(StandardCharsets.UTF_8)); DecryptionStream decryptionStream = PGPainless.decryptAndOrVerify() @@ -334,7 +334,7 @@ public class ModificationDetectionTests { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testMDCWithBadLengthThrows() throws IOException, PGPException { ByteArrayInputStream in = new ByteArrayInputStream(MESSAGE_MDC_WITH_BAD_LENGTH.getBytes(StandardCharsets.UTF_8)); DecryptionStream decryptionStream = PGPainless.decryptAndOrVerify() @@ -349,7 +349,7 @@ public class ModificationDetectionTests { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testIgnoreMDCWithBadLength() throws IOException, PGPException { ByteArrayInputStream in = new ByteArrayInputStream(MESSAGE_MDC_WITH_BAD_LENGTH.getBytes(StandardCharsets.UTF_8)); DecryptionStream decryptionStream = PGPainless.decryptAndOrVerify() @@ -365,7 +365,7 @@ public class ModificationDetectionTests { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void decryptMessageWithSEDPacket() throws IOException { Passphrase passphrase = Passphrase.fromPassword("flowcrypt compatibility tests"); String key = "-----BEGIN PGP PRIVATE KEY BLOCK-----\r\n" + diff --git a/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/RecursionDepthTest.java b/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/RecursionDepthTest.java index 343feb7b..b253cf7f 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/RecursionDepthTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/decryption_verification/RecursionDepthTest.java @@ -17,7 +17,7 @@ import org.bouncycastle.util.io.Streams; import org.junit.jupiter.api.TestTemplate; import org.junit.jupiter.api.extension.ExtendWith; import org.pgpainless.PGPainless; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class RecursionDepthTest { @@ -27,7 +27,7 @@ public class RecursionDepthTest { * @see Sequoia-PGP Test Suite */ @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void decryptionAbortsWhenMaximumRecursionDepthReachedTest() throws IOException { String key = "-----BEGIN PGP PRIVATE KEY BLOCK-----\n" + diff --git a/pgpainless-core/src/test/java/org/pgpainless/encryption_signing/EncryptDecryptTest.java b/pgpainless-core/src/test/java/org/pgpainless/encryption_signing/EncryptDecryptTest.java index c6075853..32592207 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/encryption_signing/EncryptDecryptTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/encryption_signing/EncryptDecryptTest.java @@ -46,7 +46,7 @@ import org.pgpainless.key.protection.UnprotectedKeysProtector; import org.pgpainless.key.util.KeyRingUtils; import org.pgpainless.policy.Policy; import org.pgpainless.util.ArmoredOutputStreamFactory; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class EncryptDecryptTest { @@ -70,7 +70,7 @@ public class EncryptDecryptTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void freshKeysRsaToElGamalTest() throws PGPException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, IOException { PGPSecretKeyRing sender = PGPainless.generateKeyRing().simpleRsaKeyRing("romeo@montague.lit", RsaLength._3072); @@ -87,7 +87,7 @@ public class EncryptDecryptTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void freshKeysRsaToRsaTest() throws PGPException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, IOException { PGPSecretKeyRing sender = PGPainless.generateKeyRing().simpleRsaKeyRing("romeo@montague.lit", RsaLength._3072); @@ -97,7 +97,7 @@ public class EncryptDecryptTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void freshKeysEcToEcTest() throws IOException, PGPException, NoSuchAlgorithmException, InvalidAlgorithmParameterException { PGPSecretKeyRing sender = PGPainless.generateKeyRing().simpleEcKeyRing("romeo@montague.lit"); @@ -107,7 +107,7 @@ public class EncryptDecryptTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void freshKeysEcToRsaTest() throws PGPException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, IOException { PGPSecretKeyRing sender = PGPainless.generateKeyRing().simpleEcKeyRing("romeo@montague.lit"); @@ -117,7 +117,7 @@ public class EncryptDecryptTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void freshKeysRsaToEcTest() throws PGPException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, IOException { PGPSecretKeyRing sender = PGPainless.generateKeyRing().simpleRsaKeyRing("romeo@montague.lit", RsaLength._3072); @@ -127,7 +127,7 @@ public class EncryptDecryptTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void existingRsaKeysTest() throws IOException, PGPException { PGPSecretKeyRing sender = TestKeys.getJulietSecretKeyRing(); PGPSecretKeyRing recipient = TestKeys.getRomeoSecretKeyRing(); @@ -191,7 +191,7 @@ public class EncryptDecryptTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testDetachedSignatureCreationAndVerification() throws IOException, PGPException { PGPSecretKeyRing signingKeys = TestKeys.getJulietSecretKeyRing(); @@ -236,7 +236,7 @@ public class EncryptDecryptTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testOnePassSignatureCreationAndVerification() throws IOException, PGPException { PGPSecretKeyRing signingKeys = TestKeys.getJulietSecretKeyRing(); SecretKeyRingProtector keyRingProtector = new UnprotectedKeysProtector(); @@ -266,7 +266,7 @@ public class EncryptDecryptTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void expiredSubkeyBacksigTest() throws IOException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + "\n" + diff --git a/pgpainless-core/src/test/java/org/pgpainless/encryption_signing/EncryptionStreamClosedTest.java b/pgpainless-core/src/test/java/org/pgpainless/encryption_signing/EncryptionStreamClosedTest.java index 4f0f05d2..4ac43630 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/encryption_signing/EncryptionStreamClosedTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/encryption_signing/EncryptionStreamClosedTest.java @@ -14,13 +14,13 @@ import org.bouncycastle.openpgp.PGPException; import org.junit.jupiter.api.TestTemplate; import org.junit.jupiter.api.extension.ExtendWith; import org.pgpainless.PGPainless; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.Passphrase; public class EncryptionStreamClosedTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testStreamHasToBeClosedBeforeGetResultCanBeCalled() throws IOException, PGPException { OutputStream out = new ByteArrayOutputStream(); EncryptionStream stream = PGPainless.encryptAndOrSign() diff --git a/pgpainless-core/src/test/java/org/pgpainless/encryption_signing/SigningTest.java b/pgpainless-core/src/test/java/org/pgpainless/encryption_signing/SigningTest.java index aaaa09db..593938ad 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/encryption_signing/SigningTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/encryption_signing/SigningTest.java @@ -45,14 +45,14 @@ import org.pgpainless.key.generation.type.eddsa.EdDSACurve; import org.pgpainless.key.info.KeyRingInfo; import org.pgpainless.key.protection.SecretKeyRingProtector; import org.pgpainless.key.util.KeyRingUtils; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.MultiMap; import org.pgpainless.util.Passphrase; public class SigningTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testEncryptionAndSignatureVerification() throws IOException, PGPException { @@ -116,7 +116,7 @@ public class SigningTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testSignWithInvalidUserIdFails() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException { PGPSecretKeyRing secretKeys = PGPainless.generateKeyRing() @@ -131,7 +131,7 @@ public class SigningTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testSignWithRevokedUserIdFails() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException { PGPSecretKeyRing secretKeys = PGPainless.generateKeyRing() @@ -152,7 +152,7 @@ public class SigningTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void signWithHashAlgorithmOverride() throws PGPException, IOException { PGPSecretKeyRing secretKeys = TestKeys.getEmilSecretKeyRing(); SecretKeyRingProtector protector = SecretKeyRingProtector.unprotectedKeys(); @@ -184,7 +184,7 @@ public class SigningTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void negotiateHashAlgorithmChoseFallbackIfEmptyPreferences() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, IOException { PGPSecretKeyRing secretKeys = PGPainless.buildKeyRing() @@ -214,7 +214,7 @@ public class SigningTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void negotiateHashAlgorithmChoseFallbackIfUnacceptablePreferences() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, IOException { PGPSecretKeyRing secretKeys = PGPainless.buildKeyRing() @@ -244,7 +244,7 @@ public class SigningTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void signingWithNonCapableKeyThrowsKeyCannotSignException() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException { PGPSecretKeyRing secretKeys = PGPainless.buildKeyRing() @@ -260,7 +260,7 @@ public class SigningTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void signWithInvalidUserIdThrowsKeyValidationError() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException { PGPSecretKeyRing secretKeys = PGPainless.buildKeyRing() diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/BouncycastleExportSubkeys.java b/pgpainless-core/src/test/java/org/pgpainless/key/BouncycastleExportSubkeys.java index 74f02dcf..f8ea991b 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/BouncycastleExportSubkeys.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/BouncycastleExportSubkeys.java @@ -32,12 +32,12 @@ import org.bouncycastle.openpgp.operator.jcajce.JcaPGPKeyPair; import org.junit.jupiter.api.TestTemplate; import org.junit.jupiter.api.extension.ExtendWith; import org.pgpainless.provider.ProviderFactory; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class BouncycastleExportSubkeys { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testExportImport() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, PGPException { KeyPairGenerator generator; KeyPair pair; diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/ImportExportKeyTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/ImportExportKeyTest.java index fc05a3ca..52dac288 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/ImportExportKeyTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/ImportExportKeyTest.java @@ -16,7 +16,7 @@ import org.bouncycastle.openpgp.operator.KeyFingerPrintCalculator; import org.junit.jupiter.api.TestTemplate; import org.junit.jupiter.api.extension.ExtendWith; import org.pgpainless.implementation.ImplementationFactory; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class ImportExportKeyTest { @@ -25,7 +25,7 @@ public class ImportExportKeyTest { * @throws IOException in case of a IO error */ @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testExportImportPublicKeyRing() throws IOException { PGPPublicKeyRing publicKeys = TestKeys.getJulietPublicKeyRing(); @@ -36,7 +36,7 @@ public class ImportExportKeyTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testExportImportSecretKeyRing() throws IOException, PGPException { PGPSecretKeyRing secretKeys = TestKeys.getRomeoSecretKeyRing(); diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/generation/BrainpoolKeyGenerationTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/generation/BrainpoolKeyGenerationTest.java index f5b3cf73..8a8afe0e 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/generation/BrainpoolKeyGenerationTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/generation/BrainpoolKeyGenerationTest.java @@ -30,13 +30,13 @@ import org.pgpainless.key.generation.type.xdh.XDHSpec; import org.pgpainless.key.info.KeyInfo; import org.pgpainless.key.util.UserId; import org.pgpainless.util.BCUtil; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.Passphrase; public class BrainpoolKeyGenerationTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void generateEcKeysTest() throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException { @@ -65,7 +65,7 @@ public class BrainpoolKeyGenerationTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void generateEdDSAKeyTest() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException { diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/generation/CertificationKeyMustBeAbleToCertifyTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/generation/CertificationKeyMustBeAbleToCertifyTest.java index 1c74d321..7b6710c5 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/generation/CertificationKeyMustBeAbleToCertifyTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/generation/CertificationKeyMustBeAbleToCertifyTest.java @@ -13,7 +13,7 @@ import org.pgpainless.algorithm.KeyFlag; import org.pgpainless.key.generation.type.KeyType; import org.pgpainless.key.generation.type.ecc.EllipticCurve; import org.pgpainless.key.generation.type.xdh.XDHSpec; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class CertificationKeyMustBeAbleToCertifyTest { @@ -23,7 +23,7 @@ public class CertificationKeyMustBeAbleToCertifyTest { * This test therefore verifies that generating such keys fails. */ @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testCertificationIncapableKeyTypesThrow() { KeyType[] typesIncapableOfCreatingVerifications = new KeyType[] { KeyType.ECDH(EllipticCurve._P256), diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateEllipticCurveKeyTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateEllipticCurveKeyTest.java index 9102092b..8ea4877d 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateEllipticCurveKeyTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateEllipticCurveKeyTest.java @@ -22,12 +22,12 @@ import org.pgpainless.key.generation.type.xdh.XDHSpec; import org.pgpainless.key.protection.SecretKeyRingProtector; import org.pgpainless.key.protection.UnlockSecretKey; import org.pgpainless.key.util.UserId; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class GenerateEllipticCurveKeyTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void generateEllipticCurveKeys() throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException { PGPSecretKeyRing keyRing = PGPainless.buildKeyRing() diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateKeyWithAdditionalUserIdTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateKeyWithAdditionalUserIdTest.java index ab79b171..b05dbe1e 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateKeyWithAdditionalUserIdTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateKeyWithAdditionalUserIdTest.java @@ -26,12 +26,12 @@ import org.pgpainless.key.generation.type.rsa.RsaLength; import org.pgpainless.key.util.KeyRingUtils; import org.pgpainless.key.util.UserId; import org.pgpainless.util.DateUtil; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class GenerateKeyWithAdditionalUserIdTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void test() throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException, IOException { Date expiration = new Date(DateUtil.now().getTime() + 60 * 1000); PGPSecretKeyRing secretKeys = PGPainless.buildKeyRing() diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateWithEmptyPassphraseTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateWithEmptyPassphraseTest.java index 6ac8ffb7..dbb3f49b 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateWithEmptyPassphraseTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateWithEmptyPassphraseTest.java @@ -16,7 +16,7 @@ import org.pgpainless.PGPainless; import org.pgpainless.algorithm.KeyFlag; import org.pgpainless.key.generation.type.KeyType; import org.pgpainless.key.generation.type.rsa.RsaLength; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.Passphrase; /** @@ -29,7 +29,7 @@ import org.pgpainless.util.Passphrase; public class GenerateWithEmptyPassphraseTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testGeneratingKeyWithEmptyPassphraseDoesNotThrow() throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException { diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/generation/IllegalKeyFlagsTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/generation/IllegalKeyFlagsTest.java index adb0c10e..24ea4aa4 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/generation/IllegalKeyFlagsTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/generation/IllegalKeyFlagsTest.java @@ -12,12 +12,12 @@ import org.pgpainless.algorithm.KeyFlag; import org.pgpainless.key.generation.type.KeyType; import org.pgpainless.key.generation.type.eddsa.EdDSACurve; import org.pgpainless.key.generation.type.xdh.XDHSpec; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class IllegalKeyFlagsTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testKeyCannotCarryFlagsTest() { assertThrows(IllegalArgumentException.class, () -> KeySpec.getBuilder( KeyType.XDH(XDHSpec._X25519), KeyFlag.SIGN_DATA)); diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/info/KeyRingInfoTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/info/KeyRingInfoTest.java index 335c7959..8119aa9e 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/info/KeyRingInfoTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/info/KeyRingInfoTest.java @@ -51,13 +51,13 @@ import org.pgpainless.key.protection.UnprotectedKeysProtector; import org.pgpainless.key.util.KeyRingUtils; import org.pgpainless.key.util.UserId; import org.pgpainless.util.DateUtil; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.Passphrase; public class KeyRingInfoTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testWithEmilsKeys() throws IOException, PGPException { PGPSecretKeyRing secretKeys = TestKeys.getEmilSecretKeyRing(); @@ -174,7 +174,7 @@ public class KeyRingInfoTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void dummyS2KTest() throws IOException { String withDummyS2K = "-----BEGIN PGP PRIVATE KEY BLOCK-----\n" + @@ -212,7 +212,7 @@ public class KeyRingInfoTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testGetKeysWithFlagsAndExpiry() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException { PGPSecretKeyRing secretKeys = PGPainless.buildKeyRing() diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/modification/AddSubKeyTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/modification/AddSubKeyTest.java index 0ac53d58..47e5f43f 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/modification/AddSubKeyTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/modification/AddSubKeyTest.java @@ -32,13 +32,13 @@ import org.pgpainless.key.info.KeyRingInfo; import org.pgpainless.key.protection.PasswordBasedSecretKeyRingProtector; import org.pgpainless.key.protection.SecretKeyRingProtector; import org.pgpainless.key.protection.UnlockSecretKey; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.Passphrase; public class AddSubKeyTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testAddSubKey() throws IOException, PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException { PGPSecretKeyRing secretKeys = TestKeys.getCryptieSecretKeyRing(); diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/modification/AddUserIdTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/modification/AddUserIdTest.java index 5caa99e1..4580b00c 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/modification/AddUserIdTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/modification/AddUserIdTest.java @@ -27,13 +27,13 @@ import org.pgpainless.key.protection.PasswordBasedSecretKeyRingProtector; import org.pgpainless.key.protection.SecretKeyRingProtector; import org.pgpainless.key.protection.UnprotectedKeysProtector; import org.pgpainless.key.util.UserId; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.Passphrase; public class AddUserIdTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void addUserIdToExistingKeyRing() throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException { PGPSecretKeyRing secretKeys = PGPainless.generateKeyRing().simpleEcKeyRing("alice@wonderland.lit", "rabb1th0le"); @@ -65,7 +65,7 @@ public class AddUserIdTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void deleteUserId_noSuchElementExceptionForMissingUserId() throws IOException, PGPException { PGPSecretKeyRing secretKeys = TestKeys.getCryptieSecretKeyRing(); @@ -74,7 +74,7 @@ public class AddUserIdTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void deleteExistingAndAddNewUserIdToExistingKeyRing() throws PGPException, IOException { final String ARMORED_PRIVATE_KEY = diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/modification/ChangeExpirationOnKeyWithDifferentSignatureTypesTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/modification/ChangeExpirationOnKeyWithDifferentSignatureTypesTest.java index dd6d03d8..a12b8b6b 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/modification/ChangeExpirationOnKeyWithDifferentSignatureTypesTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/modification/ChangeExpirationOnKeyWithDifferentSignatureTypesTest.java @@ -15,7 +15,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.pgpainless.PGPainless; import org.pgpainless.key.protection.SecretKeyRingProtector; import org.pgpainless.util.DateUtil; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class ChangeExpirationOnKeyWithDifferentSignatureTypesTest { @@ -136,7 +136,7 @@ public class ChangeExpirationOnKeyWithDifferentSignatureTypesTest { "-----END PGP PRIVATE KEY BLOCK-----"; @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void setExpirationDate_keyHasSigClass10() throws PGPException, IOException { PGPSecretKeyRing keys = PGPainless.readKeyRing().secretKeyRing(keyWithGenericCertification); @@ -145,7 +145,7 @@ public class ChangeExpirationOnKeyWithDifferentSignatureTypesTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void setExpirationDate_keyHasSigClass12() throws PGPException, IOException { PGPSecretKeyRing keys = PGPainless.readKeyRing().secretKeyRing(keyWithCasualCertification); diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/modification/ChangeExpirationTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/modification/ChangeExpirationTest.java index d9ddd44e..89d9d5bb 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/modification/ChangeExpirationTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/modification/ChangeExpirationTest.java @@ -21,14 +21,14 @@ import org.pgpainless.key.TestKeys; import org.pgpainless.key.info.KeyRingInfo; import org.pgpainless.key.protection.UnprotectedKeysProtector; import org.pgpainless.util.DateUtil; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class ChangeExpirationTest { private final OpenPgpV4Fingerprint subKeyFingerprint = new OpenPgpV4Fingerprint("F73FDE6439ABE210B1AF4EDD273EF7A0C749807B"); @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void setExpirationDateAndThenUnsetIt_OnPrimaryKey() throws PGPException, IOException, InterruptedException { @@ -61,7 +61,7 @@ public class ChangeExpirationTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void setExpirationDateAndThenUnsetIt_OnSubkey() throws PGPException, IOException, InterruptedException { diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/modification/ChangeSecretKeyRingPassphraseTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/modification/ChangeSecretKeyRingPassphraseTest.java index 0e81d6a2..0199bbc4 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/modification/ChangeSecretKeyRingPassphraseTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/modification/ChangeSecretKeyRingPassphraseTest.java @@ -32,7 +32,7 @@ import org.pgpainless.implementation.ImplementationFactory; import org.pgpainless.key.protection.KeyRingProtectionSettings; import org.pgpainless.key.protection.PasswordBasedSecretKeyRingProtector; import org.pgpainless.key.protection.UnlockSecretKey; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.Passphrase; public class ChangeSecretKeyRingPassphraseTest { @@ -43,7 +43,7 @@ public class ChangeSecretKeyRingPassphraseTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void changePassphraseOfWholeKeyRingTest() throws PGPException { PGPSecretKeyRing secretKeys = PGPainless.modifyKeyRing(keyRing) @@ -70,7 +70,7 @@ public class ChangeSecretKeyRingPassphraseTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void changePassphraseOfWholeKeyRingToEmptyPassphrase() throws PGPException, IOException { PGPSecretKeyRing secretKeys = PGPainless.modifyKeyRing(keyRing) .changePassphraseFromOldPassphrase(Passphrase.fromPassword("weakPassphrase")) @@ -87,7 +87,7 @@ public class ChangeSecretKeyRingPassphraseTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void changePassphraseOfSingleSubkeyToNewPassphrase() throws PGPException { Iterator keys = keyRing.getSecretKeys(); @@ -123,7 +123,7 @@ public class ChangeSecretKeyRingPassphraseTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void changePassphraseOfSingleSubkeyToEmptyPassphrase() throws PGPException { Iterator keys = keyRing.getSecretKeys(); diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/modification/OldSignatureSubpacketsArePreservedOnNewSig.java b/pgpainless-core/src/test/java/org/pgpainless/key/modification/OldSignatureSubpacketsArePreservedOnNewSig.java index bdead096..dbca56d4 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/modification/OldSignatureSubpacketsArePreservedOnNewSig.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/modification/OldSignatureSubpacketsArePreservedOnNewSig.java @@ -21,12 +21,12 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.pgpainless.PGPainless; import org.pgpainless.key.OpenPgpV4Fingerprint; import org.pgpainless.key.protection.UnprotectedKeysProtector; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class OldSignatureSubpacketsArePreservedOnNewSig { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void verifyOldSignatureSubpacketsArePreservedOnNewExpirationDateSig() throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException, InterruptedException { PGPSecretKeyRing secretKeys = PGPainless.generateKeyRing() diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevokeKeyWithGenericCertificationSignatureTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevokeKeyWithGenericCertificationSignatureTest.java index b6a4d435..b2cd85fc 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevokeKeyWithGenericCertificationSignatureTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevokeKeyWithGenericCertificationSignatureTest.java @@ -19,7 +19,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.pgpainless.PGPainless; import org.pgpainless.key.protection.UnprotectedKeysProtector; import org.pgpainless.util.ArmoredOutputStreamFactory; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; /** * Test that makes sure that PGPainless can deal with keys that carry a key @@ -64,7 +64,7 @@ public class RevokeKeyWithGenericCertificationSignatureTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void test() throws IOException, PGPException { revokeKey(SAMPLE_PRIVATE_KEY); // would crash previously } diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevokeKeyWithoutPreferredAlgorithmsOnPrimaryKey.java b/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevokeKeyWithoutPreferredAlgorithmsOnPrimaryKey.java index 68c9ddaa..98d79556 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevokeKeyWithoutPreferredAlgorithmsOnPrimaryKey.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevokeKeyWithoutPreferredAlgorithmsOnPrimaryKey.java @@ -22,7 +22,7 @@ import org.pgpainless.key.modification.secretkeyring.SecretKeyRingEditorInterfac import org.pgpainless.key.protection.SecretKeyRingProtector; import org.pgpainless.key.protection.UnprotectedKeysProtector; import org.pgpainless.util.DateUtil; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class RevokeKeyWithoutPreferredAlgorithmsOnPrimaryKey { @@ -101,7 +101,7 @@ public class RevokeKeyWithoutPreferredAlgorithmsOnPrimaryKey { "-----END PGP PRIVATE KEY BLOCK-----"; @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testChangingExpirationTimeWithKeyWithoutPrefAlgos() throws IOException, PGPException { Date expirationDate = DateUtil.parseUTCDate(DateUtil.formatUTCDate(new Date())); diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevokeSubKeyTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevokeSubKeyTest.java index 4f612c50..81e6287f 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevokeSubKeyTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/modification/RevokeSubKeyTest.java @@ -38,13 +38,13 @@ import org.pgpainless.key.util.RevocationAttributes; import org.pgpainless.signature.SignatureUtils; import org.pgpainless.signature.subpackets.RevocationSignatureSubpackets; import org.pgpainless.signature.subpackets.SignatureSubpacketsUtil; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.Passphrase; public class RevokeSubKeyTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void revokeSukeyTest() throws IOException, PGPException { PGPSecretKeyRing secretKeys = TestKeys.getCryptieSecretKeyRing(); @@ -68,7 +68,7 @@ public class RevokeSubKeyTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void detachedRevokeSubkeyTest() throws IOException, PGPException { PGPSecretKeyRing secretKeys = TestKeys.getCryptieSecretKeyRing(); OpenPgpV4Fingerprint fingerprint = new OpenPgpV4Fingerprint(secretKeys); @@ -88,7 +88,7 @@ public class RevokeSubKeyTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testRevocationSignatureTypeCorrect() throws IOException, PGPException { PGPSecretKeyRing secretKeys = TestKeys.getCryptieSecretKeyRing(); Iterator keysIterator = secretKeys.getPublicKeys(); diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/protection/SecretKeyRingProtectorTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/protection/SecretKeyRingProtectorTest.java index 3fd0e1eb..7a547740 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/protection/SecretKeyRingProtectorTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/protection/SecretKeyRingProtectorTest.java @@ -28,13 +28,13 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.pgpainless.PGPainless; import org.pgpainless.key.TestKeys; import org.pgpainless.key.protection.passphrase_provider.SecretKeyPassphraseProvider; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.Passphrase; public class SecretKeyRingProtectorTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testUnlockAllKeysWithSamePassword() throws IOException, PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException { @@ -68,7 +68,7 @@ public class SecretKeyRingProtectorTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testUnlockSingleKeyWithPassphrase() throws IOException, PGPException { diff --git a/pgpainless-core/src/test/java/org/pgpainless/signature/BindingSignatureSubpacketsTest.java b/pgpainless-core/src/test/java/org/pgpainless/signature/BindingSignatureSubpacketsTest.java index e158b958..331ca07a 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/signature/BindingSignatureSubpacketsTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/signature/BindingSignatureSubpacketsTest.java @@ -22,7 +22,7 @@ import org.pgpainless.PGPainless; import org.pgpainless.exception.SignatureValidationException; import org.pgpainless.policy.Policy; import org.pgpainless.signature.consumer.CertificateValidator; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; /** * Explores how subpackets on binding sigs are handled. @@ -52,7 +52,7 @@ public class BindingSignatureSubpacketsTest { private Policy policy = PGPainless.getPolicy(); @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void baseCase() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -113,7 +113,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingIssuerFpOnly() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -174,7 +174,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingIssuerV6IssuerFp() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -235,7 +235,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingIssuerFakeIssuer() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -296,7 +296,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingFakeIssuerIssuer() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -357,7 +357,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingFakeIssuer() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -418,7 +418,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingNoIssuer() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -478,7 +478,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void unknownSubpacketHashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -539,7 +539,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingUnknownCriticalSubpacket() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -600,7 +600,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingUnknownSubpacketUnhashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -661,7 +661,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingUnknownCriticalSubpacketUnhashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -722,7 +722,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingUnknownNotationHashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -784,7 +784,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingCriticalUnknownNotationHashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -846,7 +846,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingUnknownNotationUnhashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -908,7 +908,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingCriticalUnknownNotationUnhashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -970,7 +970,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingBackSigFakeBackSig() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1042,7 +1042,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeyBindingFakeBackSigBackSig() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1114,7 +1114,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingIssuerFpOnly() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1175,7 +1175,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingIssuerV6IssuerFp() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1236,7 +1236,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingIssuerFakeIssuer() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1297,7 +1297,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingFakeIssuerIssuer() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1358,7 +1358,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingFakeIssuer() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1419,7 +1419,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingNoIssuer() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1479,7 +1479,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingUnknownSubpacketHashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1540,7 +1540,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingCriticalUnknownSubpacketHashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1601,7 +1601,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingUnknownSubpacketUnhashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1662,7 +1662,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingCriticalUnknownSubpacketUnhashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1723,7 +1723,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingUnknownNotationHashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1785,7 +1785,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingCriticalUnknownNotationHashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1847,7 +1847,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingUnknownNotationUnhashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + @@ -1909,7 +1909,7 @@ public class BindingSignatureSubpacketsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void primaryBindingCriticalUnknownNotationUnhashed() throws IOException, PGPException { String key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + diff --git a/pgpainless-core/src/test/java/org/pgpainless/signature/CertificateValidatorTest.java b/pgpainless-core/src/test/java/org/pgpainless/signature/CertificateValidatorTest.java index cf7e07ed..a17f700e 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/signature/CertificateValidatorTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/signature/CertificateValidatorTest.java @@ -28,7 +28,7 @@ import org.pgpainless.decryption_verification.OpenPgpMetadata; import org.pgpainless.exception.SignatureValidationException; import org.pgpainless.policy.Policy; import org.pgpainless.signature.consumer.CertificateValidator; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class CertificateValidatorTest { @@ -38,7 +38,7 @@ public class CertificateValidatorTest { * @see Sequoia Test Suite */ @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testPrimaryKeySignsAndIsHardRevokedUnknown() throws IOException, PGPException { String key = "-----BEGIN PGP ARMORED FILE-----\n" + @@ -189,7 +189,7 @@ public class CertificateValidatorTest { * @see Sequoia Test Suite */ @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testSubkeySignsPrimaryKeyIsHardRevokedUnknown() throws IOException, PGPException { String key = "-----BEGIN PGP ARMORED FILE-----\n" + @@ -341,7 +341,7 @@ public class CertificateValidatorTest { * @see Sequoia Test Suite */ @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testSubkeySignsAndIsHardRevokedUnknown() throws IOException, PGPException { String keyWithHardRev = "-----BEGIN PGP ARMORED FILE-----\n" + @@ -493,7 +493,7 @@ public class CertificateValidatorTest { * @see Sequoia Test Suite */ @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testPrimaryKeySignsAndIsSoftRevokedSuperseded() throws IOException, PGPException { String keyWithSoftRev = "-----BEGIN PGP ARMORED FILE-----\n" + @@ -650,7 +650,7 @@ public class CertificateValidatorTest { * @see Sequoia Test Suite */ @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testSubkeySignsPrimaryKeyIsSoftRevokedSuperseded() throws IOException, PGPException { String key = "-----BEGIN PGP ARMORED FILE-----\n" + @@ -803,7 +803,7 @@ public class CertificateValidatorTest { * @see Sequoia Test Suite */ @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testPrimaryKeySignsAndIsSoftRevokedRetired() throws IOException, PGPException { String key = "-----BEGIN PGP ARMORED FILE-----\n" + @@ -956,7 +956,7 @@ public class CertificateValidatorTest { * @see Sequoia Test Suite */ @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testTemporaryValidity() throws IOException, PGPException { String keyA = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + diff --git a/pgpainless-core/src/test/java/org/pgpainless/signature/KeyRevocationTest.java b/pgpainless-core/src/test/java/org/pgpainless/signature/KeyRevocationTest.java index 3db8096d..67f5cf4c 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/signature/KeyRevocationTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/signature/KeyRevocationTest.java @@ -19,14 +19,14 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.pgpainless.PGPainless; import org.pgpainless.exception.SignatureValidationException; import org.pgpainless.signature.consumer.CertificateValidator; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class KeyRevocationTest { private static final String data = "Hello, World"; @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeySignsPrimaryKeyRevokedNoReason() throws IOException, PGPException { String key = "-----BEGIN PGP ARMORED FILE-----\n" + @@ -173,7 +173,7 @@ public class KeyRevocationTest { * @see Sequoia Test-Suite */ @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void subkeySignsPrimaryKeyNotRevoked() throws IOException, PGPException { String key = "-----BEGIN PGP ARMORED FILE-----\n" + diff --git a/pgpainless-core/src/test/java/org/pgpainless/signature/OnePassSignatureBracketingTest.java b/pgpainless-core/src/test/java/org/pgpainless/signature/OnePassSignatureBracketingTest.java index 00f39144..65351e64 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/signature/OnePassSignatureBracketingTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/signature/OnePassSignatureBracketingTest.java @@ -47,12 +47,12 @@ import org.pgpainless.encryption_signing.SigningOptions; import org.pgpainless.implementation.ImplementationFactory; import org.pgpainless.key.protection.SecretKeyRingProtector; import org.pgpainless.key.protection.UnlockSecretKey; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; public class OnePassSignatureBracketingTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void onePassSignaturePacketsAndSignaturesAreBracketedTest() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, IOException { diff --git a/pgpainless-core/src/test/java/org/pgpainless/symmetric_encryption/MultiPassphraseSymmetricEncryptionTest.java b/pgpainless-core/src/test/java/org/pgpainless/symmetric_encryption/MultiPassphraseSymmetricEncryptionTest.java index efcef2ec..5132ef57 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/symmetric_encryption/MultiPassphraseSymmetricEncryptionTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/symmetric_encryption/MultiPassphraseSymmetricEncryptionTest.java @@ -19,13 +19,13 @@ import org.pgpainless.decryption_verification.DecryptionStream; import org.pgpainless.encryption_signing.EncryptionOptions; import org.pgpainless.encryption_signing.EncryptionStream; import org.pgpainless.encryption_signing.ProducerOptions; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.util.Passphrase; public class MultiPassphraseSymmetricEncryptionTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void encryptDecryptWithMultiplePassphrases() throws IOException, PGPException { String message = "Here we test if during decryption of a message that was encrypted with two passphrases, " + "the decryptor finds the session key encrypted for the right passphrase."; diff --git a/pgpainless-core/src/test/java/org/pgpainless/symmetric_encryption/SymmetricEncryptionTest.java b/pgpainless-core/src/test/java/org/pgpainless/symmetric_encryption/SymmetricEncryptionTest.java index 2a2de35a..d3c503ab 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/symmetric_encryption/SymmetricEncryptionTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/symmetric_encryption/SymmetricEncryptionTest.java @@ -19,7 +19,7 @@ import org.bouncycastle.openpgp.PGPSecretKeyRingCollection; import org.bouncycastle.util.io.Streams; import org.junit.jupiter.api.TestTemplate; import org.junit.jupiter.api.extension.ExtendWith; -import org.pgpainless.util.ImplementationFactoryTestInvocationContextProvider; +import org.pgpainless.util.TestAllImplementations; import org.pgpainless.PGPainless; import org.pgpainless.decryption_verification.ConsumerOptions; import org.pgpainless.decryption_verification.DecryptionStream; @@ -41,7 +41,7 @@ import org.pgpainless.util.Passphrase; public class SymmetricEncryptionTest { @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void encryptWithKeyAndPassphrase_DecryptWithKey() throws IOException, PGPException { byte[] plaintext = "This is a secret message".getBytes(StandardCharsets.UTF_8); ByteArrayInputStream plaintextIn = new ByteArrayInputStream(plaintext); @@ -94,7 +94,7 @@ public class SymmetricEncryptionTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void testMismatchPassphraseFails() throws IOException, PGPException { byte[] bytes = new byte[5000]; new Random().nextBytes(bytes); diff --git a/pgpainless-core/src/test/java/org/pgpainless/util/ArmorUtilsTest.java b/pgpainless-core/src/test/java/org/pgpainless/util/ArmorUtilsTest.java index 116c18cd..f421277b 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/util/ArmorUtilsTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/util/ArmorUtilsTest.java @@ -145,7 +145,7 @@ public class ArmorUtilsTest { } @TestTemplate - @ExtendWith(ImplementationFactoryTestInvocationContextProvider.class) + @ExtendWith(TestAllImplementations.class) public void decodeExampleTest() throws IOException, PGPException { String armored = "-----BEGIN PGP MESSAGE-----\n" + "Version: OpenPrivacy 0.99\n" + diff --git a/pgpainless-core/src/test/java/org/pgpainless/util/ImplementationFactoryTestInvocationContextProvider.java b/pgpainless-core/src/test/java/org/pgpainless/util/TestAllImplementations.java similarity index 95% rename from pgpainless-core/src/test/java/org/pgpainless/util/ImplementationFactoryTestInvocationContextProvider.java rename to pgpainless-core/src/test/java/org/pgpainless/util/TestAllImplementations.java index 430290e5..2b874b6d 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/util/ImplementationFactoryTestInvocationContextProvider.java +++ b/pgpainless-core/src/test/java/org/pgpainless/util/TestAllImplementations.java @@ -33,7 +33,7 @@ import org.pgpainless.implementation.JceImplementationFactory; * * @see Baeldung: Writing Templates for Test Cases Using JUnit 5 */ -public class ImplementationFactoryTestInvocationContextProvider implements TestTemplateInvocationContextProvider { +public class TestAllImplementations implements TestTemplateInvocationContextProvider { private static final List IMPLEMENTATIONS = Arrays.asList( new BcImplementationFactory(), diff --git a/pgpainless-core/src/test/java/org/pgpainless/util/TestImplementationFactoryProvider.java b/pgpainless-core/src/test/java/org/pgpainless/util/TestImplementationFactoryProvider.java index bb9b0feb..b6f83ecc 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/util/TestImplementationFactoryProvider.java +++ b/pgpainless-core/src/test/java/org/pgpainless/util/TestImplementationFactoryProvider.java @@ -18,7 +18,7 @@ import java.util.stream.Stream; /** * Utility class used to provide all available implementations of {@link ImplementationFactory} for parametrized tests. * - * @deprecated in favor of {@link ImplementationFactoryTestInvocationContextProvider}. + * @deprecated in favor of {@link TestAllImplementations}. */ public class TestImplementationFactoryProvider implements ArgumentsProvider {