All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.houbb.special.chars.test.emoji.util.EmojisTest Maven / Gradle / Ivy

There is a newer version: 0.0.2
Show newest version
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