From 8a262b4eb03f95b8b06b0d03c79eeb7bfdcc6320 Mon Sep 17 00:00:00 2001 From: Steve Hill Date: Sat, 8 Jul 2023 14:11:17 +0000 Subject: [PATCH] refactor: Automatically select recipe examples from the unit test cases of a recipe Issue #4 Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.recipes.SelectRecipeExamples Co-authored-by: Moderne --- .../org/openrewrite/jenkins/UpgradeVersionPropertyTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/openrewrite/jenkins/UpgradeVersionPropertyTest.java b/src/test/java/org/openrewrite/jenkins/UpgradeVersionPropertyTest.java index 2e85eda..470014f 100644 --- a/src/test/java/org/openrewrite/jenkins/UpgradeVersionPropertyTest.java +++ b/src/test/java/org/openrewrite/jenkins/UpgradeVersionPropertyTest.java @@ -16,6 +16,7 @@ package org.openrewrite.jenkins; import org.junit.jupiter.api.Test; +import org.openrewrite.DocumentExample; import org.openrewrite.test.RecipeSpec; import org.openrewrite.test.RewriteTest; @@ -26,7 +27,8 @@ public class UpgradeVersionPropertyTest implements RewriteTest { public void defaults(RecipeSpec spec) { spec.recipe(new UpgradeVersionProperty("jenkins.version", "2.364.1")); } - + + @DocumentExample @Test void shouldUpgrade() { rewriteRun(pomXml(