com.github.houbb.special.chars.test.emoji.util.EmojisTest Maven / Gradle / Ivy
package com.github.houbb.special.chars.test.emoji.util;
import com.github.houbb.special.chars.emoji.constant.enums.SpecialCharEmojiTypeEnum;
import com.github.houbb.special.chars.emoji.util.SpecialCharEmojiHelper;
import org.junit.Assert;
import org.junit.Test;
/**
* project: special-char-EmojisTest
* create on 2020/3/8 15:12
*
* @author binbin.hou
* @since 0.0.1
*/
public class EmojisTest {
@Test
public void isSpecialTest() {
final String text = "hello";
Assert.assertFalse(SpecialCharEmojiHelper.isEmoji(text));
}
@Test
public void isSpecialTrueTest() {
final String text = "\uD83D\uDE03";
Assert.assertTrue(SpecialCharEmojiHelper.isEmoji(text));
}
@Test
public void emojiTest() {
final String text = "笑脸";
System.out.println(SpecialCharEmojiHelper.emoji(SpecialCharEmojiTypeEnum.SMILEYS_AND_PEOPLE, text));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy