From 61dc01508d20c261a848a39349a03f0b881f918f Mon Sep 17 00:00:00 2001 From: nbruno Date: Thu, 2 Mar 2023 07:08:19 -0500 Subject: [PATCH] Enable recipe in JUnit 5 migration (#296) (#298) * Enable recipe in JUnit 5 migration (#296) * Enable test associated with SpringJUnitConfig --------- Co-authored-by: Tim te Beek --- src/main/resources/META-INF/rewrite/spring-boot-24.yml | 3 +-- .../java/spring/boot2/SpringBoot2JUnit4to5MigrationTest.java | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/resources/META-INF/rewrite/spring-boot-24.yml b/src/main/resources/META-INF/rewrite/spring-boot-24.yml index 9d6000861..5fa48fd59 100644 --- a/src/main/resources/META-INF/rewrite/spring-boot-24.yml +++ b/src/main/resources/META-INF/rewrite/spring-boot-24.yml @@ -141,8 +141,7 @@ recipeList: - org.openrewrite.java.spring.boot2.OutputCaptureExtension - org.openrewrite.java.spring.boot2.UnnecessarySpringRunWith - org.openrewrite.java.spring.boot2.UnnecessarySpringExtension -# TODO Enable once tested on more projects through public.moderne.io -# - org.openrewrite.java.spring.boot2.ReplaceExtendWithAndContextConfiguration + - org.openrewrite.java.spring.boot2.ReplaceExtendWithAndContextConfiguration - org.openrewrite.java.spring.boot2.RemoveObsoleteSpringRunners - org.openrewrite.maven.AddDependency: groupId: org.springframework.boot diff --git a/src/testWithSpringBoot_2_3/java/org/openrewrite/java/spring/boot2/SpringBoot2JUnit4to5MigrationTest.java b/src/testWithSpringBoot_2_3/java/org/openrewrite/java/spring/boot2/SpringBoot2JUnit4to5MigrationTest.java index 90c3748a6..d8b61b459 100644 --- a/src/testWithSpringBoot_2_3/java/org/openrewrite/java/spring/boot2/SpringBoot2JUnit4to5MigrationTest.java +++ b/src/testWithSpringBoot_2_3/java/org/openrewrite/java/spring/boot2/SpringBoot2JUnit4to5MigrationTest.java @@ -15,7 +15,6 @@ */ package org.openrewrite.java.spring.boot2; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.openrewrite.Issue; import org.openrewrite.config.Environment; @@ -82,7 +81,6 @@ void testFindAll() { @Issue("https://github.com/openrewrite/rewrite-spring/issues/296") @Test - @Disabled("Requires inclusion of ReplaceExtendWithAndContextConfiguration after that's verified on more projects") void springBootRunWithContextConfigurationReplacedWithSpringJUnitConfig() { //language=java rewriteRun(