You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2020/05/24 10:44:16 UTC

[maven] branch MODELTESTS_IMPROVEMENT updated (b5c72b4 -> d835922)

This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a change to branch MODELTESTS_IMPROVEMENT
in repository https://gitbox.apache.org/repos/asf/maven.git.


 discard b5c72b4  WIP - Fixed code issue.
 discard c77326c  Added author.
 discard ba37943  Using displayName in Interface.
 discard 3f41ab7  Removed all DisplayName annotations from test classes and replaced with DisplayName generator.
 discard 5975a1a  Removing code redundancy Using assertj, JUnit Jupiter
     add bf7b99a  [MNG-6884] - Cleanup POM File after version upgrade
     add af1bf4c  [MNG-6886] upgrade plexus-cipher to 1.8 and update changed groupId (#335)
     add 8f6e02f  update xmlunit (#336)
     add 0efaf46  README improvement
     add e22b055  added Jira badge
     add ec92934  [MNG-4660] --resume-from flag resolves inter-module dependencies
     add f6c07d9  [MNG-6863] --also-make is being ignored when calling --resume-from
     add ca62152  apache-rat-plugin - section not needed after upgrading the parent pom
     add 672041e  [MNG-6897] Upgrade Maven Wagon to 3.4.0
     add ecf8573  [MNG-6672] Upgrade Maven Resolver to 1.4.2
     add be16fc6  [MNG-2478] add "resources-filtered" filtered resource directories to super POM
     add 70cee55  [MNG-6891] Improve user-friendliness --fail-on-severity
     add eda1b92  [MNG-6856] Remove dependency to Powermock
     add 5cf6d6b  [MNG-6893] Super POM - upgrade maven-antrun-plugin to 3.0.0
     add 5397fb6  [MNG-6873] Align JUnit version to 4.13
     add df3fdc9  A copy of the gradle wrapper ported for use with maven Lightly touched to better mesh with current maven builds. (some of which my not have been necessary in hind sight)
     add e210666  Adding simple README
     add 1457a7b  correcting README formatting
     add 3b0965d  Update properties file to point to maven 3.2.3
     add 2f07f99  Update to Maven 3.3.1 which resides in Maven Central
     add ff3e114  Formatting
     add 5deb2a6  Make sure the maven.multiModuleProjectDirectory envar is set for proper 3.3.1+ execution
     add 821bed1  Update the wrapper jar
     add 7bd4364  Use the now standard .mvn directory
     add 5d40b53  Use the Maven 3.3.1 startup scripts to account for jvm.config and maven.config
     add d1bfe96  Use provisio packaging to produce an archive that can be deployed for use in a Maven plugin
     add 5457a1b  Use a released version of provisio
     add 9fdaf2f  [maven-release-plugin] prepare release maven-wrapper-0.1.0
     add 03bc10d  [maven-release-plugin] prepare for next development iteration
     add fcd0a69  Update location for searching for the version
     add c830673  [maven-release-plugin] prepare release maven-wrapper-0.1.1
     add 0180586  [maven-release-plugin] prepare for next development iteration
     add 5093817  Update properties path Whatever
     add 580d9be  [maven-release-plugin] prepare release maven-wrapper-0.1.2
     add 5994302  [maven-release-plugin] prepare for next development iteration
     add 70d1052  Update the README.md with instructions
     add 7709755  Fix a few typos
     add 36149e9  Add a note about using the windows script
     add 0aabf3e  Fix typo
     add 040d343  Remove some unused parts of the windows scripts and rename them to .cmd
     add f4b4547  Add license file
     add a1b3a7b  Add license stanza to POM
     add cbb5886  Fix while loop so that basedir is detected in current dir
     add c35e352  Correct name of Windows script in README
     add 307de3d  super-mega minor typo
     add ec3d0cc  Align Un*x and Windows scripts to both use MAVEN_CONFIG consistently
     add 53eff03  Use basedir location instead of "." to locate wrapper jar
     add 0fd5540  [maven-release-plugin] prepare release maven-wrapper-0.1.3
     add f75e301  [maven-release-plugin] prepare for next development iteration
     add 98b6027  Use working files to create wrapper jar
     add 5eeb65c  [maven-release-plugin] prepare release maven-wrapper-0.1.4
     add 4737137  [maven-release-plugin] prepare for next development iteration
     add 2d3acb1  Use org.apache.ant
     add 7aacf41  Fix typo
     add 7fa99bc  handle MAVEN_PROJECTBASEDIR correctly in cygwin
     add 295826d  avoid using MAVEN_CMD_LINE_ARGS for invocation since that can losse parameter escaping
     add 6c57c4c  Remove whitespace (#22)
     add a13b42e  Update to release version of parent
     add 2d8f4c5  use @REM instead of # (#27)
     add 79440c9  Update release version
     add 8a6480c  Use Apple-recommended strategy for locating JAVA_HOME. This works correctly with both Oracle and Apple JDKs.
     add 75a200a  upped version to new snapshot since 0.1.6 is already on central
     add 022fedb  Be defensive about creating directories for files
     add d3b3473  Fix path escaping
     add 6d30420  remove unused MAVEN_CMD_LINE_ARGS
     add bf50858  adding changelog
     add 2ccae98  Quote paths in commands
     add f2f1887  one more PR merge and changelog update
     add ddf2786  upgraded provisio maven plugin
     add a3706dc  updated to 0.2.0-SNAPSHOT as version due to number of changes
     add 55ee1e4  updated parent to latest release
     add 3aeabdc  updated wrapper maven version to 3.3.9
     add 54b2282  fix to avoid usage of stale maven wrapper jar
     add 4235271  changelog updates
     add fa9b9ab  support spaces in folder names on nix, simplified from https://github.com/takari/maven-wrapper/pull/25
     add 437912b  added changelog entry about spaces fix
     add 449d0c7  updated wrapper maven version to 3.5.0
     add feac8c6  Add .DS_Store to .gitignore
     add 92e3454  Upgraded default Maven version to 3.5.0
     add f530a7f  ammeded changelog
     add fc9c774  added note about dash testing
     add 79fc2f2  Use of bashisms make this script fail in minimal /bin/sh implementations like dash
     add feb3731  upgraded parent
     add afbc151  fixing issue on Solaris
     add a23522d  added section about supported systems
     add b0b56ae  solaris support changelog entry and release date
     add c64b0f1  [maven-release-plugin] prepare release maven-wrapper-0.2.0
     add d104930  [maven-release-plugin] prepare for next development iteration
     add 557c8f9  improved wording on supported systems
     add ab9742e  Make artifact compatible with older Java
     add c6b60b2  Ignore IntelliJ files
     add 1b903e7  added doc about Java version
     add 348ee53  added changelog entry for java 1.5 change and release
     add d3a389b  [maven-release-plugin] prepare release maven-wrapper-0.2.1
     add 8ab08b8  [maven-release-plugin] prepare for next development iteration
     add eae4779  fixed version in changelog
     add 567fccc  formatting, added update via plugin
     add 2d87f1f  Print out maven wrapper version at every invocation
     add 83d12ec  added changelog entry, added Takari to output
     add e161356  Fix typo
     add 578496f  words are missing - I think this is what you mean...
     add a71bd82  cleaned up version output
     add 020545b  added verbose mode activated with MVNW_VERBOSE set to true
     add 19f375f  [maven-release-plugin] prepare release maven-wrapper-0.2.2
     add 67640d4  [maven-release-plugin] prepare for next development iteration
     add 179ee30  updated wrapper jar
     add 8fc916c  Fix NPE due to missing MVNW_VERBOSE
     add c60c49d  update info on wrapper
     add a0e1c2f  [maven-release-plugin] prepare release maven-wrapper-0.2.3
     add 8b57037  [maven-release-plugin] prepare for next development iteration
     add 8641c05  wrapper file upgrade
     add 4d3985c  set title of command window
     add 68e102a  respect MVNW_VERBOSE when printing diagnostic stuff
     add 18e3d3e  fix to actually read the environment variable value
     add d841301  set to new maven version
     add 6da17a7  added recent pr merges
     add 958418a  upped version
     add 3dea57b  [pom] Use empty relativePath
     add 0a7111f  [pom] Update junit to 4.12
     add 89e610d  [pom] Update mockito-core to 2.8.47
     add f5d20ba  [pom] Update commons-io to 2.5
     add a25a535  [pom] Update ant to 1.9.9
     add 635e53e  [pom] Update provision-maven-plugin to 0.1.50
     add 9e3ce6e  removed redundant empty element
     add de9d996  added warning about issues found from provisio upgrade
     add 638f527  much less verbose progress reporting since it is now a new line each
     add b05b99a  added chunk size change
     add a38c44e  added chunk size change
     add 190eb35  [maven-release-plugin] prepare release maven-wrapper-0.3.0
     add 91dcd24  [maven-release-plugin] prepare for next development iteration
     add 1a920c7  - Added an initial version of an auto-downloader for the maven-wrapper.jar
     add a3787b7  Cleaned up the code a little to not exit with 0 in case of an error.
     add d14aa05  - Made the script use curl or wget if available and fallback to java in case none of them are. - Moved the Java source code to the filesystem.
     add 5aa0e6f  - Added a download extension for windows
     add 50dcbb3  - Added Apache header to the downloader java class
     add 87f2983  - Changed the curl and wget detection to the "possix way" using "command"
     add a0dfc3e  - Changed the wget command to use "-O" instead of "--output-document="
     add 34c91b3  - Made the wrapperUrl configurable from the maven-wrapper.properties file   - Updated and tested the linux/unix/mac version of the script   - Updated and tested the Java downloader   - Updated the windows cmd (but not tested yet)
     add 661e471  Fixed the windows version of the script
     add e4986f6  Removed a hack to force the script to use curl or wget ...
     add 75698b0  Updated the download url to the https version
     add d7ddce2  Updated to the latest maven-wrapper version.
     add 7c3e488  updated to wrapper jar 0.3.0
     add ed6d2b4  updated version
     add fafe416  added user doc for no jar approach
     add 89b4de7  added author creds
     add 9a162b5  introduced intermediary var for path to jar since it didnt work without that in bash
     add 51e7e64  changed URL to official maven repo URL
     add f41375b  added note about URL change
     add e77b971  adapted to honor the MVNW_VERBOSE flag
     add 8f86510  dev and release help
     add d6d69f8  updated to new wrapper version in default URLs
     add f161035  added release date to changelog
     add d4a3342  [maven-release-plugin] prepare release maven-wrapper-0.4.0
     add e90950c  [maven-release-plugin] prepare for next development iteration
     add c4cc2d3  notes for next relase
     add c5d75a1  added link to fixed issue
     add 276169f  updated to latest parent
     add ebb8ba4  spelling fix
     add d5b4f7c  update to Maven 3.5.4 as default
     add e4556f5  ant and commons-io upgrades
     add 9a165c1  added changes
     add 7ee971e  updated static files to point to 0.4.1 release
     add 18069f7  [maven-release-plugin] prepare release maven-wrapper-0.4.1
     add 13d02a8  [maven-release-plugin] prepare for next development iteration
     add 2e9c45d  added wrapper version in cmd
     add 4976f68  updated to wrapper 0.4.2 in prep of new release
     add d1d9e3f  [maven-release-plugin] prepare release maven-wrapper-0.4.2
     add 736646b  [maven-release-plugin] prepare for next development iteration
     add 02423e8  Fixed typos
     add 42ca0a3  Removed todo comment
     add b9e6795  Download maven wrapper with authentication if availble
     add ed08eab  Download using authentication with properties
     add 8c37106  Update README.md
     add 46f52ba  Added macOS as name
     add 2643996  updated to Maven 3.6.0, also in plugin
     add 68042bb  On Windows, use TLS 1.2
     add f45eac2  fix compile path for cygwin
     add 60668e7  fix wrapper path for cygwin
     add 48a9ff3  added recently merged PRs
     add 0b08500  add info about using MAVEN_USER_HOME
     add 83f577c  Update referenced Maven version to 3.6.0
     add 12892d3  use quoted string for filepath
     add d395ca4  add basic auth support
     add 790be24  use MVNW_USER and MVNW_PASSWORD instead of system properties
     add e09456d  use warning instead of info
     add 002f677  remove unintended line
     add 618162a  added recent merged PRs
     add 95dcd2f  consistent usage of MVNW_USERNAME and MVWN_PASSWORD
     add 8c76743  version update to 0.5.0-SNAPSHOT for next release
     add e3ed336  License header cleanup (#105)
     add 5528ca7  added pr and issue links
     add fa8c70a  better instructions for dev and test
     add ac2b048  fixed test install command
     add 5bbacca  added debug flag for testing help
     add f81d067  add repo manager usage docs, dev doc updates
     add 67e12c5  usage of MVNW_REPOURL for wrapper download
     add 94964ce  MVN_REPOURL env var usage for Maven binary download
     add 9213ff2  updated everything to version 0.5.0
     add c89fe4f  [maven-release-plugin] prepare release maven-wrapper-0.5.0
     add 0e33a4f  [maven-release-plugin] prepare for next development iteration
     add 5f65c12  Windows note
     add 0fe726f  typo fix
     add d011e4d  MVNW_REPOURL parsing fix for mvnw.cmd (#107)
     add 3c84a93  style improvement
     add 7bb1083  prep for 0.5.1 release
     add a37120e  [maven-release-plugin] prepare release maven-wrapper-0.5.1
     add 1f08e11  [maven-release-plugin] prepare for next development iteration
     add b65c86d  On Windows, use TLS 1.2
     add 5f7d4ca  prep for 0.5.2 release
     add f15eb8b  [maven-release-plugin] prepare release maven-wrapper-0.5.2
     add 270c79f  [maven-release-plugin] prepare for next development iteration
     add af829f1  Add missing required space between 'true' and ']'
     add 5762f9d  usage of MVNW_REPOURL for wrapper download
     add 7d5f452  resolved
     add d27cdcc  title fix
     add fafaf24  [maven-release-plugin] prepare release maven-wrapper-0.5.3
     add 7686307  [maven-release-plugin] prepare for next development iteration
     add 193facc  Added version to default usage
     add 76c9c96  Adapt mvnw.cmd to also honour MVNW_VERBOSE
     add 90b355c  Added recent changes
     add c584815  Provide a 'standardized' way to retrieve CLI arguments
     add 49c5d41  Updated with recent changes
     add 26ff1f4  updated changelog and docs for dev to fix #78
     add a3977ad  prepped for 0.5.4 release
     add c733e0d  prepped for 0.5.4 release
     add 8272ee7  [maven-release-plugin] prepare release maven-wrapper-0.5.4
     add f8c5329  [maven-release-plugin] prepare for next development iteration
     add 12ca3ea  update to new release
     add 28d874a  removed wrong space in jar download URL
     add 2f7cfda  update to Maven 3.6.1
     add 067d997  update to default to Maven 3.6.1
     add ebc21d6  update for 0.5.5 release
     add e70acda  [maven-release-plugin] prepare release maven-wrapper-0.5.5
     add 9ef2ddb  [maven-release-plugin] prepare for next development iteration
     add b8790bb  update to latest release
     add d972c26  source format only
     add cccd8b0  more details about what happens for users
     add fb42fa9  Corrects the false Maven2 reference in the startup scripts (#121)
     add eeda12a  Remove trailing whitespace
     add f424d6f  Fix typo
     add ee6d5bd  Update to Maven 3.6.3
     add 49d28e3  Update for 0.5.6 release
     add b011766  [maven-release-plugin] prepare release maven-wrapper-0.5.6
     add d1935f2  [maven-release-plugin] prepare for next development iteration
     add 3730fb3  [MNG-5937] Fix licenses, removed unwanted root files
     add 738d99b  [MNG-5937] Split wrapper jar from assemblies Remove unused cli package Reformat code
     add 9cc3638  [MNG-5937] Optimize code for Java 8
     add cdcd351  [MNG-5937] Adjust JenkinsFile to pick up wrapper dists Improve assembly
     add 35e05e4  [MNG-6914] Align mvn and mvnw scripts
     add 14c9e15  [MNG-6819] Fix NullPointerException in StringVisitorModelInterpolator
     add be3c4eb  [MNG-6819] Refactor unit tests for ModelInterpolator
     add 8177d3d  [MNG-6819] Fix also NPE in StringSearchModelInterpolator
     add c6c7311  [MNG-6819] Undo unintended changes after rebase
     new af669d3  Removing code redundancy Using assertj, JUnit Jupiter
     new bba2bb8  Removed all DisplayName annotations from test classes and replaced with DisplayName generator.
     new ad88f7a  Using displayName in Interface.
     new 4218c0a  Added author.
     new d835922  WIP - Fixed code issue.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (b5c72b4)
            \
             N -- N -- N   refs/heads/MODELTESTS_IMPROVEMENT (d835922)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Jenkinsfile                                        |  21 +-
 README.md                                          |  14 +-
 apache-maven/maven-wrapper.pom                     | 139 ++++++++++
 apache-maven/pom.xml                               |  31 ++-
 .../src/{main/assembly => assembly/maven}/bin.xml  |   2 +-
 .../src/{ => assembly/maven}/bin/.gitattributes    |   0
 apache-maven/src/{ => assembly/maven}/bin/m2.conf  |   0
 apache-maven/src/{ => assembly/maven}/bin/mvnDebug |   0
 .../src/{ => assembly/maven}/bin/mvnDebug.cmd      |   0
 apache-maven/src/{ => assembly/maven}/bin/mvnyjp   |   0
 .../assembly => assembly/maven}/component.xml      |  42 ++-
 .../maven}/conf/logging/simplelogger.properties    |   0
 .../src/{ => assembly/maven}/conf/settings.xml     |   0
 .../src/{ => assembly/maven}/conf/toolchains.xml   |   0
 .../src/{main/assembly => assembly/maven}/dir.xml  |   2 +-
 .../src/{ => assembly/maven}/lib/ext/README.txt    |   0
 .../maven}/lib/jansi-native/README.txt             |   0
 .../src/{main/assembly => assembly/maven}/src.xml  |   0
 apache-maven/src/assembly/shared/init              | 128 +++++++++
 apache-maven/src/assembly/shared/init.cmd          |  97 +++++++
 apache-maven/src/assembly/shared/mvnlauncher       |   4 +
 apache-maven/src/assembly/shared/mvnlauncher.cmd   |   4 +
 apache-maven/src/assembly/shared/mvnvalidate       |  23 ++
 apache-maven/src/assembly/shared/mvnvalidate.cmd   |   8 +
 .../{bin/mvnDebug => assembly/shared/mvnwDebug}    |   4 +-
 .../mvnDebug.cmd => assembly/shared/mvnwDebug.cmd} |   2 +-
 apache-maven/src/assembly/shared/mvnwlauncher      |   4 +
 apache-maven/src/assembly/shared/mvnwlauncher.cmd  |   4 +
 apache-maven/src/assembly/shared/run               |  22 ++
 apache-maven/src/assembly/shared/run.cmd           |  29 +++
 .../src/{bin/mvnyjp => assembly/shared/validate}   |  42 ++-
 .../mvnDebug.cmd => assembly/shared/validate.cmd}  |  36 ++-
 apache-maven/src/assembly/wrapper/bin.xml          |  89 +++++++
 apache-maven/src/assembly/wrapper/script.xml       |  81 ++++++
 apache-maven/src/assembly/wrapper/script/download  |  55 ++++
 .../src/assembly/wrapper/script/download.cmd       |  36 +++
 .../shared/.mvn/wrapper/maven-wrapper.properties   |   8 +-
 apache-maven/src/assembly/wrapper/source.xml       |  89 +++++++
 .../.mvn/wrapper/MavenWrapperDownloader.java       | 131 ++++++++++
 apache-maven/src/assembly/wrapper/source/download  |  34 +++
 .../src/assembly/wrapper/source/download.cmd       |  21 ++
 apache-maven/src/bin/mvn                           | 199 --------------
 apache-maven/src/bin/mvn.cmd                       | 201 --------------
 .../apache/maven/settings/GlobalSettingsTest.java  |   2 +-
 maven-compat/pom.xml                               |   5 +
 maven-core/pom.xml                                 |   5 +
 .../main/java/org/apache/maven/ReactorReader.java  | 105 +++++++-
 .../org/apache/maven/execution/MavenSession.java   |   2 +-
 .../apache/maven/graph/DefaultGraphBuilder.java    | 135 +++++-----
 .../project/artifact/MavenMetadataSource.java      |   9 +-
 .../maven/graph/DefaultGraphBuilderTest.java       | 290 +++++++++++++++++++++
 .../apache/maven/project/PomConstructionTest.java  |   2 +-
 .../project-with-inheritance/pom.xml               |   2 +-
 .../project-with-inheritance/pom.xml               |   2 +-
 .../dependency-inheritance/pom.xml                 |   2 +-
 .../dependency-inheritance/sub/pom.xml             |   2 +-
 .../resources-project-builder/micromailer/pom.xml  |   2 +-
 .../resources/org/apache/maven/lifecycle/pom.xml   |   2 +-
 maven-embedder/pom.xml                             |   2 +-
 maven-embedder/src/examples/simple-project/pom.xml |   2 +-
 maven-model-builder/pom.xml                        |   5 -
 .../StringSearchModelInterpolator.java             |   4 +-
 .../StringVisitorModelInterpolator.java            |   2 +-
 .../resources/org/apache/maven/model/pom-4.0.0.xml |  10 +-
 .../AbstractModelInterpolatorTest.java             | 203 ++++++++-------
 .../StringSearchModelInterpolatorTest.java         |  89 ++++---
 .../StringVisitorModelInterpolatorTest.java        |  20 +-
 .../apache/maven/logwrapper/LogLevelRecorder.java  |  27 +-
 .../maven/logwrapper/LogLevelRecorderTest.java     |  21 +-
 {maven-slf4j-wrapper => maven-wrapper}/pom.xml     |  42 ++-
 .../apache/maven/wrapper/BootstrapMainStarter.java |  59 +++++
 .../apache/maven/wrapper/DefaultDownloader.java    | 192 ++++++++++++++
 .../java/org/apache/maven/wrapper/Downloader.java  |  52 ++++
 .../java/org/apache/maven/wrapper/Installer.java   | 226 ++++++++++++++++
 .../main/java/org/apache/maven/wrapper/Logger.java |  23 +-
 .../org/apache/maven/wrapper/MavenWrapperMain.java | 123 +++++++++
 .../org/apache/maven/wrapper/PathAssembler.java    | 131 ++++++++++
 .../apache/maven/wrapper/WrapperConfiguration.java | 116 +++++++++
 .../org/apache/maven/wrapper/WrapperExecutor.java  | 175 +++++++++++++
 .../org/apache/maven/wrapper/DownloaderTest.java   |  72 +++++
 .../org/apache/maven/wrapper/InstallerTest.java    | 210 +++++++++++++++
 .../apache/maven/wrapper/PathAssemblerTest.java    | 120 +++++++++
 .../apache/maven/wrapper/WrapperExecutorTest.java  | 207 +++++++++++++++
 .../org/apache/maven/wrapper/wrapper.properties    |   7 +-
 pom.xml                                            | 108 ++++----
 85 files changed, 3662 insertions(+), 755 deletions(-)
 create mode 100644 apache-maven/maven-wrapper.pom
 rename apache-maven/src/{main/assembly => assembly/maven}/bin.xml (93%)
 rename apache-maven/src/{ => assembly/maven}/bin/.gitattributes (100%)
 rename apache-maven/src/{ => assembly/maven}/bin/m2.conf (100%)
 copy apache-maven/src/{ => assembly/maven}/bin/mvnDebug (100%)
 mode change 100755 => 100644
 copy apache-maven/src/{ => assembly/maven}/bin/mvnDebug.cmd (100%)
 copy apache-maven/src/{ => assembly/maven}/bin/mvnyjp (100%)
 mode change 100755 => 100644
 rename apache-maven/src/{main/assembly => assembly/maven}/component.xml (70%)
 rename apache-maven/src/{ => assembly/maven}/conf/logging/simplelogger.properties (100%)
 rename apache-maven/src/{ => assembly/maven}/conf/settings.xml (100%)
 rename apache-maven/src/{ => assembly/maven}/conf/toolchains.xml (100%)
 rename apache-maven/src/{main/assembly => assembly/maven}/dir.xml (93%)
 rename apache-maven/src/{ => assembly/maven}/lib/ext/README.txt (100%)
 rename apache-maven/src/{ => assembly/maven}/lib/jansi-native/README.txt (100%)
 rename apache-maven/src/{main/assembly => assembly/maven}/src.xml (100%)
 create mode 100755 apache-maven/src/assembly/shared/init
 create mode 100755 apache-maven/src/assembly/shared/init.cmd
 create mode 100644 apache-maven/src/assembly/shared/mvnlauncher
 create mode 100644 apache-maven/src/assembly/shared/mvnlauncher.cmd
 create mode 100644 apache-maven/src/assembly/shared/mvnvalidate
 create mode 100644 apache-maven/src/assembly/shared/mvnvalidate.cmd
 rename apache-maven/src/{bin/mvnDebug => assembly/shared/mvnwDebug} (94%)
 mode change 100755 => 100644
 copy apache-maven/src/{bin/mvnDebug.cmd => assembly/shared/mvnwDebug.cmd} (98%)
 create mode 100755 apache-maven/src/assembly/shared/mvnwlauncher
 create mode 100755 apache-maven/src/assembly/shared/mvnwlauncher.cmd
 create mode 100755 apache-maven/src/assembly/shared/run
 create mode 100755 apache-maven/src/assembly/shared/run.cmd
 rename apache-maven/src/{bin/mvnyjp => assembly/shared/validate} (58%)
 mode change 100755 => 100644
 rename apache-maven/src/{bin/mvnDebug.cmd => assembly/shared/validate.cmd} (58%)
 create mode 100644 apache-maven/src/assembly/wrapper/bin.xml
 create mode 100644 apache-maven/src/assembly/wrapper/script.xml
 create mode 100755 apache-maven/src/assembly/wrapper/script/download
 create mode 100755 apache-maven/src/assembly/wrapper/script/download.cmd
 copy maven-core/src/test/resources/projects/build.properties => apache-maven/src/assembly/wrapper/shared/.mvn/wrapper/maven-wrapper.properties (73%)
 create mode 100644 apache-maven/src/assembly/wrapper/source.xml
 create mode 100644 apache-maven/src/assembly/wrapper/source/.mvn/wrapper/MavenWrapperDownloader.java
 create mode 100644 apache-maven/src/assembly/wrapper/source/download
 create mode 100644 apache-maven/src/assembly/wrapper/source/download.cmd
 delete mode 100755 apache-maven/src/bin/mvn
 delete mode 100644 apache-maven/src/bin/mvn.cmd
 create mode 100644 maven-core/src/test/java/org/apache/maven/graph/DefaultGraphBuilderTest.java
 copy maven-model/src/test/java/org/apache/maven/model/ActivationTest.java => maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringVisitorModelInterpolatorTest.java (71%)
 copy {maven-slf4j-wrapper => maven-wrapper}/pom.xml (57%)
 create mode 100644 maven-wrapper/src/main/java/org/apache/maven/wrapper/BootstrapMainStarter.java
 create mode 100644 maven-wrapper/src/main/java/org/apache/maven/wrapper/DefaultDownloader.java
 create mode 100644 maven-wrapper/src/main/java/org/apache/maven/wrapper/Downloader.java
 create mode 100644 maven-wrapper/src/main/java/org/apache/maven/wrapper/Installer.java
 copy maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivationException.java => maven-wrapper/src/main/java/org/apache/maven/wrapper/Logger.java (65%)
 create mode 100644 maven-wrapper/src/main/java/org/apache/maven/wrapper/MavenWrapperMain.java
 create mode 100644 maven-wrapper/src/main/java/org/apache/maven/wrapper/PathAssembler.java
 create mode 100644 maven-wrapper/src/main/java/org/apache/maven/wrapper/WrapperConfiguration.java
 create mode 100644 maven-wrapper/src/main/java/org/apache/maven/wrapper/WrapperExecutor.java
 create mode 100644 maven-wrapper/src/test/java/org/apache/maven/wrapper/DownloaderTest.java
 create mode 100644 maven-wrapper/src/test/java/org/apache/maven/wrapper/InstallerTest.java
 create mode 100644 maven-wrapper/src/test/java/org/apache/maven/wrapper/PathAssemblerTest.java
 create mode 100644 maven-wrapper/src/test/java/org/apache/maven/wrapper/WrapperExecutorTest.java
 copy maven-core/src/test/resources/projects/build.properties => maven-wrapper/src/test/resources/org/apache/maven/wrapper/wrapper.properties (83%)


[maven] 05/05: WIP - Fixed code issue.

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MODELTESTS_IMPROVEMENT
in repository https://gitbox.apache.org/repos/asf/maven.git

commit d835922a9d9028302653fe7d7328904f71779a44
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Sat Feb 29 13:34:12 2020 +0100

    WIP - Fixed code issue.
---
 .../org/apache/maven/model/ActivationFileTest.java     |  5 +++++
 .../java/org/apache/maven/model/ActivationOSTest.java  |  5 +++++
 .../org/apache/maven/model/ActivationPropertyTest.java |  5 +++++
 .../java/org/apache/maven/model/ActivationTest.java    |  5 +++++
 .../test/java/org/apache/maven/model/BuildTest.java    |  5 +++++
 .../java/org/apache/maven/model/CiManagementTest.java  |  5 +++++
 .../java/org/apache/maven/model/ContributorTest.java   |  5 +++++
 .../apache/maven/model/DependencyManagementTest.java   |  5 +++++
 .../java/org/apache/maven/model/DependencyTest.java    |  5 +++++
 .../apache/maven/model/DeploymentRepositoryTest.java   |  5 +++++
 .../java/org/apache/maven/model/DeveloperTest.java     |  5 +++++
 .../apache/maven/model/DistributionManagementTest.java |  5 +++++
 .../java/org/apache/maven/model/ExclusionTest.java     |  5 +++++
 .../java/org/apache/maven/model/ExtensionTest.java     |  5 +++++
 .../org/apache/maven/model/IssueManagementTest.java    |  5 +++++
 .../test/java/org/apache/maven/model/LicenseTest.java  |  5 +++++
 .../java/org/apache/maven/model/MailingListTest.java   |  5 +++++
 .../test/java/org/apache/maven/model/ModelTest.java    |  5 +++++
 .../org/apache/maven/model/ModelTestInterface.java     | 18 ++++++++----------
 .../test/java/org/apache/maven/model/NotifierTest.java |  5 +++++
 .../java/org/apache/maven/model/OrganizationTest.java  |  5 +++++
 .../test/java/org/apache/maven/model/ParentTest.java   |  5 +++++
 .../apache/maven/model/PluginConfigurationTest.java    |  5 +++++
 .../org/apache/maven/model/PluginContainerTest.java    |  5 +++++
 .../org/apache/maven/model/PluginExecutionTest.java    |  5 +++++
 .../org/apache/maven/model/PluginManagementTest.java   |  5 +++++
 .../test/java/org/apache/maven/model/PluginTest.java   |  5 +++++
 .../java/org/apache/maven/model/PrerequisitesTest.java |  5 +++++
 .../test/java/org/apache/maven/model/ProfileTest.java  |  5 +++++
 .../java/org/apache/maven/model/RelocationTest.java    |  5 +++++
 .../java/org/apache/maven/model/ReportPluginTest.java  |  5 +++++
 .../java/org/apache/maven/model/ReportSetTest.java     |  5 +++++
 .../java/org/apache/maven/model/ReportingTest.java     |  5 +++++
 .../org/apache/maven/model/RepositoryPolicyTest.java   |  5 +++++
 .../java/org/apache/maven/model/RepositoryTest.java    |  5 +++++
 .../test/java/org/apache/maven/model/ResourceTest.java |  5 +++++
 .../src/test/java/org/apache/maven/model/ScmTest.java  |  5 +++++
 .../src/test/java/org/apache/maven/model/SiteTest.java |  5 +++++
 38 files changed, 193 insertions(+), 10 deletions(-)

diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java
index d43d6cb..d420310 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java
@@ -26,5 +26,10 @@ package org.apache.maven.model;
  */
 class ActivationFileTest implements ModelTestInterface< ActivationFile >
 {
+    @Override
+    public Class<ActivationFile> createValue()
+    {
+        return ActivationFile.class;
+    }
 }
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java
index bc823a4..0dd5134 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class ActivationOSTest implements ModelTestInterface< ActivationOS >
 {
 
+    @Override
+    public Class<ActivationOS> createValue()
+    {
+        return ActivationOS.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java
index 4d618c7..84d7e04 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java
@@ -26,5 +26,10 @@ package org.apache.maven.model;
  */
 class ActivationPropertyTest implements ModelTestInterface< ActivationProperty >
 {
+    @Override
+    public Class<ActivationProperty> createValue()
+    {
+        return ActivationProperty.class;
+    }
 }
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java
index b22fc38..09163c7 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java
@@ -26,5 +26,10 @@ package org.apache.maven.model;
  */
 class ActivationTest implements ModelTestInterface< Activation >
 {
+    @Override
+    public Class<Activation> createValue()
+    {
+        return Activation.class;
+    }
 }
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/BuildTest.java b/maven-model/src/test/java/org/apache/maven/model/BuildTest.java
index 825db03..811f099 100644
--- a/maven-model/src/test/java/org/apache/maven/model/BuildTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/BuildTest.java
@@ -26,5 +26,10 @@ package org.apache.maven.model;
  */
 class BuildTest implements ModelTestInterface< Build >
 {
+    @Override
+    public Class<Build> createValue()
+    {
+        return Build.class;
+    }
 }
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java
index 1b32bb3..3a295fb 100644
--- a/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java
@@ -26,5 +26,10 @@ package org.apache.maven.model;
  */
 class CiManagementTest implements ModelTestInterface< CiManagement >
 {
+    @Override
+    public Class<CiManagement> createValue()
+    {
+        return CiManagement.class;
+    }
 }
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java b/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java
index 249eb9b..ece716b 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java
@@ -26,4 +26,9 @@ package org.apache.maven.model;
  */
 class ContributorTest implements ModelTestInterface< Contributor >
 {
+    @Override
+    public Class<Contributor> createValue()
+    {
+        return Contributor.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java
index 3961c9a..c172cb2 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class DependencyManagementTest implements ModelTestInterface< DependencyManagement >
 {
 
+    @Override
+    public Class<DependencyManagement> createValue()
+    {
+        return DependencyManagement.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java b/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java
index 29ae942..dac3d7e 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class DependencyTest implements ModelTestInterface< Dependency >
 {
 
+    @Override
+    public Class<Dependency> createValue()
+    {
+        return Dependency.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java b/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java
index 2e5d287..c3664e8 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class DeploymentRepositoryTest implements ModelTestInterface< DeploymentRepository >
 {
 
+    @Override
+    public Class<DeploymentRepository> createValue()
+    {
+        return DeploymentRepository.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java b/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java
index 4886f93..746ed84 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class DeveloperTest implements ModelTestInterface< Developer >
 {
 
+    @Override
+    public Class<Developer> createValue()
+    {
+        return Developer.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java
index df53365..9cc4288 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class DistributionManagementTest implements ModelTestInterface< DistributionManagement >
 {
 
+    @Override
+    public Class<DistributionManagement> createValue()
+    {
+        return DistributionManagement.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java b/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java
index df10ef7..c9abf4b 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class ExclusionTest implements ModelTestInterface< Exclusion >
 {
 
+    @Override
+    public Class<Exclusion> createValue()
+    {
+        return Exclusion.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java b/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java
index 564c7fc..f0a9c39 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class ExtensionTest implements ModelTestInterface< Extension >
 {
 
+    @Override
+    public Class<Extension> createValue()
+    {
+        return Extension.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java
index 29741b5..2c56880 100644
--- a/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class IssueManagementTest implements ModelTestInterface< IssueManagement >
 {
 
+    @Override
+    public Class<IssueManagement> createValue()
+    {
+        return IssueManagement.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java b/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java
index d12c16c..98b24da 100644
--- a/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class LicenseTest implements ModelTestInterface< License >
 {
 
+    @Override
+    public Class<License> createValue()
+    {
+        return License.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java b/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java
index 5050037..d385287 100644
--- a/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class MailingListTest implements ModelTestInterface< MailingList >
 {
 
+    @Override
+    public Class<MailingList> createValue()
+    {
+        return MailingList.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ModelTest.java b/maven-model/src/test/java/org/apache/maven/model/ModelTest.java
index ee14a01..01f8696 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ModelTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ModelTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class ModelTest implements ModelTestInterface< Model >
 {
 
+    @Override
+    public Class<Model> createValue()
+    {
+        return Model.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java b/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
index f4774b3..75828ed 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
@@ -35,32 +35,30 @@ import static org.assertj.core.api.Assertions.assertThatCode;
 @DisplayNameGeneration( ModelTestInterface.NameGenerator.class )
 interface ModelTestInterface< T >
 {
-    @SuppressWarnings( "unchecked" )
-    default T createNewInstance(Class< ? > x) throws ReflectiveOperationException
-    {
-        return ( T ) x.getDeclaredConstructor().newInstance();
-    }
+
+    Class<T> createValue();
 
     @Test
     @DisplayName( "hashCode should not fail with null." )
     default void hashCodeNullSafe()
     {
-        assertThatCode( () -> createNewInstance( this.getClass() ).hashCode() ).doesNotThrowAnyException();
+        assertThatCode( () -> createValue().hashCode() ).doesNotThrowAnyException();
     }
 
     @Test
     @DisplayName( "equals should not fail with null." )
     default void equalsNullSafe() throws ReflectiveOperationException
     {
-        assertThat( createNewInstance( this.getClass() ).equals( null ) ).isFalse();
+        T newInstance = createValue().newInstance();
+        assertThat( newInstance.equals( null ) ).isFalse();
     }
 
     @Test
     @DisplayName( "equals should result in false for two different instances." )
     default void equalsSameToBeFalse() throws ReflectiveOperationException
     {
-        T firstInstance = createNewInstance( this.getClass() );
-        T secondInstance = createNewInstance( this.getClass() );
+        T firstInstance = createValue().newInstance();
+        T secondInstance = createValue().newInstance();
         assertThat( firstInstance.equals( secondInstance ) ).isFalse();
     }
 
@@ -68,7 +66,7 @@ interface ModelTestInterface< T >
     @DisplayName( "toString should not be null." )
     default void toStringNullSafe() throws ReflectiveOperationException
     {
-        assertThat( createNewInstance( this.getClass() ).toString() ).isNotNull();
+        assertThat( createValue().newInstance().toString() ).isNotNull();
     }
 
     /**
diff --git a/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java b/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java
index 8081fba..48605cc 100644
--- a/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java
@@ -26,4 +26,9 @@ package org.apache.maven.model;
  */
 class NotifierTest implements ModelTestInterface< Notifier >
 {
+    @Override
+    public Class<Notifier> createValue()
+    {
+        return Notifier.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java b/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java
index 6394a9b..b5f694e 100644
--- a/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java
@@ -26,4 +26,9 @@ package org.apache.maven.model;
  */
 class OrganizationTest implements ModelTestInterface< Organization >
 {
+    @Override
+    public Class<Organization> createValue()
+    {
+        return Organization.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ParentTest.java b/maven-model/src/test/java/org/apache/maven/model/ParentTest.java
index cc7451c..605c55c 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ParentTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ParentTest.java
@@ -26,4 +26,9 @@ package org.apache.maven.model;
  */
 class ParentTest implements ModelTestInterface< Parent >
 {
+    @Override
+    public Class<Parent> createValue()
+    {
+        return Parent.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java
index b36b409..5b92db9 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class PluginConfigurationTest implements ModelTestInterface< PluginConfiguration >
 {
 
+    @Override
+    public Class<PluginConfiguration> createValue()
+    {
+        return PluginConfiguration.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java
index b212c3d..ccda9dc 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class PluginContainerTest implements ModelTestInterface< PluginContainer >
 {
 
+    @Override
+    public Class<PluginContainer> createValue()
+    {
+        return PluginContainer.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java
index 280b9ee..8a48528 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class PluginExecutionTest implements ModelTestInterface< PluginExecution >
 {
 
+    @Override
+    public Class<PluginExecution> createValue()
+    {
+        return PluginExecution.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java
index e230536..f5e459b 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java
@@ -26,4 +26,9 @@ package org.apache.maven.model;
  */
 class PluginManagementTest implements ModelTestInterface< PluginManagement >
 {
+    @Override
+    public Class<PluginManagement> createValue()
+    {
+        return PluginManagement.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginTest.java
index 6ed3497..5169d67 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginTest.java
@@ -26,4 +26,9 @@ package org.apache.maven.model;
  */
 class PluginTest implements ModelTestInterface< Plugin >
 {
+    @Override
+    public Class<Plugin> createValue()
+    {
+        return Plugin.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java b/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java
index 2fc9f2f..bdd853f 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java
@@ -26,4 +26,9 @@ package org.apache.maven.model;
  */
 class PrerequisitesTest implements ModelTestInterface< Prerequisites >
 {
+    @Override
+    public Class<Prerequisites> createValue()
+    {
+        return Prerequisites.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java b/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java
index 0167304..4fde5b7 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class ProfileTest implements ModelTestInterface< Profile >
 {
 
+    @Override
+    public Class<Profile> createValue()
+    {
+        return Profile.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java b/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java
index 450fd83..93cef72 100644
--- a/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java
@@ -26,4 +26,9 @@ package org.apache.maven.model;
  */
 class RelocationTest implements ModelTestInterface< Relocation >
 {
+    @Override
+    public Class<Relocation> createValue()
+    {
+        return Relocation.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java b/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java
index 2c29149..0c1ff95 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java
@@ -26,4 +26,9 @@ package org.apache.maven.model;
  */
 class ReportPluginTest implements ModelTestInterface< ReportPlugin >
 {
+    @Override
+    public Class<ReportPlugin> createValue()
+    {
+        return ReportPlugin.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java b/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java
index 1d46cd3..52da631 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class ReportSetTest implements ModelTestInterface< ReportSet >
 {
 
+    @Override
+    public Class<ReportSet> createValue()
+    {
+        return ReportSet.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java b/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java
index 357855a..4940c80 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java
@@ -26,4 +26,9 @@ package org.apache.maven.model;
  */
 class ReportingTest implements ModelTestInterface< Reporting >
 {
+    @Override
+    public Class<Reporting> createValue()
+    {
+        return Reporting.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java b/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java
index 479c621..5b13ee0 100644
--- a/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java
@@ -27,4 +27,9 @@ package org.apache.maven.model;
 class RepositoryPolicyTest implements ModelTestInterface< RepositoryPolicy >
 {
 
+    @Override
+    public Class<RepositoryPolicy> createValue()
+    {
+        return RepositoryPolicy.class;
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java b/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java
index 319043a..9a52d92 100644
--- a/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java
@@ -26,5 +26,10 @@ package org.apache.maven.model;
  */
 class RepositoryTest implements ModelTestInterface< Repository >
 {
+    @Override
+    public Class<Repository> createValue()
+    {
+        return Repository.class;
+    }
 }
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java b/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java
index 30083f9..99921db 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java
@@ -26,5 +26,10 @@ package org.apache.maven.model;
  */
 class ResourceTest implements ModelTestInterface< Resource >
 {
+    @Override
+    public Class<Resource> createValue()
+    {
+        return Resource.class;
+    }
 }
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/ScmTest.java b/maven-model/src/test/java/org/apache/maven/model/ScmTest.java
index 4bedb7e..331e21f 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ScmTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ScmTest.java
@@ -27,6 +27,11 @@ package org.apache.maven.model;
 class ScmTest implements ModelTestInterface< Scm >
 {
 
+    @Override
+    public Class<Scm> createValue()
+    {
+        return Scm.class;
+    }
 }
 
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/SiteTest.java b/maven-model/src/test/java/org/apache/maven/model/SiteTest.java
index 6537547..8a4a23a 100644
--- a/maven-model/src/test/java/org/apache/maven/model/SiteTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/SiteTest.java
@@ -26,4 +26,9 @@ package org.apache.maven.model;
  */
 class SiteTest implements ModelTestInterface< Site >
 {
+    @Override
+    public Class<Site> createValue()
+    {
+        return Site.class;
+    }
 }


[maven] 02/05: Removed all DisplayName annotations from test classes and replaced with DisplayName generator.

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MODELTESTS_IMPROVEMENT
in repository https://gitbox.apache.org/repos/asf/maven.git

commit bba2bb8645eb8cf3948ec938584aa8a7b07903c6
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Mon Dec 9 20:33:58 2019 +0100

    Removed all DisplayName annotations from test classes and
    replaced with DisplayName generator.
---
 .../org/apache/maven/model/ActivationFileTest.java   |  3 ---
 .../org/apache/maven/model/ActivationOSTest.java     |  3 ---
 .../apache/maven/model/ActivationPropertyTest.java   |  3 ---
 .../java/org/apache/maven/model/ActivationTest.java  |  3 ---
 .../test/java/org/apache/maven/model/BuildTest.java  |  3 ---
 .../org/apache/maven/model/CiManagementTest.java     |  3 ---
 .../java/org/apache/maven/model/ContributorTest.java |  3 ---
 .../apache/maven/model/DependencyManagementTest.java |  3 ---
 .../java/org/apache/maven/model/DependencyTest.java  |  3 ---
 .../apache/maven/model/DeploymentRepositoryTest.java |  3 ---
 .../java/org/apache/maven/model/DeveloperTest.java   |  3 ---
 .../maven/model/DistributionManagementTest.java      |  3 ---
 .../java/org/apache/maven/model/ExclusionTest.java   |  3 ---
 .../java/org/apache/maven/model/ExtensionTest.java   |  3 ---
 .../org/apache/maven/model/IssueManagementTest.java  |  3 ---
 .../java/org/apache/maven/model/LicenseTest.java     |  3 ---
 .../java/org/apache/maven/model/MailingListTest.java |  3 ---
 .../test/java/org/apache/maven/model/ModelTest.java  |  3 ---
 .../org/apache/maven/model/ModelTestInterface.java   | 20 +++++++++++++++-----
 .../java/org/apache/maven/model/NotifierTest.java    |  3 ---
 .../org/apache/maven/model/OrganizationTest.java     |  3 ---
 .../test/java/org/apache/maven/model/ParentTest.java |  3 ---
 .../apache/maven/model/PluginConfigurationTest.java  |  3 ---
 .../org/apache/maven/model/PluginContainerTest.java  |  3 ---
 .../org/apache/maven/model/PluginExecutionTest.java  |  3 ---
 .../org/apache/maven/model/PluginManagementTest.java |  3 ---
 .../test/java/org/apache/maven/model/PluginTest.java |  3 ---
 .../org/apache/maven/model/PrerequisitesTest.java    |  3 ---
 .../java/org/apache/maven/model/ProfileTest.java     |  3 ---
 .../java/org/apache/maven/model/RelocationTest.java  |  3 ---
 .../org/apache/maven/model/ReportPluginTest.java     |  3 ---
 .../java/org/apache/maven/model/ReportSetTest.java   |  3 ---
 .../java/org/apache/maven/model/ReportingTest.java   |  3 ---
 .../org/apache/maven/model/RepositoryPolicyTest.java |  3 ---
 .../java/org/apache/maven/model/RepositoryTest.java  |  3 ---
 .../java/org/apache/maven/model/ResourceTest.java    |  3 ---
 .../test/java/org/apache/maven/model/ScmTest.java    |  3 ---
 .../test/java/org/apache/maven/model/SiteTest.java   |  3 ---
 38 files changed, 15 insertions(+), 116 deletions(-)

diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java
index d86651d..d43d6cb 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code ActivationFile}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "ActivationFile" )
 class ActivationFileTest implements ModelTestInterface< ActivationFile >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java
index 5820aed..bc823a4 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code ActivationOS}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "ActivationOS" )
 class ActivationOSTest implements ModelTestInterface< ActivationOS >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java
index 1727d29..4d618c7 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code ActivationProperty}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "ActivationProperty" )
 class ActivationPropertyTest implements ModelTestInterface< ActivationProperty >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java
index 34d82e1..b22fc38 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Activation}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Activation" )
 class ActivationTest implements ModelTestInterface< Activation >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/BuildTest.java b/maven-model/src/test/java/org/apache/maven/model/BuildTest.java
index e1488ad..825db03 100644
--- a/maven-model/src/test/java/org/apache/maven/model/BuildTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/BuildTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Build}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Build" )
 class BuildTest implements ModelTestInterface< Build >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java
index 5dacbfd..1b32bb3 100644
--- a/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code CiManagement}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "CiManagement" )
 class CiManagementTest implements ModelTestInterface< CiManagement >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java b/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java
index 3853cd1..249eb9b 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Contributor}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Contributore" )
 class ContributorTest implements ModelTestInterface< Contributor >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java
index d4fd03a..3961c9a 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code DependencyManagement}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "DependencyManagement" )
 class DependencyManagementTest implements ModelTestInterface< DependencyManagement >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java b/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java
index 9438b97..29ae942 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Dependency}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Dependency" )
 class DependencyTest implements ModelTestInterface< Dependency >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java b/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java
index d598f6d..2e5d287 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code DeploymentRepository}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "DeploymentRepository" )
 class DeploymentRepositoryTest implements ModelTestInterface< DeploymentRepository >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java b/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java
index daa0e68..4886f93 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Developer}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Developer" )
 class DeveloperTest implements ModelTestInterface< Developer >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java
index c514ca0..df53365 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code DistributionManagement}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "DistributionManagement" )
 class DistributionManagementTest implements ModelTestInterface< DistributionManagement >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java b/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java
index 7595866..df10ef7 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Exclusion}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Exclusion" )
 class ExclusionTest implements ModelTestInterface< Exclusion >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java b/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java
index ed39bb5..564c7fc 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Extension}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Extension" )
 class ExtensionTest implements ModelTestInterface< Extension >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java
index bdd0b9f..29741b5 100644
--- a/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code IssueManagement}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "IssueManagement" )
 class IssueManagementTest implements ModelTestInterface< IssueManagement >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java b/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java
index 5fef64a..d12c16c 100644
--- a/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code License}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "License" )
 class LicenseTest implements ModelTestInterface< License >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java b/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java
index b2f3ebe..5050037 100644
--- a/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code MailingList}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "MailingList" )
 class MailingListTest implements ModelTestInterface< MailingList >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/ModelTest.java b/maven-model/src/test/java/org/apache/maven/model/ModelTest.java
index 2a16ba5..ee14a01 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ModelTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ModelTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Model}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Model" )
 class ModelTest implements ModelTestInterface< Model >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java b/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
index d8108de..a69566b 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
@@ -19,12 +19,14 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.DisplayNameGeneration;
+import org.junit.jupiter.api.DisplayNameGenerator;
 import org.junit.jupiter.api.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatCode;
 
+@DisplayNameGeneration( ModelTestInterface.NameGenerator.class )
 interface ModelTestInterface< T >
 {
     @SuppressWarnings( "unchecked" )
@@ -34,21 +36,18 @@ interface ModelTestInterface< T >
     }
 
     @Test
-    @DisplayName( "hashCode should not fail with null." )
     default void hashCodeNullSafe()
     {
         assertThatCode( () -> createNewInstance( this.getClass() ).hashCode() ).doesNotThrowAnyException();
     }
 
     @Test
-    @DisplayName( "equals should not fail with null." )
     default void equalsNullSafe() throws ReflectiveOperationException
     {
         assertThat( createNewInstance( this.getClass() ).equals( null ) ).isFalse();
     }
 
     @Test
-    @DisplayName( "equals should result in false for two different instances." )
     default void equalsSameToBeFalse() throws ReflectiveOperationException
     {
         T firstInstance = createNewInstance( this.getClass() );
@@ -57,9 +56,20 @@ interface ModelTestInterface< T >
     }
 
     @Test
-    @DisplayName( "toString should not be null." )
     default void toStringNullSafe() throws ReflectiveOperationException
     {
         assertThat( createNewInstance( this.getClass() ).toString() ).isNotNull();
     }
+
+    /**
+     * The @DisplayName will be the test class name without the trailing "Test".
+     */
+    class NameGenerator extends DisplayNameGenerator.Standard
+    {
+        public String generateDisplayNameForClass( Class<?> testClass )
+        {
+            String name = testClass.getSimpleName();
+            return name.substring(0, name.length() - 4);
+        }
+    }
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java b/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java
index ab4defb..8081fba 100644
--- a/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Notifier}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Notifier" )
 class NotifierTest implements ModelTestInterface< Notifier >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java b/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java
index ef5eb4f..6394a9b 100644
--- a/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Organization}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Organization" )
 class OrganizationTest implements ModelTestInterface< Organization >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ParentTest.java b/maven-model/src/test/java/org/apache/maven/model/ParentTest.java
index 3419438..cc7451c 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ParentTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ParentTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Parent}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Parent" )
 class ParentTest implements ModelTestInterface< Parent >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java
index 39642ba..b36b409 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code PluginConfiguration}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "PluginConfiguration" )
 class PluginConfigurationTest implements ModelTestInterface< PluginConfiguration >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java
index 9aab597..b212c3d 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code PluginContainer}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "PluginContainer" )
 class PluginContainerTest implements ModelTestInterface< PluginContainer >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java
index 8bd1241..280b9ee 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code PluginExecution}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "PluginExecution" )
 class PluginExecutionTest implements ModelTestInterface< PluginExecution >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java
index d53450a..e230536 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code PluginManagement}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "PluginManagement" )
 class PluginManagementTest implements ModelTestInterface< PluginManagement >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginTest.java
index f75a9f1..6ed3497 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Plugin}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Plugin" )
 class PluginTest implements ModelTestInterface< Plugin >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java b/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java
index c3b3150..2fc9f2f 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Prerequisites}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Prerequisites" )
 class PrerequisitesTest implements ModelTestInterface< Prerequisites >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java b/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java
index 921fca3..0167304 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Profile}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Profile" )
 class ProfileTest implements ModelTestInterface< Profile >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java b/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java
index 92dd309..450fd83 100644
--- a/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Relocation}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Relocation" )
 class RelocationTest implements ModelTestInterface< Relocation >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java b/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java
index 15c6586..2c29149 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code ReportPlugin}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "ReportPlugin" )
 class ReportPluginTest implements ModelTestInterface< ReportPlugin >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java b/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java
index 864c9c9..1d46cd3 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code ReportSet}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "ReportSet" )
 class ReportSetTest implements ModelTestInterface< ReportSet >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java b/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java
index 063b1e5..357855a 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Reporting}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Reporting" )
 class ReportingTest implements ModelTestInterface< Reporting >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java b/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java
index 71c2b71..479c621 100644
--- a/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code RepositoryPolicy}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "RepositoryPolicy" )
 class RepositoryPolicyTest implements ModelTestInterface< RepositoryPolicy >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java b/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java
index 713fa4a..319043a 100644
--- a/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Repository}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Repository" )
 class RepositoryTest implements ModelTestInterface< Repository >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java b/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java
index d09a3c6..30083f9 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Resource}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Resource" )
 class ResourceTest implements ModelTestInterface< Resource >
 {
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ScmTest.java b/maven-model/src/test/java/org/apache/maven/model/ScmTest.java
index b244fb5..4bedb7e 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ScmTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ScmTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Scm}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Scm" )
 class ScmTest implements ModelTestInterface< Scm >
 {
 
diff --git a/maven-model/src/test/java/org/apache/maven/model/SiteTest.java b/maven-model/src/test/java/org/apache/maven/model/SiteTest.java
index 1d96718..6537547 100644
--- a/maven-model/src/test/java/org/apache/maven/model/SiteTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/SiteTest.java
@@ -19,14 +19,11 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import org.junit.jupiter.api.DisplayName;
-
 /**
  * Tests {@code Site}.
  *
  * @author Benjamin Bentmann
  */
-@DisplayName( "Site" )
 class SiteTest implements ModelTestInterface< Site >
 {
 }


[maven] 03/05: Using displayName in Interface.

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MODELTESTS_IMPROVEMENT
in repository https://gitbox.apache.org/repos/asf/maven.git

commit ad88f7ac22aabc2d95e06a3634fb38391d36b7ed
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Mon Dec 9 20:42:00 2019 +0100

    Using displayName in Interface.
---
 .../src/test/java/org/apache/maven/model/ModelTestInterface.java     | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java b/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
index a69566b..b51bc3e 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
@@ -19,6 +19,7 @@ package org.apache.maven.model;
  * under the License.
  */
 
+import org.junit.jupiter.api.DisplayName;
 import org.junit.jupiter.api.DisplayNameGeneration;
 import org.junit.jupiter.api.DisplayNameGenerator;
 import org.junit.jupiter.api.Test;
@@ -36,18 +37,21 @@ interface ModelTestInterface< T >
     }
 
     @Test
+    @DisplayName( "hashCode should not fail with null." )
     default void hashCodeNullSafe()
     {
         assertThatCode( () -> createNewInstance( this.getClass() ).hashCode() ).doesNotThrowAnyException();
     }
 
     @Test
+    @DisplayName( "equals should not fail with null." )
     default void equalsNullSafe() throws ReflectiveOperationException
     {
         assertThat( createNewInstance( this.getClass() ).equals( null ) ).isFalse();
     }
 
     @Test
+    @DisplayName( "equals should result in false for two different instances." )
     default void equalsSameToBeFalse() throws ReflectiveOperationException
     {
         T firstInstance = createNewInstance( this.getClass() );
@@ -56,6 +60,7 @@ interface ModelTestInterface< T >
     }
 
     @Test
+    @DisplayName( "toString should not be null." )
     default void toStringNullSafe() throws ReflectiveOperationException
     {
         assertThat( createNewInstance( this.getClass() ).toString() ).isNotNull();


[maven] 01/05: Removing code redundancy Using assertj, JUnit Jupiter

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MODELTESTS_IMPROVEMENT
in repository https://gitbox.apache.org/repos/asf/maven.git

commit af669d3873618416ed209dc5dbcad0762b94f8e7
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Fri Nov 29 00:25:33 2019 +0100

    Removing code redundancy
    Using assertj, JUnit Jupiter
---
 maven-artifact/pom.xml                             |  5 ++
 maven-model/pom.xml                                | 22 +++++++-
 .../org/apache/maven/model/ActivationFileTest.java | 31 ++---------
 .../org/apache/maven/model/ActivationOSTest.java   | 29 +---------
 .../apache/maven/model/ActivationPropertyTest.java | 31 ++---------
 .../org/apache/maven/model/ActivationTest.java     | 31 ++---------
 .../java/org/apache/maven/model/BuildTest.java     | 31 ++---------
 .../org/apache/maven/model/CiManagementTest.java   | 31 ++---------
 .../org/apache/maven/model/ContributorTest.java    | 30 +---------
 .../maven/model/DependencyManagementTest.java      | 29 +---------
 .../org/apache/maven/model/DependencyTest.java     | 29 +---------
 .../maven/model/DeploymentRepositoryTest.java      | 29 +---------
 .../java/org/apache/maven/model/DeveloperTest.java | 29 +---------
 .../maven/model/DistributionManagementTest.java    | 29 +---------
 .../java/org/apache/maven/model/ExclusionTest.java | 29 +---------
 .../java/org/apache/maven/model/ExtensionTest.java | 29 +---------
 .../apache/maven/model/IssueManagementTest.java    | 29 +---------
 .../java/org/apache/maven/model/LicenseTest.java   | 29 +---------
 .../org/apache/maven/model/MailingListTest.java    | 29 +---------
 .../java/org/apache/maven/model/ModelTest.java     | 29 +---------
 .../org/apache/maven/model/ModelTestInterface.java | 65 ++++++++++++++++++++++
 .../java/org/apache/maven/model/NotifierTest.java  | 30 +---------
 .../org/apache/maven/model/OrganizationTest.java   | 30 +---------
 .../java/org/apache/maven/model/ParentTest.java    | 30 +---------
 .../maven/model/PluginConfigurationTest.java       | 29 +---------
 .../apache/maven/model/PluginContainerTest.java    | 29 +---------
 .../apache/maven/model/PluginExecutionTest.java    | 29 +---------
 .../apache/maven/model/PluginManagementTest.java   | 30 +---------
 .../java/org/apache/maven/model/PluginTest.java    | 30 +---------
 .../org/apache/maven/model/PrerequisitesTest.java  | 30 +---------
 .../java/org/apache/maven/model/ProfileTest.java   | 29 +---------
 .../org/apache/maven/model/RelocationTest.java     | 30 +---------
 .../org/apache/maven/model/ReportPluginTest.java   | 30 +---------
 .../java/org/apache/maven/model/ReportSetTest.java | 29 +---------
 .../java/org/apache/maven/model/ReportingTest.java | 30 +---------
 .../apache/maven/model/RepositoryPolicyTest.java   | 29 +---------
 .../org/apache/maven/model/RepositoryTest.java     | 31 ++---------
 .../java/org/apache/maven/model/ResourceTest.java  | 31 ++---------
 .../test/java/org/apache/maven/model/ScmTest.java  | 29 ++--------
 .../test/java/org/apache/maven/model/SiteTest.java | 30 +---------
 pom.xml                                            | 13 +++++
 41 files changed, 223 insertions(+), 980 deletions(-)

diff --git a/maven-artifact/pom.xml b/maven-artifact/pom.xml
index 336505b..5e7b339 100644
--- a/maven-artifact/pom.xml
+++ b/maven-artifact/pom.xml
@@ -41,6 +41,11 @@ under the License.
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.assertj</groupId>
+      <artifactId>assertj-core</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
diff --git a/maven-model/pom.xml b/maven-model/pom.xml
index 023855e..22918fc 100644
--- a/maven-model/pom.xml
+++ b/maven-model/pom.xml
@@ -19,7 +19,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
@@ -47,11 +48,30 @@ under the License.
       <artifactId>hamcrest-core</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.assertj</groupId>
+      <artifactId>assertj-core</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
     <plugins>
       <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <compilerArgs>
+            <arg>-Xlint:deprecation</arg>
+            <arg>-Xlint:unchecked</arg>
+          </compilerArgs>
+        </configuration>
+      </plugin>
+      <plugin>
         <groupId>org.codehaus.modello</groupId>
         <artifactId>modello-maven-plugin</artifactId>
         <configuration>
diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java
index f88da58..d86651d 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ActivationFileTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code ActivationFile}.
  *
  * @author Benjamin Bentmann
  */
-public class ActivationFileTest
-    extends TestCase
+@DisplayName( "ActivationFile" )
+class ActivationFileTest implements ModelTestInterface< ActivationFile >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new ActivationFile().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new ActivationFile().equals( null ) );
-
-        new ActivationFile().equals( new ActivationFile() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        ActivationFile thing = new ActivationFile();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new ActivationFile().toString() );
-    }
-
 }
+
diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java
index f0d3045..5820aed 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ActivationOSTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code ActivationOS}.
  *
  * @author Benjamin Bentmann
  */
-public class ActivationOSTest
-    extends TestCase
+@DisplayName( "ActivationOS" )
+class ActivationOSTest implements ModelTestInterface< ActivationOS >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new ActivationOS().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new ActivationOS().equals( null ) );
-
-        new ActivationOS().equals( new ActivationOS() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        ActivationOS thing = new ActivationOS();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new ActivationOS().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java
index 5f5e048..1727d29 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code ActivationProperty}.
  *
  * @author Benjamin Bentmann
  */
-public class ActivationPropertyTest
-    extends TestCase
+@DisplayName( "ActivationProperty" )
+class ActivationPropertyTest implements ModelTestInterface< ActivationProperty >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new ActivationProperty().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new ActivationProperty().equals( null ) );
-
-        new ActivationProperty().equals( new ActivationProperty() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        ActivationProperty thing = new ActivationProperty();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new ActivationProperty().toString() );
-    }
-
 }
+
diff --git a/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java b/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java
index f6d0f91..34d82e1 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ActivationTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Activation}.
  *
  * @author Benjamin Bentmann
  */
-public class ActivationTest
-    extends TestCase
+@DisplayName( "Activation" )
+class ActivationTest implements ModelTestInterface< Activation >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Activation().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Activation().equals( null ) );
-
-        new Activation().equals( new Activation() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Activation thing = new Activation();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Activation().toString() );
-    }
-
 }
+
diff --git a/maven-model/src/test/java/org/apache/maven/model/BuildTest.java b/maven-model/src/test/java/org/apache/maven/model/BuildTest.java
index 80a60d5..e1488ad 100644
--- a/maven-model/src/test/java/org/apache/maven/model/BuildTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/BuildTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Build}.
  *
  * @author Benjamin Bentmann
  */
-public class BuildTest
-    extends TestCase
+@DisplayName( "Build" )
+class BuildTest implements ModelTestInterface< Build >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Build().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Build().equals( null ) );
-
-        new Build().equals( new Build() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Build thing = new Build();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Build().toString() );
-    }
-
 }
+
diff --git a/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java
index 7194c84..5dacbfd 100644
--- a/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/CiManagementTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code CiManagement}.
  *
  * @author Benjamin Bentmann
  */
-public class CiManagementTest
-    extends TestCase
+@DisplayName( "CiManagement" )
+class CiManagementTest implements ModelTestInterface< CiManagement >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new CiManagement().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new CiManagement().equals( null ) );
-
-        new CiManagement().equals( new CiManagement() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        CiManagement thing = new CiManagement();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new CiManagement().toString() );
-    }
-
 }
+
diff --git a/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java b/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java
index 491b99a..3853cd1 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ContributorTest.java
@@ -19,38 +19,14 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Contributor}.
  *
  * @author Benjamin Bentmann
  */
-public class ContributorTest
-    extends TestCase
+@DisplayName( "Contributore" )
+class ContributorTest implements ModelTestInterface< Contributor >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Contributor().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Contributor().equals( null ) );
-
-        new Contributor().equals( new Contributor() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Contributor thing = new Contributor();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Contributor().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java
index 7702c62..d4fd03a 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DependencyManagementTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code DependencyManagement}.
  *
  * @author Benjamin Bentmann
  */
-public class DependencyManagementTest
-    extends TestCase
+@DisplayName( "DependencyManagement" )
+class DependencyManagementTest implements ModelTestInterface< DependencyManagement >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new DependencyManagement().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new DependencyManagement().equals( null ) );
-
-        new DependencyManagement().equals( new DependencyManagement() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        DependencyManagement thing = new DependencyManagement();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new DependencyManagement().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java b/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java
index ec0a833..9438b97 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DependencyTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Dependency}.
  *
  * @author Benjamin Bentmann
  */
-public class DependencyTest
-    extends TestCase
+@DisplayName( "Dependency" )
+class DependencyTest implements ModelTestInterface< Dependency >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new Dependency().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Dependency().equals( null ) );
-
-        new Dependency().equals( new Dependency() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Dependency thing = new Dependency();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Dependency().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java b/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java
index 169ec65..d598f6d 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DeploymentRepositoryTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code DeploymentRepository}.
  *
  * @author Benjamin Bentmann
  */
-public class DeploymentRepositoryTest
-    extends TestCase
+@DisplayName( "DeploymentRepository" )
+class DeploymentRepositoryTest implements ModelTestInterface< DeploymentRepository >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new DeploymentRepository().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new DeploymentRepository().equals( null ) );
-
-        new DeploymentRepository().equals( new DeploymentRepository() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        DeploymentRepository thing = new DeploymentRepository();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new DeploymentRepository().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java b/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java
index c0dfe56..daa0e68 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DeveloperTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Developer}.
  *
  * @author Benjamin Bentmann
  */
-public class DeveloperTest
-    extends TestCase
+@DisplayName( "Developer" )
+class DeveloperTest implements ModelTestInterface< Developer >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new Developer().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Developer().equals( null ) );
-
-        new Developer().equals( new Developer() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Developer thing = new Developer();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Developer().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java
index 0314d61..c514ca0 100644
--- a/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/DistributionManagementTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code DistributionManagement}.
  *
  * @author Benjamin Bentmann
  */
-public class DistributionManagementTest
-    extends TestCase
+@DisplayName( "DistributionManagement" )
+class DistributionManagementTest implements ModelTestInterface< DistributionManagement >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new DistributionManagement().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new DistributionManagement().equals( null ) );
-
-        new DistributionManagement().equals( new DistributionManagement() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        DistributionManagement thing = new DistributionManagement();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new DistributionManagement().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java b/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java
index 6febace..7595866 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ExclusionTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Exclusion}.
  *
  * @author Benjamin Bentmann
  */
-public class ExclusionTest
-    extends TestCase
+@DisplayName( "Exclusion" )
+class ExclusionTest implements ModelTestInterface< Exclusion >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new Exclusion().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Exclusion().equals( null ) );
-
-        new Exclusion().equals( new Exclusion() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Exclusion thing = new Exclusion();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Exclusion().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java b/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java
index 4b8cd8a..ed39bb5 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ExtensionTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Extension}.
  *
  * @author Benjamin Bentmann
  */
-public class ExtensionTest
-    extends TestCase
+@DisplayName( "Extension" )
+class ExtensionTest implements ModelTestInterface< Extension >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new Extension().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Extension().equals( null ) );
-
-        new Extension().equals( new Extension() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Extension thing = new Extension();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Extension().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java
index 5e50c15..bdd0b9f 100644
--- a/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/IssueManagementTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code IssueManagement}.
  *
  * @author Benjamin Bentmann
  */
-public class IssueManagementTest
-    extends TestCase
+@DisplayName( "IssueManagement" )
+class IssueManagementTest implements ModelTestInterface< IssueManagement >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new IssueManagement().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new IssueManagement().equals( null ) );
-
-        new IssueManagement().equals( new IssueManagement() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        IssueManagement thing = new IssueManagement();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new IssueManagement().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java b/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java
index 179921b..5fef64a 100644
--- a/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/LicenseTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code License}.
  *
  * @author Benjamin Bentmann
  */
-public class LicenseTest
-    extends TestCase
+@DisplayName( "License" )
+class LicenseTest implements ModelTestInterface< License >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new License().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new License().equals( null ) );
-
-        new License().equals( new License() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        License thing = new License();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new License().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java b/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java
index 6129695..b2f3ebe 100644
--- a/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/MailingListTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code MailingList}.
  *
  * @author Benjamin Bentmann
  */
-public class MailingListTest
-    extends TestCase
+@DisplayName( "MailingList" )
+class MailingListTest implements ModelTestInterface< MailingList >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new MailingList().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new MailingList().equals( null ) );
-
-        new MailingList().equals( new MailingList() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        MailingList thing = new MailingList();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new MailingList().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ModelTest.java b/maven-model/src/test/java/org/apache/maven/model/ModelTest.java
index c9ec4da..2a16ba5 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ModelTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ModelTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Model}.
  *
  * @author Benjamin Bentmann
  */
-public class ModelTest
-    extends TestCase
+@DisplayName( "Model" )
+class ModelTest implements ModelTestInterface< Model >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new Model().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Model().equals( null ) );
-
-        new Model().equals( new Model() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Model thing = new Model();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Model().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java b/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
new file mode 100644
index 0000000..d8108de
--- /dev/null
+++ b/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
@@ -0,0 +1,65 @@
+package org.apache.maven.model;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatCode;
+
+interface ModelTestInterface< T >
+{
+    @SuppressWarnings( "unchecked" )
+    default T createNewInstance(Class< ? > x) throws ReflectiveOperationException
+    {
+        return ( T ) x.getDeclaredConstructor().newInstance();
+    }
+
+    @Test
+    @DisplayName( "hashCode should not fail with null." )
+    default void hashCodeNullSafe()
+    {
+        assertThatCode( () -> createNewInstance( this.getClass() ).hashCode() ).doesNotThrowAnyException();
+    }
+
+    @Test
+    @DisplayName( "equals should not fail with null." )
+    default void equalsNullSafe() throws ReflectiveOperationException
+    {
+        assertThat( createNewInstance( this.getClass() ).equals( null ) ).isFalse();
+    }
+
+    @Test
+    @DisplayName( "equals should result in false for two different instances." )
+    default void equalsSameToBeFalse() throws ReflectiveOperationException
+    {
+        T firstInstance = createNewInstance( this.getClass() );
+        T secondInstance = createNewInstance( this.getClass() );
+        assertThat( firstInstance.equals( secondInstance ) ).isFalse();
+    }
+
+    @Test
+    @DisplayName( "toString should not be null." )
+    default void toStringNullSafe() throws ReflectiveOperationException
+    {
+        assertThat( createNewInstance( this.getClass() ).toString() ).isNotNull();
+    }
+}
diff --git a/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java b/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java
index 4e5d068..ab4defb 100644
--- a/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/NotifierTest.java
@@ -19,38 +19,14 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Notifier}.
  *
  * @author Benjamin Bentmann
  */
-public class NotifierTest
-    extends TestCase
+@DisplayName( "Notifier" )
+class NotifierTest implements ModelTestInterface< Notifier >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Notifier().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Notifier().equals( null ) );
-
-        new Notifier().equals( new Notifier() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Notifier thing = new Notifier();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Notifier().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java b/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java
index 48abe77..ef5eb4f 100644
--- a/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/OrganizationTest.java
@@ -19,38 +19,14 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Organization}.
  *
  * @author Benjamin Bentmann
  */
-public class OrganizationTest
-    extends TestCase
+@DisplayName( "Organization" )
+class OrganizationTest implements ModelTestInterface< Organization >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Organization().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Organization().equals( null ) );
-
-        new Organization().equals( new Organization() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Organization thing = new Organization();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Organization().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ParentTest.java b/maven-model/src/test/java/org/apache/maven/model/ParentTest.java
index 78d4567..3419438 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ParentTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ParentTest.java
@@ -19,38 +19,14 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Parent}.
  *
  * @author Benjamin Bentmann
  */
-public class ParentTest
-    extends TestCase
+@DisplayName( "Parent" )
+class ParentTest implements ModelTestInterface< Parent >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Parent().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Parent().equals( null ) );
-
-        new Parent().equals( new Parent() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Parent thing = new Parent();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Parent().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java
index cbb123d..39642ba 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginConfigurationTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code PluginConfiguration}.
  *
  * @author Benjamin Bentmann
  */
-public class PluginConfigurationTest
-    extends TestCase
+@DisplayName( "PluginConfiguration" )
+class PluginConfigurationTest implements ModelTestInterface< PluginConfiguration >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new PluginConfiguration().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new PluginConfiguration().equals( null ) );
-
-        new PluginConfiguration().equals( new PluginConfiguration() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        PluginConfiguration thing = new PluginConfiguration();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new PluginConfiguration().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java
index 878298c..9aab597 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginContainerTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code PluginContainer}.
  *
  * @author Benjamin Bentmann
  */
-public class PluginContainerTest
-    extends TestCase
+@DisplayName( "PluginContainer" )
+class PluginContainerTest implements ModelTestInterface< PluginContainer >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new PluginContainer().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new PluginContainer().equals( null ) );
-
-        new PluginContainer().equals( new PluginContainer() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        PluginContainer thing = new PluginContainer();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new PluginContainer().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java
index e8fff51..8bd1241 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginExecutionTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code PluginExecution}.
  *
  * @author Benjamin Bentmann
  */
-public class PluginExecutionTest
-    extends TestCase
+@DisplayName( "PluginExecution" )
+class PluginExecutionTest implements ModelTestInterface< PluginExecution >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new PluginExecution().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new PluginExecution().equals( null ) );
-
-        new PluginExecution().equals( new PluginExecution() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        PluginExecution thing = new PluginExecution();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new PluginExecution().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java
index 571399f..d53450a 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginManagementTest.java
@@ -19,38 +19,14 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code PluginManagement}.
  *
  * @author Benjamin Bentmann
  */
-public class PluginManagementTest
-    extends TestCase
+@DisplayName( "PluginManagement" )
+class PluginManagementTest implements ModelTestInterface< PluginManagement >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new PluginManagement().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new PluginManagement().equals( null ) );
-
-        new PluginManagement().equals( new PluginManagement() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        PluginManagement thing = new PluginManagement();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new PluginManagement().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PluginTest.java b/maven-model/src/test/java/org/apache/maven/model/PluginTest.java
index 582145e..f75a9f1 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PluginTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PluginTest.java
@@ -19,38 +19,14 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Plugin}.
  *
  * @author Benjamin Bentmann
  */
-public class PluginTest
-    extends TestCase
+@DisplayName( "Plugin" )
+class PluginTest implements ModelTestInterface< Plugin >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Plugin().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Plugin().equals( null ) );
-
-        new Plugin().equals( new Plugin() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Plugin thing = new Plugin();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Plugin().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java b/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java
index 727f2c3..c3b3150 100644
--- a/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/PrerequisitesTest.java
@@ -19,38 +19,14 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Prerequisites}.
  *
  * @author Benjamin Bentmann
  */
-public class PrerequisitesTest
-    extends TestCase
+@DisplayName( "Prerequisites" )
+class PrerequisitesTest implements ModelTestInterface< Prerequisites >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Prerequisites().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Prerequisites().equals( null ) );
-
-        new Prerequisites().equals( new Prerequisites() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Prerequisites thing = new Prerequisites();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Prerequisites().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java b/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java
index 512e2a8..921fca3 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ProfileTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Profile}.
  *
  * @author Benjamin Bentmann
  */
-public class ProfileTest
-    extends TestCase
+@DisplayName( "Profile" )
+class ProfileTest implements ModelTestInterface< Profile >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new Profile().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Profile().equals( null ) );
-
-        new Profile().equals( new Profile() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Profile thing = new Profile();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Profile().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java b/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java
index 265304d..92dd309 100644
--- a/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/RelocationTest.java
@@ -19,38 +19,14 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Relocation}.
  *
  * @author Benjamin Bentmann
  */
-public class RelocationTest
-    extends TestCase
+@DisplayName( "Relocation" )
+class RelocationTest implements ModelTestInterface< Relocation >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Relocation().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Relocation().equals( null ) );
-
-        new Relocation().equals( new Relocation() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Relocation thing = new Relocation();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Relocation().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java b/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java
index d10cb79..15c6586 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ReportPluginTest.java
@@ -19,38 +19,14 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code ReportPlugin}.
  *
  * @author Benjamin Bentmann
  */
-public class ReportPluginTest
-    extends TestCase
+@DisplayName( "ReportPlugin" )
+class ReportPluginTest implements ModelTestInterface< ReportPlugin >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new ReportPlugin().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new ReportPlugin().equals( null ) );
-
-        new ReportPlugin().equals( new ReportPlugin() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        ReportPlugin thing = new ReportPlugin();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new ReportPlugin().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java b/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java
index 2f51415..864c9c9 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ReportSetTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code ReportSet}.
  *
  * @author Benjamin Bentmann
  */
-public class ReportSetTest
-    extends TestCase
+@DisplayName( "ReportSet" )
+class ReportSetTest implements ModelTestInterface< ReportSet >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new ReportSet().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new ReportSet().equals( null ) );
-
-        new ReportSet().equals( new ReportSet() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        ReportSet thing = new ReportSet();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new ReportSet().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java b/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java
index dbc0fa2..063b1e5 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ReportingTest.java
@@ -19,38 +19,14 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Reporting}.
  *
  * @author Benjamin Bentmann
  */
-public class ReportingTest
-    extends TestCase
+@DisplayName( "Reporting" )
+class ReportingTest implements ModelTestInterface< Reporting >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Reporting().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Reporting().equals( null ) );
-
-        new Reporting().equals( new Reporting() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Reporting thing = new Reporting();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Reporting().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java b/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java
index 3ae3435..71c2b71 100644
--- a/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/RepositoryPolicyTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code RepositoryPolicy}.
  *
  * @author Benjamin Bentmann
  */
-public class RepositoryPolicyTest
-    extends TestCase
+@DisplayName( "RepositoryPolicy" )
+class RepositoryPolicyTest implements ModelTestInterface< RepositoryPolicy >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new RepositoryPolicy().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new RepositoryPolicy().equals( null ) );
-
-        new RepositoryPolicy().equals( new RepositoryPolicy() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        RepositoryPolicy thing = new RepositoryPolicy();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new RepositoryPolicy().toString() );
-    }
-
 }
diff --git a/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java b/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java
index b68b70a..713fa4a 100644
--- a/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/RepositoryTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Repository}.
  *
  * @author Benjamin Bentmann
  */
-public class RepositoryTest
-    extends TestCase
+@DisplayName( "Repository" )
+class RepositoryTest implements ModelTestInterface< Repository >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Repository().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Repository().equals( null ) );
-
-        new Repository().equals( new Repository() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Repository thing = new Repository();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Repository().toString() );
-    }
-
 }
+
diff --git a/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java b/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java
index fa40ab4..d09a3c6 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ResourceTest.java
@@ -19,38 +19,15 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Resource}.
  *
  * @author Benjamin Bentmann
  */
-public class ResourceTest
-    extends TestCase
+@DisplayName( "Resource" )
+class ResourceTest implements ModelTestInterface< Resource >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Resource().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Resource().equals( null ) );
-
-        new Resource().equals( new Resource() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Resource thing = new Resource();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Resource().toString() );
-    }
-
 }
+
diff --git a/maven-model/src/test/java/org/apache/maven/model/ScmTest.java b/maven-model/src/test/java/org/apache/maven/model/ScmTest.java
index 4d76993..b244fb5 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ScmTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ScmTest.java
@@ -19,38 +19,17 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Scm}.
  *
  * @author Benjamin Bentmann
  */
-public class ScmTest
-    extends TestCase
+@DisplayName( "Scm" )
+class ScmTest implements ModelTestInterface< Scm >
 {
 
-    public void testHashCodeNullSafe()
-    {
-        new Scm().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Scm().equals( null ) );
-
-        new Scm().equals( new Scm() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Scm thing = new Scm();
-        assertTrue( thing.equals( thing ) );
-    }
+}
 
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Scm().toString() );
-    }
 
-}
diff --git a/maven-model/src/test/java/org/apache/maven/model/SiteTest.java b/maven-model/src/test/java/org/apache/maven/model/SiteTest.java
index 84896bb..1d96718 100644
--- a/maven-model/src/test/java/org/apache/maven/model/SiteTest.java
+++ b/maven-model/src/test/java/org/apache/maven/model/SiteTest.java
@@ -19,38 +19,14 @@ package org.apache.maven.model;
  * under the License.
  */
 
-import junit.framework.TestCase;
+import org.junit.jupiter.api.DisplayName;
 
 /**
  * Tests {@code Site}.
  *
  * @author Benjamin Bentmann
  */
-public class SiteTest
-    extends TestCase
+@DisplayName( "Site" )
+class SiteTest implements ModelTestInterface< Site >
 {
-
-    public void testHashCodeNullSafe()
-    {
-        new Site().hashCode();
-    }
-
-    public void testEqualsNullSafe()
-    {
-        assertFalse( new Site().equals( null ) );
-
-        new Site().equals( new Site() );
-    }
-
-    public void testEqualsIdentity()
-    {
-        Site thing = new Site();
-        assertTrue( thing.equals( thing ) );
-    }
-
-    public void testToStringNullSafe()
-    {
-        assertNotNull( new Site().toString() );
-    }
-
 }
diff --git a/pom.xml b/pom.xml
index 7e72940..ae5c677 100644
--- a/pom.xml
+++ b/pom.xml
@@ -443,6 +443,19 @@ under the License.
         <version>2.2</version>
         <scope>test</scope>
       </dependency>
+      <dependency>
+        <groupId>org.assertj</groupId>
+        <artifactId>assertj-core</artifactId>
+        <version>3.14.0</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.junit</groupId>
+        <artifactId>junit-bom</artifactId>
+        <version>5.5.2</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
     </dependencies>
     <!--bootstrap-start-comment-->
   </dependencyManagement>


[maven] 04/05: Added author.

Posted by kh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MODELTESTS_IMPROVEMENT
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 4218c0ad54e29af1e1ee25d742fd6cb0d5414d00
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Tue Dec 10 18:31:51 2019 +0100

    Added author.
---
 .../src/test/java/org/apache/maven/model/ModelTestInterface.java     | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java b/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
index b51bc3e..f4774b3 100644
--- a/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
+++ b/maven-model/src/test/java/org/apache/maven/model/ModelTestInterface.java
@@ -27,6 +27,11 @@ import org.junit.jupiter.api.Test;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatCode;
 
+/**
+ * Interface as a test template for all model tests.
+ *
+ * @author Karl Heinz Marbaise
+ */
 @DisplayNameGeneration( ModelTestInterface.NameGenerator.class )
 interface ModelTestInterface< T >
 {