Skip to content

Commit efa7b6f

Browse files
OpenRewrite recipe best practices
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.recipes.rewrite.OpenRewriteRecipeBestPractices?organizationId=QUxML01vZGVybmUvTW9kZXJuZSArIE9wZW5SZXdyaXRl Co-authored-by: Moderne <team@moderne.io>
1 parent 8171969 commit efa7b6f

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/main/resources/META-INF/rewrite/examples.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2625,6 +2625,34 @@ examples:
26252625
language: kotlin
26262626
---
26272627
type: specs.openrewrite.org/v1beta/example
2628+
recipeName: org.openrewrite.java.testing.junit5.CleanupKotlinJUnit5AssertionImports
2629+
examples:
2630+
- description: '`CleanupKotlinJUnit5AssertionImportsTest#removesStaticAssertionsWildcardImportWhenApiWildcardPresent`'
2631+
sources:
2632+
- before: |
2633+
import org.junit.jupiter.api.*
2634+
import org.junit.jupiter.api.Assertions.*
2635+
2636+
class ATest {
2637+
@Test
2638+
fun testSomething() {
2639+
assertNull(null)
2640+
assertNotNull("test")
2641+
}
2642+
}
2643+
after: |
2644+
import org.junit.jupiter.api.*
2645+
2646+
class ATest {
2647+
@Test
2648+
fun testSomething() {
2649+
assertNull(null)
2650+
assertNotNull("test")
2651+
}
2652+
}
2653+
language: kotlin
2654+
---
2655+
type: specs.openrewrite.org/v1beta/example
26282656
recipeName: org.openrewrite.java.testing.junit5.CsvSourceToValueSource
26292657
examples:
26302658
- description: '`CsvSourceToValueSourceTest#replaceCsvSourceWithValueSourceForStrings`'

0 commit comments

Comments
 (0)