Skip to content

Commit

Permalink
Tidy up naming in AbstractGenerateMojoTest
Browse files Browse the repository at this point in the history
  • Loading branch information
ascopes committed Apr 14, 2024
1 parent 2f61a53 commit 7677db0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ public void execute() throws MojoExecutionException, MojoFailureException {
throw new MojoExecutionException(ex.getMessage(), ex);
}

//noinspection DataFlowIssue
var request = ImmutableGenerationRequest.builder()
.binaryMavenPlugins(nonNullList(binaryMavenPlugins))
.binaryPathPlugins(nonNullList(binaryPathPlugins))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

abstract class AbstractGenerateMojoTestTemplate<A extends AbstractGenerateMojo> {

abstract A getInstance();
abstract A newInstance();

abstract SourceRootRegistrar expectedSourceRootRegistrar();

Expand All @@ -43,7 +43,7 @@ abstract class AbstractGenerateMojoTestTemplate<A extends AbstractGenerateMojo>
@Test
void sourceRootRegistrarIsTheExpectedValue() {
// Then
assertThat(getInstance().sourceRootRegistrar())
assertThat(newInstance().sourceRootRegistrar())
.isEqualTo(expectedSourceRootRegistrar());
}

Expand All @@ -60,7 +60,7 @@ void defaultSourceDirectoryIsTheExpectedPath(@TempDir Path tempDir) {
.thenReturn(mockCurrentProject);

// Then
assertThat(getInstance().defaultSourceDirectory(mockMavenSession))
assertThat(newInstance().defaultSourceDirectory(mockMavenSession))
.isEqualTo(expectedDefaultSourceDirectory(mockMavenSession));
}

Expand All @@ -81,7 +81,7 @@ void defaultOutputDirectoryIsTheExpectedPath(@TempDir Path tempDir) {
.thenReturn(mockCurrentProject);

// Then
assertThat(getInstance().defaultOutputDirectory(mockMavenSession))
assertThat(newInstance().defaultOutputDirectory(mockMavenSession))
.isEqualTo(expectedDefaultOutputDirectory(mockMavenSession));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class MainGenerateMojoTest extends AbstractGenerateMojoTestTemplate<MainGenerateMojo> {

@Override
MainGenerateMojo getInstance() {
MainGenerateMojo newInstance() {
return new MainGenerateMojo();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class TestGenerateMojoTest extends AbstractGenerateMojoTestTemplate<TestGenerateMojo> {

@Override
TestGenerateMojo getInstance() {
TestGenerateMojo newInstance() {
return new TestGenerateMojo();
}

Expand Down

0 comments on commit 7677db0

Please sign in to comment.