From 41dd21c0062f0a0c173a8c8920ae7b0376b7971c Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Thu, 8 Aug 2024 15:50:50 +0200 Subject: [PATCH] Polish: strip unnecessary elements, add highlighting, consistent new lines --- .../testing/junit5/RemoveTryCatchFailBlocksTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/java/org/openrewrite/java/testing/junit5/RemoveTryCatchFailBlocksTest.java b/src/test/java/org/openrewrite/java/testing/junit5/RemoveTryCatchFailBlocksTest.java index 887be8cc3..b76aefae3 100644 --- a/src/test/java/org/openrewrite/java/testing/junit5/RemoveTryCatchFailBlocksTest.java +++ b/src/test/java/org/openrewrite/java/testing/junit5/RemoveTryCatchFailBlocksTest.java @@ -646,16 +646,13 @@ public void testMethod() { @Test @Issue("https://github.com/openrewrite/rewrite-testing-frameworks/issues/547") void removeTryCatchFailBlocksWithReturningTry() { + //language=java rewriteRun( - spec -> spec.recipe(new RemoveTryCatchFailBlocks()), java( """ - package com.helloworld; - import static org.junit.jupiter.api.Assertions.fail; - public class Foo { - + class Foo { String getFoo() { try { return "foo"; @@ -663,6 +660,9 @@ String getFoo() { fail(); } } - }""")); + } + """ + ) + ); } }