Skip to content

Commit

Permalink
Ensure no exception is thrown when getting builder hashCode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Haag committed Jul 29, 2024
1 parent 41c16a3 commit 0d0828f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import static de.cuioss.tools.collect.CollectionLiterals.immutableList;
import static de.cuioss.tools.collect.CollectionLiterals.mutableList;
import static de.cuioss.tools.collect.CollectionLiterals.mutableSortedSet;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
Expand Down Expand Up @@ -108,6 +109,7 @@ void shouldHandleObjectMethods() {
builder.add("1");

assertNotNull(builder.toString());
assertDoesNotThrow(builder::hashCode);
assertNotEquals(0, builder.hashCode());
assertEquals(builder, builder);
}
Expand Down

0 comments on commit 0d0828f

Please sign in to comment.