From 024648af8c5a8653a4c2bcbb7eca0b4794d5fd6d Mon Sep 17 00:00:00 2001 From: Valentin Spiroski Date: Fri, 9 Feb 2024 23:51:21 +0100 Subject: [PATCH] test_Emoji5 --- src/test/java/TestEmojiPicker.java | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/test/java/TestEmojiPicker.java b/src/test/java/TestEmojiPicker.java index 0ee459c..9396f69 100644 --- a/src/test/java/TestEmojiPicker.java +++ b/src/test/java/TestEmojiPicker.java @@ -1,7 +1,7 @@ import org.junit.jupiter.api.Test; import javax.swing.*; import java.awt.*; - +import java.util.Arrays; import static org.junit.jupiter.api.Assertions.*; public class TestEmojiPicker { @@ -117,5 +117,22 @@ public class TestEmojiPicker { assertEquals(12, components.length); } - + @Test + public void testEmojiPickerButtonFont() { + JTextField textField = new JTextField(); + EmojiPicker emojiPicker = new EmojiPicker(textField); + Component[] components = emojiPicker.getComponents(); + for (Component component : components) { + if (component instanceof JButton) { + JButton button = (JButton) component; + Font buttonFont = button.getFont(); + assertEquals("Segoe UI Emoji", buttonFont.getFontName()); + assertEquals(Font.PLAIN, buttonFont.getStyle()); + assertEquals(20, buttonFont.getSize()); + } + } + } + + } + }