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 <khmarba...@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();