Class CryptoUtilJ8ParameterizedTest
- java.lang.Object
-
- org.apache.fulcrum.jce.crypto.extended.CryptoUtilJ8ParameterizedTest
-
public class CryptoUtilJ8ParameterizedTest extends Object
Test suite for crypto functionality Could still not access arguments of parameterized tests in lifecycle callback methods - https://github.com/junit-team/junit5/issues/944 - https://github.com/junit-team/junit5/issues/1139#issuecomment-341683075 e.g. with ExtendWith(SupportedTypeArguments.class)
-
-
Constructor Summary
Constructors Constructor Description CryptoUtilJ8ParameterizedTest()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clean()
protected char[]
getPassword()
protected File
getTempDataDirectory()
protected File
getTestDataDirectory()
void
setup()
void
testBinaryHandling(CryptoParametersJ8.TYPES type)
Parameterized Test Test encryption and decryption of binary datavoid
testPasswordFactory()
Test creating a passwordvoid
testPdfDecryption(CryptoParametersJ8.TYPES type)
Parameterized Test Decrypt a PDF filevoid
testPdfEncryption(CryptoParametersJ8.TYPES type)
Parameterized Test Encrypt a PDF filevoid
testStringEncryption(CryptoParametersJ8.TYPES type)
Parameterized Test Test encryption and decryption of Stringsvoid
testStringHandling(CryptoParametersJ8.TYPES type)
Parameterized Test Test encryption and decryption of Stringsvoid
testStringWithPasswordEncryption(CryptoParametersJ8.TYPES type)
Parameterized Test Test encryption and decryption of Stringsvoid
testTextDecryption(CryptoParametersJ8.TYPES type)
Parameterized Test Decrypt a text filevoid
testTextEncryption(CryptoParametersJ8.TYPES type)
Parameterized Test Encrypt a text file
-
-
-
Constructor Detail
-
CryptoUtilJ8ParameterizedTest
public CryptoUtilJ8ParameterizedTest()
Constructor
-
-
Method Detail
-
getPassword
protected char[] getPassword()
- Returns:
- Returns the password.
-
getTempDataDirectory
protected File getTempDataDirectory()
- Returns:
- Returns the tempDataDirectory.
-
getTestDataDirectory
protected File getTestDataDirectory()
- Returns:
- Returns the testDataDirectory.
-
setup
@BeforeEach public void setup()
-
clean
@AfterEach public void clean()
-
testTextEncryption
@ParameterizedTest @ArgumentsSource(SupportedTypeArguments.class) public void testTextEncryption(CryptoParametersJ8.TYPES type)
Parameterized Test Encrypt a text file- Parameters:
type
- the type to be tested based onCryptoParametersJ8.TYPES
-
testTextDecryption
@ParameterizedTest @ArgumentsSource(SupportedTypeArguments.class) public void testTextDecryption(CryptoParametersJ8.TYPES type)
Parameterized Test Decrypt a text file- Parameters:
type
- the type to be tested based onCryptoParametersJ8.TYPES
-
testPdfEncryption
@ParameterizedTest @ArgumentsSource(SupportedTypeArguments.class) public void testPdfEncryption(CryptoParametersJ8.TYPES type)
Parameterized Test Encrypt a PDF file- Parameters:
type
- the type to be tested based onCryptoParametersJ8.TYPES
-
testPdfDecryption
@ParameterizedTest @ArgumentsSource(SupportedTypeArguments.class) public void testPdfDecryption(CryptoParametersJ8.TYPES type)
Parameterized Test Decrypt a PDF file- Parameters:
type
- the type to be tested based onCryptoParametersJ8.TYPES
-
testStringEncryption
@ParameterizedTest @ArgumentsSource(SupportedTypeArguments.class) public void testStringEncryption(CryptoParametersJ8.TYPES type)
Parameterized Test Test encryption and decryption of Strings- Parameters:
type
- the type to be tested based onCryptoParametersJ8.TYPES
-
testStringHandling
@ParameterizedTest @ArgumentsSource(SupportedTypeArguments.class) public void testStringHandling(CryptoParametersJ8.TYPES type)
Parameterized Test Test encryption and decryption of Strings- Parameters:
type
- the type to be tested based onCryptoParametersJ8.TYPES
-
testPasswordFactory
@Test public void testPasswordFactory() throws Exception
Test creating a password- Throws:
Exception
- Generic exception
-
testBinaryHandling
@ParameterizedTest @ArgumentsSource(SupportedTypeArguments.class) public void testBinaryHandling(CryptoParametersJ8.TYPES type) throws Exception
Parameterized Test Test encryption and decryption of binary data- Parameters:
type
- the type to be tested based onCryptoParametersJ8.TYPES
- Throws:
Exception
- Generic exception
-
testStringWithPasswordEncryption
@ParameterizedTest @ArgumentsSource(SupportedTypeArguments.class) public void testStringWithPasswordEncryption(CryptoParametersJ8.TYPES type)
Parameterized Test Test encryption and decryption of Strings- Parameters:
type
- the type to be tested based onCryptoParametersJ8.TYPES
-
-