Provides JUnit 5 best practices for Java unit tests: setup, AAA pattern, parameterized tests, assertions, Mockito mocking, and organization.
From awesome-copilotnpx claudepluginhub ctr26/dotfiles --plugin awesome-copilotThis skill uses the workspace's default tool permissions.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Uses ctx7 CLI to fetch current library docs, manage AI coding skills (install/search/generate), and configure Context7 MCP for AI editors.
Your goal is to help me write effective unit tests with JUnit 5, covering both standard and data-driven testing approaches.
src/test/java.junit-jupiter-api, junit-jupiter-engine, and junit-jupiter-params for parameterized tests.mvn test or gradle test.Test suffix, e.g., CalculatorTest for a Calculator class.@Test for test methods.methodName_should_expectedBehavior_when_scenario.@BeforeEach and @AfterEach for per-test setup and teardown.@BeforeAll and @AfterAll for per-class setup and teardown (must be static methods).@DisplayName to provide a human-readable name for test classes and methods.@ParameterizedTest to mark a method as a parameterized test.@ValueSource for simple literal values (strings, ints, etc.).@MethodSource to refer to a factory method that provides test arguments as a Stream, Collection, etc.@CsvSource for inline comma-separated values.@CsvFileSource to use a CSV file from the classpath.@EnumSource to use enum constants.org.junit.jupiter.api.Assertions (e.g., assertEquals, assertTrue, assertNotNull).assertThat(...).is...).assertThrows or assertDoesNotThrow to test for exceptions.assertAll to ensure all assertions are checked before the test fails.@Mock and @InjectMocks annotations from Mockito to simplify mock creation and injection.@Tag to categorize tests (e.g., @Tag("fast"), @Tag("integration")).@TestMethodOrder(MethodOrderer.OrderAnnotation.class) and @Order to control test execution order when strictly necessary.@Disabled to temporarily skip a test method or class, providing a reason.@Nested to group tests in a nested inner class for better organization and structure.