mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
add test
This commit is contained in:
parent
1e9645c2e8
commit
fe36cd36e6
@ -1,6 +1,7 @@
|
||||
package cn.hutool.core.map;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.convert.ConvertException;
|
||||
import cn.hutool.core.lang.Opt;
|
||||
import cn.hutool.core.text.StrUtil;
|
||||
import lombok.Builder;
|
||||
@ -215,4 +216,11 @@ public class MapUtilTest {
|
||||
Assert.assertEquals(Integer.valueOf(1), map.get("a"));
|
||||
Assert.assertEquals(Integer.valueOf(2), map.get("b"));
|
||||
}
|
||||
|
||||
@Test(expected = ConvertException.class)
|
||||
public void getIntTest(){
|
||||
final Map<String, String> map = MapUtil.ofEntries(MapUtil.entry("a", "D"));
|
||||
final Integer a = MapUtil.getInt(map, "a");
|
||||
Assert.assertNotNull(a);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user