Skip to content

Commit

Permalink
Remove public visibility of JUnit 5 tests (#498)
Browse files Browse the repository at this point in the history
* refactor: Remove `public` visibility of JUnit 5 tests

Partial fix for #496

Co-authored-by: Moderne <team@moderne.io>

* Remove public modifier from IT classes

Also remove unused imports

* Restore DiscoverNoActiveRecipeIT after failed local merge

---------

Co-authored-by: Moderne <team@moderne.io>
  • Loading branch information
timtebeek and TeamModerne authored Feb 6, 2023
1 parent 01c2c0f commit 3cff0f5
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import static org.assertj.core.api.Assertions.assertThat;

public class AbstractRewriteMojoTest {
class AbstractRewriteMojoTest {

@ParameterizedTest
@ValueSource(strings = {"rewrite.yml", "https://httpstat.us/200"})
Expand All @@ -32,7 +32,7 @@ public void execute() {
}
};

if(!loc.startsWith("http")) {
if (!loc.startsWith("http")) {
Files.write(temp.resolve(loc), "rewrite".getBytes(StandardCharsets.UTF_8));
}

Expand Down
3 changes: 1 addition & 2 deletions src/test/java/org/openrewrite/maven/BasicIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

import com.soebes.itf.jupiter.extension.*;
import com.soebes.itf.jupiter.maven.MavenExecutionResult;
import org.junit.jupiter.api.Disabled;

import static com.soebes.itf.extension.assertj.MavenITAssertions.assertThat;

@MavenJupiterExtension
@MavenOption(MavenCLIOptions.NO_TRANSFER_PROGRESS)
@SuppressWarnings("NewClassNamingConvention")
public class BasicIT {
class BasicIT {

@MavenTest
void groupid_artifactid_should_be_ok(MavenExecutionResult result) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/openrewrite/maven/ConfigureMojoIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@SystemProperty(value = "dependencies", content = "org.openrewrite.recipe:rewrite-spring:4.14.1")
})
@SuppressWarnings("NewClassNamingConvention")
public class ConfigureMojoIT {
class ConfigureMojoIT {

@MavenTest
void single_project(MavenExecutionResult result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@MavenJupiterExtension
@MavenOption(MavenCLIOptions.NO_TRANSFER_PROGRESS)
@MavenGoal("${project.groupId}:${project.artifactId}:${project.version}:discover")
public class DiscoverNoActiveRecipeIT {
class DiscoverNoActiveRecipeIT {

@MavenTest
void single_project(MavenExecutionResult result) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/openrewrite/maven/InitMojoIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@SystemProperty(value = "rootOnly", content = "false")
})
@SuppressWarnings("NewClassNamingConvention")
public class InitMojoIT {
class InitMojoIT {

@MavenTest
void single_project(MavenExecutionResult result) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/openrewrite/maven/RemoveMojoIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@MavenOption(MavenCLIOptions.NO_TRANSFER_PROGRESS)
@MavenGoal("${project.groupId}:${project.artifactId}:${project.version}:remove")
@SuppressWarnings("NewClassNamingConvention")
public class RemoveMojoIT {
class RemoveMojoIT {

@MavenTest
void single_project(MavenExecutionResult result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@MavenOption(MavenCLIOptions.NO_TRANSFER_PROGRESS)
@MavenGoal("${project.groupId}:${project.artifactId}:${project.version}:cyclonedx")
@SuppressWarnings("NewClassNamingConvention")
public class RewriteCycloneDxIT {
class RewriteCycloneDxIT {

@MavenTest
@Disabled("module b consistently fails to resolve the locally-built artifact a due to aether resolution errors")
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/openrewrite/maven/RewriteDiscoverIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@MavenOption(MavenCLIOptions.NO_TRANSFER_PROGRESS)
@MavenGoal("${project.groupId}:${project.artifactId}:${project.version}:discover")
@SuppressWarnings("NewClassNamingConvention")
public class RewriteDiscoverIT {
class RewriteDiscoverIT {

@Nested
@MavenGoal("${project.groupId}:${project.artifactId}:${project.version}:discover")
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/openrewrite/maven/RewriteDryRunIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@MavenOption(MavenCLIOptions.NO_TRANSFER_PROGRESS)
@MavenOption(MavenCLIOptions.DEBUG)
@MavenGoal("${project.groupId}:${project.artifactId}:${project.version}:dryRun")
public class RewriteDryRunIT {
class RewriteDryRunIT {

@MavenTest
void fail_on_dry_run(MavenExecutionResult result) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/openrewrite/maven/RewriteRunIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@DisabledOnOs(OS.WINDOWS)
@MavenGoal("${project.groupId}:${project.artifactId}:${project.version}:run")
@SuppressWarnings("NewClassNamingConvention")
public class RewriteRunIT {
class RewriteRunIT {

@MavenTest
void multi_module_project(MavenExecutionResult result) {
Expand Down

0 comments on commit 3cff0f5

Please sign in to comment.