forked from fanruan/finekit
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
624 B
26 lines
624 B
package com.fanruan.api.util; |
|
|
|
import com.fr.stable.CodeUtils; |
|
import com.fr.stable.CommonCodeUtils; |
|
import org.junit.Assert; |
|
import org.junit.Test; |
|
|
|
public class CodeKitTest { |
|
@Test |
|
public void passwordDecode(String passwordText) { |
|
Assert.assertEquals(CodeKit.passwordDecode(passwordText), 123); |
|
} |
|
|
|
@Test |
|
public void cjkDecode() { |
|
String s = "中文 한글 日本語"; |
|
String encode = CodeUtils.cjkEncode(s); |
|
|
|
try { |
|
String decode = CodeKit.cjkDecode(encode); |
|
Assert.assertTrue(s.equals(decode)); |
|
} catch (Exception e) { |
|
|
|
} |
|
} |
|
}
|
|
|