add Base64.isBase64

This commit is contained in:
Looly
2021-07-14 18:49:14 +08:00
parent f68a73538e
commit dfa10be599
4 changed files with 59 additions and 2 deletions

View File

@@ -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";