From 11b24c125791ba939686381037068c15492c05e7 Mon Sep 17 00:00:00 2001 From: Valentin Spiroski Date: Fri, 9 Feb 2024 22:30:19 +0100 Subject: [PATCH] test_testEmojiPickerButtonText --- src/test/java/TestEmojiPicker.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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