elharo opened a new pull request, #313:
URL: https://github.com/apache/maven-remote-resources-plugin/pull/313
Fixes #312
`RemoteResourcesMojoTest` extended the deprecated
`org.apache.maven.plugin.testing.AbstractMojoTestCase` (a `PlexusTestCase` /
JUnit 3 base class). Its deprecation notice recommends JUnit 5 tests using the
maven-plugin-testing-harness `@MojoTest` annotation instead.
Changes:
- Rewrite `RemoteResourcesMojoTest` as a JUnit 5 test annotated with
`@MojoTest`.
- The imperative mojo lookups are replaced by `@InjectMojo` annotated
method parameters.
- The `PlexusContainer` needed to build the custom `MavenSession` is
captured by implementing `PlexusTestConfiguration.customizeContainer`.
- The reflection helpers now come from `MojoExtension`
(`setVariableValueToObject` / `getVariableValueFromObject`), and assertions use
JUnit 5 `Assertions`.
- The unused `setUp`/`tearDown` overrides are removed.
- `junit-vintage-engine` is no longer required and is replaced by
`junit-jupiter-engine`; `plexus-testing` is declared explicitly because it is
now referenced directly (and removed from the dependency-analysis ignore list
as appropriate).
This was the follow-up noted when the `AbstractIT` classes were migrated to
JUnit 5.
Verified with `mvn -Prun-its verify`: 11 unit tests, 9 integration tests and
the invoker jobs all pass, with `dependency:analyze-only` clean.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]