Skip to content

Commit

Permalink
Merge pull request #36 from cuioss/feature/test-hashcode-collectionbu…
Browse files Browse the repository at this point in the history
…ilder

Ensure no exception is thrown when getting builder hashCode.
  • Loading branch information
cuioss committed Jul 29, 2024
2 parents 41c16a3 + 0d0828f commit dbfc5e7
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 dbfc5e7

Please sign in to comment.