Skip to content

Commit

Permalink
GH-438: Add missing test case to AbstractGenerateMojoTestTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
ascopes committed Nov 12, 2024
1 parent e78a757 commit 4d42154
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,27 @@ void whenImportPathsProvidedExpectPathsInRequest(
}
}

@DisplayName("incrementalCompilation tests")
@Nested
class IncrementalCompilationTest {

@DisplayName("incrementalCompilation is set to the specified value")
@ValueSource(booleans = {true, false})
@ParameterizedTest(name = "for {0}")
void incrementalCompilationIsSetToSpecifiedValue(boolean value) throws Throwable {
mojo.incrementalCompilation = value;

// When
mojo.execute();

// Then
var captor = ArgumentCaptor.forClass(GenerationRequest.class);
verify(mojo.sourceCodeGenerator).generate(captor.capture());
var actualRequest = captor.getValue();
assertThat(actualRequest.isIncrementalCompilationEnabled()).isEqualTo(value);
}
}

@DisplayName("jvmMavenPlugins tests")
@Nested
class JvmMavenPluginsTest {
Expand Down

0 comments on commit 4d42154

Please sign in to comment.