1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-12 15:32:06 +01:00

Rename TestUtil -> TestImplementationFactoryProvider

This commit is contained in:
Paul Schaub 2021-07-03 12:42:12 +02:00
parent 9ac4b30ec7
commit 63c75f1f86
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
30 changed files with 52 additions and 52 deletions

View file

@ -52,7 +52,7 @@ public class DecryptAndVerifyMessageTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void decryptMessageAndVerifySignatureTest(ImplementationFactory implementationFactory) throws Exception {
ImplementationFactory.setFactoryImplementation(implementationFactory);
String encryptedMessage = TestKeys.MSG_SIGN_CRYPT_JULIET_JULIET;

View file

@ -38,7 +38,7 @@ import org.pgpainless.key.info.KeyRingInfo;
public class DecryptHiddenRecipientMessage {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testDecryptionWithWildcardRecipient(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
String secretKeyAscii = "-----BEGIN PGP PRIVATE KEY BLOCK-----\n" +

View file

@ -131,7 +131,7 @@ public class ModificationDetectionTests {
* @throws PGPException in case of a pgp error
*/
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testMissingMDC(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
String message = "-----BEGIN PGP MESSAGE-----\n" +
@ -166,7 +166,7 @@ public class ModificationDetectionTests {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void tamperedCiphertextTest(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
String message = "-----BEGIN PGP MESSAGE-----\n" +
@ -197,7 +197,7 @@ public class ModificationDetectionTests {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void tamperedMDCTest(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
String message = "-----BEGIN PGP MESSAGE-----\n" +

View file

@ -38,7 +38,7 @@ public class RecursionDepthTest {
* @see <a href="https://tests.sequoia-pgp.org/#Maximum_recursion_depth">Sequoia-PGP Test Suite</a>
*/
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void decryptionAbortsWhenMaximumRecursionDepthReachedTest(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
String key = "-----BEGIN PGP PRIVATE KEY BLOCK-----\n" +

View file

@ -48,7 +48,7 @@ import org.pgpainless.key.util.KeyRingUtils;
/**
* Test functionality of the {@link MissingPublicKeyCallback} which is called when during signature verification,
* a signature is encountered which was made by a key that was not provided in
* {@link DecryptionBuilderInterface.VerifyWith#verifyWith(PGPPublicKeyRing)}.
* {@link ConsumerOptions#addVerificationCert(PGPPublicKeyRing)}.
*/
public class VerifyWithMissingPublicKeyCallback {

View file

@ -82,7 +82,7 @@ public class EncryptDecryptTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void freshKeysRsaToElGamalTest(ImplementationFactory implementationFactory)
throws PGPException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -96,7 +96,7 @@ public class EncryptDecryptTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void freshKeysRsaToRsaTest(ImplementationFactory implementationFactory)
throws PGPException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -107,7 +107,7 @@ public class EncryptDecryptTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void freshKeysEcToEcTest(ImplementationFactory implementationFactory)
throws IOException, PGPException, NoSuchAlgorithmException, InvalidAlgorithmParameterException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -118,7 +118,7 @@ public class EncryptDecryptTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void freshKeysEcToRsaTest(ImplementationFactory implementationFactory)
throws PGPException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -129,7 +129,7 @@ public class EncryptDecryptTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void freshKeysRsaToEcTest(ImplementationFactory implementationFactory)
throws PGPException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -140,7 +140,7 @@ public class EncryptDecryptTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void existingRsaKeysTest(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
PGPSecretKeyRing sender = TestKeys.getJulietSecretKeyRing();
@ -205,7 +205,7 @@ public class EncryptDecryptTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testDetachedSignatureCreationAndVerification(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -251,7 +251,7 @@ public class EncryptDecryptTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testOnePassSignatureCreationAndVerification(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
PGPSecretKeyRing signingKeys = TestKeys.getJulietSecretKeyRing();

View file

@ -31,7 +31,7 @@ import org.pgpainless.util.Passphrase;
public class EncryptionStreamClosedTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testStreamHasToBeClosedBeforeGetResultCanBeCalled(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
OutputStream out = new ByteArrayOutputStream();

View file

@ -53,7 +53,7 @@ import org.pgpainless.util.Passphrase;
public class SigningTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testEncryptionAndSignatureVerification(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);

View file

@ -48,7 +48,7 @@ import org.pgpainless.provider.ProviderFactory;
public class BouncycastleExportSubkeys {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testExportImport(ImplementationFactory implementationFactory) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
KeyPairGenerator generator;

View file

@ -36,7 +36,7 @@ public class ImportExportKeyTest {
* @throws IOException in case of a IO error
*/
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testExportImportPublicKeyRing(ImplementationFactory implementationFactory) throws IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
PGPPublicKeyRing publicKeys = TestKeys.getJulietPublicKeyRing();

View file

@ -47,7 +47,7 @@ import org.pgpainless.util.Passphrase;
public class BrainpoolKeyGenerationTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void generateEcKeysTest(ImplementationFactory implementationFactory)
throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -79,7 +79,7 @@ public class BrainpoolKeyGenerationTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void generateEdDSAKeyTest(ImplementationFactory implementationFactory)
throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException {
ImplementationFactory.setFactoryImplementation(implementationFactory);

View file

@ -34,7 +34,7 @@ public class CertificationKeyMustBeAbleToCertifyTest {
* This test therefore verifies that generating such keys fails.
*/
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testCertificationIncapableKeyTypesThrow(ImplementationFactory implementationFactory) {
ImplementationFactory.setFactoryImplementation(implementationFactory);
KeyType[] typesIncapableOfCreatingVerifications = new KeyType[] {

View file

@ -35,7 +35,7 @@ import org.pgpainless.util.ArmorUtils;
public class GenerateEllipticCurveKeyTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void test(ImplementationFactory implementationFactory) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException, IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
PGPSecretKeyRing keyRing = PGPainless.generateKeyRing()

View file

@ -39,7 +39,7 @@ public class GenerateKeyTest {
private static final Logger LOGGER = Logger.getLogger(GenerateKeyTest.class.getName());
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void generateKey(ImplementationFactory implementationFactory) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException, IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);

View file

@ -44,7 +44,7 @@ import org.pgpainless.util.ArmoredOutputStreamFactory;
public class GenerateKeyWithAdditionalUserIdTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void test(ImplementationFactory implementationFactory) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException, IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
Date now = new Date();

View file

@ -41,7 +41,7 @@ import org.pgpainless.util.Passphrase;
public class GenerateWithEmptyPassphrase {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testGeneratingKeyWithEmptyPassphraseDoesNotThrow(ImplementationFactory implementationFactory) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException, IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);

View file

@ -29,7 +29,7 @@ import org.pgpainless.key.generation.type.xdh.XDHSpec;
public class IllegalKeyFlagsTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testKeyCannotCarryFlagsTest(ImplementationFactory implementationFactory) {
ImplementationFactory.setFactoryImplementation(implementationFactory);
assertThrows(IllegalArgumentException.class, () -> PGPainless.generateKeyRing()

View file

@ -58,7 +58,7 @@ import org.pgpainless.util.Passphrase;
public class KeyRingInfoTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testWithEmilsKeys(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -165,7 +165,7 @@ public class KeyRingInfoTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void dummyS2KTest(ImplementationFactory implementationFactory) throws PGPException, IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -204,7 +204,7 @@ public class KeyRingInfoTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testGetKeysWithFlagsAndExpiry(ImplementationFactory implementationFactory) throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException {
ImplementationFactory.setFactoryImplementation(implementationFactory);

View file

@ -49,7 +49,7 @@ import org.pgpainless.util.Passphrase;
public class AddSubKeyTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testAddSubKey(ImplementationFactory implementationFactory) throws IOException, PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
PGPSecretKeyRing secretKeys = TestKeys.getCryptieSecretKeyRing();

View file

@ -40,7 +40,7 @@ import org.pgpainless.util.Passphrase;
public class AddUserIdTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void addUserIdToExistingKeyRing(ImplementationFactory implementationFactory) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
PGPSecretKeyRing secretKeys = PGPainless.generateKeyRing().simpleEcKeyRing("alice@wonderland.lit", "rabb1th0le");
@ -69,7 +69,7 @@ public class AddUserIdTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void deleteUserId_noSuchElementExceptionForMissingUserId(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -79,7 +79,7 @@ public class AddUserIdTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void deleteExistingAndAddNewUserIdToExistingKeyRing(ImplementationFactory implementationFactory) throws PGPException, IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);

View file

@ -39,7 +39,7 @@ public class ChangeExpirationTest {
private final OpenPgpV4Fingerprint subKeyFingerprint = new OpenPgpV4Fingerprint("F73FDE6439ABE210B1AF4EDD273EF7A0C749807B");
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void setExpirationDateAndThenUnsetIt_OnPrimaryKey(ImplementationFactory implementationFactory) throws PGPException, IOException, InterruptedException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -72,7 +72,7 @@ public class ChangeExpirationTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void setExpirationDateAndThenUnsetIt_OnSubkey(ImplementationFactory implementationFactory) throws PGPException, IOException, InterruptedException {
ImplementationFactory.setFactoryImplementation(implementationFactory);

View file

@ -56,7 +56,7 @@ public class ChangeSecretKeyRingPassphraseTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void changePassphraseOfWholeKeyRingTest(ImplementationFactory implementationFactory) throws PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -84,7 +84,7 @@ public class ChangeSecretKeyRingPassphraseTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void changePassphraseOfWholeKeyRingToEmptyPassphrase(ImplementationFactory implementationFactory) throws PGPException, IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
PGPSecretKeyRing secretKeys = PGPainless.modifyKeyRing(keyRing)
@ -102,7 +102,7 @@ public class ChangeSecretKeyRingPassphraseTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void changePassphraseOfSingleSubkeyToNewPassphrase(ImplementationFactory implementationFactory) throws PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -139,7 +139,7 @@ public class ChangeSecretKeyRingPassphraseTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void changePassphraseOfSingleSubkeyToEmptyPassphrase(ImplementationFactory implementationFactory) throws PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);

View file

@ -38,7 +38,7 @@ import org.pgpainless.key.protection.UnprotectedKeysProtector;
public class OldSignatureSubpacketsArePreservedOnNewSig {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void verifyOldSignatureSubpacketsArePreservedOnNewExpirationDateSig(ImplementationFactory implementationFactory)
throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException, InterruptedException, IOException {
ImplementationFactory.setFactoryImplementation(implementationFactory);

View file

@ -75,7 +75,7 @@ public class RevokeKeyWithGenericCertificationSignatureTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void test(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
revokeKey(SAMPLE_PRIVATE_KEY); // would crash previously

View file

@ -112,7 +112,7 @@ public class RevokeKeyWithoutPreferredAlgorithmsOnPrimaryKey {
"-----END PGP PRIVATE KEY BLOCK-----";
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testChangingExpirationTimeWithKeyWithoutPrefAlgos(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
Date expirationDate = new Date();

View file

@ -46,7 +46,7 @@ import org.pgpainless.util.Passphrase;
public class RevokeSubKeyTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void revokeSukeyTest(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
PGPSecretKeyRing secretKeys = TestKeys.getCryptieSecretKeyRing();
@ -71,7 +71,7 @@ public class RevokeSubKeyTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void detachedRevokeSubkeyTest(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
PGPSecretKeyRing secretKeys = TestKeys.getCryptieSecretKeyRing();
@ -97,7 +97,7 @@ public class RevokeSubKeyTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testRevocationSignatureTypeCorrect(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
PGPSecretKeyRing secretKeys = TestKeys.getCryptieSecretKeyRing();

View file

@ -46,7 +46,7 @@ import org.pgpainless.util.Passphrase;
public class SecretKeyRingProtectorTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testUnlockAllKeysWithSamePassword(ImplementationFactory implementationFactory) throws IOException, PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
@ -78,7 +78,7 @@ public class SecretKeyRingProtectorTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testUnlockSingleKeyWithPassphrase(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);

View file

@ -37,7 +37,7 @@ import org.pgpainless.util.Passphrase;
public class MultiPassphraseSymmetricEncryptionTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
@Disabled
public void encryptDecryptWithMultiplePassphrases(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);

View file

@ -51,7 +51,7 @@ import org.pgpainless.util.Passphrase;
public class SymmetricEncryptionTest {
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void encryptWithKeyAndPassphrase_DecryptWithKey(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);
byte[] plaintext = "This is a secret message".getBytes(StandardCharsets.UTF_8);
@ -105,7 +105,7 @@ public class SymmetricEncryptionTest {
}
@ParameterizedTest
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
@MethodSource("org.pgpainless.util.TestImplementationFactoryProvider#provideImplementationFactories")
public void testMismatchPassphraseFails(ImplementationFactory implementationFactory) throws IOException, PGPException {
ImplementationFactory.setFactoryImplementation(implementationFactory);

View file

@ -25,7 +25,7 @@ import java.util.List;
/**
* Utility class used to provide all available implementations of {@link ImplementationFactory} for parametrized tests.
*/
public class TestUtil {
public class TestImplementationFactoryProvider {
private static final List<ImplementationFactory> IMPLEMENTATIONS = Arrays.asList(
new BcImplementationFactory(),