junit
Originally fromteachingai/full-stack-skills
Installation
SKILL.md
When to use this skill
Use this skill whenever the user wants to:
- Write Java or Kotlin unit tests with JUnit 4 or JUnit 5 (Jupiter)
- Use annotations (@Test, @BeforeEach, @AfterEach, @ParameterizedTest)
- Apply assertions (assertEquals, assertThrows, assertAll)
- Integrate with Mockito or AssertJ for mocking and fluent assertions
- Configure test execution with Maven Surefire or Gradle
How to use this skill
Workflow
- Write test classes and methods annotated with
@Test - Set up and tear down test state with lifecycle annotations
- Use assertions to verify expected behavior
- Mock dependencies with Mockito for isolated unit tests