Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isEmoji with gender modifiers #139

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions src/test/java/com/vdurmont/emoji/EmojiManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,54 @@ public void isEmoji_with_fitzpatric_modifier_returns_true() {
assertTrue(isEmoji);
}

@Test
public void isEmoji_with_male_gender_modifier_returns_true() {
// GIVEN
String str = "🏃‍♂";

// WHEN
boolean isEmoji = EmojiManager.isEmoji(str);

// THEN
assertTrue(isEmoji);
}

@Test
public void isEmoji_with_female_gender_modifier_returns_true() {
// GIVEN
String str = "🏃♀️";

// WHEN
boolean isEmoji = EmojiManager.isEmoji(str);

// THEN
assertTrue(isEmoji);
}

@Test
public void isEmoji_with_gender_modifier_and_extra_text_returns_false() {
// GIVEN
String str = "🏃♀️test";

// WHEN
boolean isEmoji = EmojiManager.isEmoji(str);

// THEN
assertFalse(isEmoji);
}

@Test
public void isEmoji_empty_string_returns_false() {
// GIVEN
String str = "";

// WHEN
boolean isEmoji = EmojiManager.isEmoji(str);

// THEN
assertFalse(isEmoji);
}

@Test
public void isEmoji_for_a_non_emoji_returns_false() {
// GIVEN
Expand Down