Skip to content

Commit

Permalink
refactor: OpenRewrite best practices
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek and TeamModerne committed Apr 14, 2024
1 parent e96a966 commit 7bb2e94
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@
package org.openrewrite.java.dependencies;

import org.junit.jupiter.api.Test;
import org.openrewrite.DocumentExample;
import org.openrewrite.test.RecipeSpec;
import org.openrewrite.test.RewriteTest;

import static org.openrewrite.gradle.Assertions.buildGradle;
import static org.openrewrite.gradle.toolingapi.Assertions.withToolingApi;
import static org.openrewrite.maven.Assertions.pomXml;

public class ChangeDependencyGroupAndArtifactIdTest implements RewriteTest {
class ChangeDependencyGroupAndArtifactIdTest implements RewriteTest {

@Override
public void defaults(RecipeSpec spec) {
Expand All @@ -32,8 +33,9 @@ public void defaults(RecipeSpec spec) {
}


@DocumentExample
@Test
public void gradle() {
void gradle() {
rewriteRun(
spec -> spec.beforeRecipe(withToolingApi()),
//language=groovy
Expand Down Expand Up @@ -69,7 +71,7 @@ public void gradle() {
}

@Test
public void maven() {
void maven() {
rewriteRun(
//language=xml
pomXml(
Expand Down

0 comments on commit 7bb2e94

Please sign in to comment.