Skip to content

Commit 096d68a

Browse files
committed
CLAUDE instructions for tests
1 parent 548a914 commit 096d68a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ mvn test -Dtest=SomeTest -DcayenneTestConnection=h2
100100
### Test Infrastructure
101101

102102
Tests in `cayenne/src/test/` use a shared set of test mapping files and database scripts in `src/test/resources/`. The `DBHelper` and `UnitDbAdapter` utilities handle database-specific test setup. TestContainers is used for non-embedded databases.
103-
Test naming: `*Test.java` = unit tests (Surefire), `*IT.java` = integration tests (Failsafe). Tests use JUnit 4 and Mockito.
103+
Test naming: `*Test.java` = unit tests (Surefire), `*IT.java` = integration tests (Failsafe).
104+
105+
**Test style:** JUnit 5 is the standard for all new tests. JUnit 4-style tests are legacy. New test classes and methods must be `public`; method names must not use the `test` prefix (e.g., use `someFeature()` not `testSomeFeature()`). Mockito is used for mocking for legacy reasons. Should avoid it in newer tests
104106

105107
## CI Matrix
106108

0 commit comments

Comments
 (0)