Skip to content

Commit

Permalink
moved Java test into groovy
Browse files Browse the repository at this point in the history
  • Loading branch information
matzon committed Jun 6, 2016
1 parent 39ee58a commit 4be4912
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 39 deletions.
24 changes: 24 additions & 0 deletions src/test/groovy/io/jsonwebtoken/impl/JwtMapTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,28 @@ class JwtMapTest {
def s = ['b', 'd']
assertTrue m.values().containsAll(s) && s.containsAll(m.values())
}

@Test
public void testEquals() throws Exception {
def m1 = new JwtMap();
m1.put("a", "a");

def m2 = new JwtMap();
m2.put("a", "a");

assertEquals(m1, m2);
}

@Test
public void testHashcode() throws Exception {
def m = new JwtMap();
def hashCodeEmpty = m.hashCode();

m.put("a", "b");
def hashCodeNonEmpty = m.hashCode();
assertTrue(hashCodeEmpty != hashCodeNonEmpty);

def identityHash = System.identityHashCode(m);
assertTrue(hashCodeNonEmpty != identityHash);
}
}
39 changes: 0 additions & 39 deletions src/test/java/io.jsonwebtoken.impl/JavaJwtMapTest.java

This file was deleted.

0 comments on commit 4be4912

Please sign in to comment.