mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add Base64.isBase64
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package cn.hutool.core.codec;
|
||||
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
@@ -13,6 +14,11 @@ import org.junit.Test;
|
||||
*/
|
||||
public class Base64Test {
|
||||
|
||||
@Test
|
||||
public void isBase64Test(){
|
||||
Assert.assertTrue(Base64.isBase64(Base64.encode(RandomUtil.randomString(100))));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void encodeAndDecodeTest() {
|
||||
String a = "伦家是一个非常长的字符串66";
|
||||
|
Reference in New Issue
Block a user