diff --git a/src/test/java/TestEmojiPicker.java b/src/test/java/TestEmojiPicker.java index 5595063..c2c55c3 100644 --- a/src/test/java/TestEmojiPicker.java +++ b/src/test/java/TestEmojiPicker.java @@ -32,7 +32,23 @@ public class TestEmojiPicker { } - + @Test + public void testEmojiPickerButtonText() { + + + JTextField textField = new JTextField(); + + EmojiPicker emojiPicker = new EmojiPicker(textField); + + Component[] components = emojiPicker.getComponents(); + + for (Component component : components) { + assertTrue(component instanceof JButton); + + JButton button = (JButton) component; + assertTrue(button.getText().matches("[\uD83C-\uDBFF\uDC00-\uDFFF]+")); + } + } } \ No newline at end of file