Skip to content

Commit

Permalink
adding hashcode test
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanCheshire committed Sep 10, 2024
1 parent ce6c736 commit ed44cc0
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,13 @@ void testToString() {
*/
@Test
void testHashCode() {
GravatarProfileRequest authenticatedRequest = GravatarProfileRequest.fromHashOrId("nathanvcheshire")
.setTokenSupplier(TokenSupplier.getTokenSupplier());
GravatarProfileRequest unauthenticatedRequest = GravatarProfileRequest.fromHashOrId("nathanvcheshire");

assertEquals(998975623, authenticatedRequest.hashCode());
assertEquals(2065170537, unauthenticatedRequest.hashCode());
assertNotEquals(authenticatedRequest.hashCode(), unauthenticatedRequest.hashCode());
}

/**
Expand Down

0 comments on commit ed44cc0

Please sign in to comment.