add test and comment

This commit is contained in:
Looly
2021-07-26 18:10:29 +08:00
parent 86479585a8
commit 2ce5b2cc79
4 changed files with 25 additions and 5 deletions

View File

@@ -3,10 +3,12 @@ package cn.hutool.core.text;
import org.junit.Assert;
import org.junit.Test;
import java.util.regex.Pattern;
public class CharSequenceUtilTest {
@Test
public void replace() {
public void replaceTest() {
String actual = CharSequenceUtil.replace("SSM15930297701BeryAllen", Pattern.compile("[0-9]"), matcher -> "");
Assert.assertEquals("SSMBeryAllen", actual);
}