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:
@@ -0,0 +1,15 @@
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
import org.junit.platform.commons.support.ReflectionSupport;
|
||||
|
||||
/** The replacements for OldApis. This compiles on 5.14.4 and on 6.1.3, so make these changes before you upgrade. */
|
||||
@TestMethodOrder(MethodOrderer.MethodName.class)
|
||||
class FixedApis {
|
||||
|
||||
@Test
|
||||
void usesTheReplacements() {
|
||||
Object loaded = ReflectionSupport.tryToLoadClass("java.lang.String").toOptional().orElseThrow();
|
||||
System.out.println(loaded);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user