Skip to content

Commit

Permalink
Remove JUnit5BestPractices from RemoveObsoleteRunners (#476)
Browse files Browse the repository at this point in the history
* Remove `JUnit5BestPractices` from `RemoveObsoleteRunners`

As that includes `TestsShouldNotBePublic`, which is an opinionated recipe that results in a lot of (optional) changes.
As reported via Slack: https://rewriteoss.slack.com/archives/C01A843MWG5/p1705404676460549

* Minimize expected changes
  • Loading branch information
timtebeek authored Jan 16, 2024
1 parent 730391d commit 74acf49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/main/resources/META-INF/rewrite/spring-boot-24.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,3 @@ recipeList:
# There is a third variant of this class in spring-cloud-commons and there is not yet a suitable migration
# path. Once one exists, this can likely be added for removal as well.
#- org.springframework.cloud.test.ModifiedClassPathRunner
- org.openrewrite.java.testing.junit5.JUnit5BestPractices
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ public void testFindAll() {
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ProductionConfigurationTests {
public class ProductionConfigurationTests {
@Test
void findAll() {
public void testFindAll() {
}
}
"""
Expand Down Expand Up @@ -115,10 +115,10 @@ static class CustomConfiguration {
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
@SpringJUnitConfig(classes = ProductionConfigurationTests.CustomConfiguration.class)
class ProductionConfigurationTests {
public class ProductionConfigurationTests {
@Test
void findAll() {
public void testFindAll() {
}
@Configuration
Expand Down

0 comments on commit 74acf49

Please sign in to comment.