Skip to content

Commit 5a24e73

Browse files
timtebeekTim te Beek
andauthored
Fix JUnit5MigrationTest.addMockitoJupiterDependencyIfExtendWithPresent (#931)
The upstream AddDependency recipe now correctly scopes onlyIfUsing checks to match the dependency's scope. Test-scoped dependencies are only added when the usage is detected in test sources, so move the test class from main sources to test sources. Co-authored-by: Tim te Beek <tim@device-97.home>
1 parent c789ee8 commit 5a24e73

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/test/java/org/openrewrite/java/testing/junit5/JUnit5MigrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ void addMockitoJupiterDependencyIfExtendWithPresent() {
596596
.build()
597597
.activateRecipes("org.openrewrite.java.testing.junit5.UseMockitoExtension")),
598598
mavenProject("sample",
599-
srcMainJava(
599+
srcTestJava(
600600
//language=java
601601
java(
602602
"""

0 commit comments

Comments
 (0)