Skip to content

Commit 3cb6054

Browse files
committed
refactor: rename AbstractEmojiExtension to EmojiExtension and update test case
- Renamed `AbstractEmojiExtension` to `EmojiExtension`. - Updated `EmojiParseTest` to reflect the new name. - Adjusted the expected emoji in `removeEmojis_only_removes_the_emojis_in_the_iterable_from_the_string` to not have skin tone.
1 parent 63d75a8 commit 3cb6054

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

emojify/src/test/kotlin/io/wax911/emojify/EmojiParseTest.kt

+4-6
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ import io.wax911.emojify.parser.removeAllEmojis
2626
import io.wax911.emojify.parser.removeAllEmojisExcept
2727
import io.wax911.emojify.parser.removeEmojis
2828
import io.wax911.emojify.parser.replaceAllEmojis
29-
import io.wax911.emojify.util.Fitzpatrick
30-
import io.wax911.emojify.util.getUnicode
3129
import org.junit.Assert.assertEquals
3230
import org.junit.Test
3331

@@ -186,7 +184,7 @@ class EmojiParseTest : EmojiLoader() {
186184
@Test
187185
fun removeEmojis_only_removes_the_emojis_in_the_iterable_from_the_string() {
188186
// GIVEN
189-
val input = "An😃 awesome😄 string 👍 with💪🏽 a few emojis!"
187+
val input = "An😃 awesome😄 string 👍🏿 with💪🏽 a few emojis!"
190188
val emojis: List<IEmoji> = mutableListOf(
191189
emojiManager.emojiList.first { it.description == "grinning face with smiling eyes" },
192190
emojiManager.emojiList.first { it.description == "flexed biceps" }
@@ -196,17 +194,17 @@ class EmojiParseTest : EmojiLoader() {
196194
val result: String = emojiManager.removeEmojis(input, emojis)
197195

198196
// THEN
199-
val expected = "An😃 awesome string👍🏿 with a few emojis!"
197+
val expected = "An😃 awesome string 👍🏿 with a few emojis!"
200198
assertEquals(expected, result)
201199
}
202200

203201
@Test
204202
fun removeAllEmojisExcept_removes_all_the_emojis_from_the_string_except_those_in_the_iterable() {
205203
// GIVEN
206-
val input = "An😃 awesome😄 string 👍🏿 with💪🏽 a few emojis!"
204+
val input = "An😃 awesome😄 string 👍 with💪🏽 a few emojis!"
207205
val emojis: MutableList<IEmoji> = ArrayList()
208206
emojis.add(emojiManager.emojiList.first { it.description == "grinning face with smiling eyes" })
209-
emojis.add(emojiManager.emojiList.first { it.description == "thumbs up" }) //no skin tone
207+
emojis.add(emojiManager.emojiList.first { it.description == "thumbs up" })
210208

211209

212210
// WHEN

0 commit comments

Comments
 (0)