Add junit-6-migration module: JUnit 5.14.4 vs 6.1.3, API diff and behaviour probes

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YPgGH6aMbSLANL3E2HHmS6
This commit is contained in:
2026-10-25 18:46:52 +00:00
co-authored by Claude Sonnet 5.5
parent 8fc8bc934f
commit 820318be7d
22 changed files with 1018 additions and 0 deletions
@@ -0,0 +1,56 @@
package com.ankurm.junitmigration;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvFileSource;
import org.junit.jupiter.params.provider.CsvSource;
/**
* Not run by Surefire (the name does not end in Test). {@link BehaviourTest} launches it through the
* JUnit Platform Launcher and records what each invocation was called and whether it passed, on whichever
* JUnit version is on the class path.
*/
class CsvProbe {
@ParameterizedTest
@CsvSource({
"apple, 1",
"'a,b', 2",
" padded , 3",
"'', 4",
", 5",
"NIL, 6",
"'it''s', 7",
"\"dq\", 8"
})
void basicRows(String name, int n) {
}
@ParameterizedTest
@CsvSource(value = {"x;1", "y;2"}, delimiter = ';', useHeadersInDisplayName = false)
void customDelimiter(String name, int n) {
}
@ParameterizedTest
@CsvSource(textBlock = """
name, qty
widget, 4
'multi word', 5
""", useHeadersInDisplayName = true)
void textBlockWithHeader(String name, int qty) {
}
@ParameterizedTest
@CsvSource(value = {"a,b,c"})
void tooManyColumnsForParameters(String first) {
}
@ParameterizedTest
@CsvSource(value = {"1234567890,1"}, maxCharsPerColumn = 5)
void columnLongerThanLimit(String value, int n) {
}
@ParameterizedTest
@CsvFileSource(resources = "/probe.csv", numLinesToSkip = 1)
void fileRows(String name, int n) {
}
}