mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -43,6 +43,24 @@ public class JWTUtilTest {
|
||||
Assert.assertEquals(true, jwt.getPayload("admin"));
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void parseNullTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I5OCQB
|
||||
JWTUtil.parseToken(null);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void parseEmptyTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I5OCQB
|
||||
JWTUtil.parseToken("");
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void parseBlankTest(){
|
||||
// https://gitee.com/dromara/hutool/issues/I5OCQB
|
||||
JWTUtil.parseToken(" ");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void verifyTest(){
|
||||
final String token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9." +
|
||||
|
Reference in New Issue
Block a user