Craft powerful JUnit 5 parameterized tests that’ll make my code bulletproof! Show me how to use @ParameterizedTest, @ValueSource, and @CsvSource to create flexible, data-driven test cases that’ll catch edge cases and boost my test coverage. Bonus points for demonstrating custom ArgumentsProvider implementations!
Open the Java class file for which unit tests in IntelliJ Idea and use the prompt to generate tests.
Install Prompt
Add this prompt to your Amazon Q CLI prompt library:
1. Download to local prompt library:
mkdir -p .amazonq/cli-prompts && curl -o .amazonq/cli-prompts/parameterize-like-a-pro-supercharge-your-junit-5-tests.md https://promptz.dev/prompts/testing/parameterize-like-a-pro-supercharge-your-junit-5-tests/2. Use with Q CLI:
q prompts use parameterize-like-a-pro-supercharge-your-junit-5-tests