|
|
@ -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()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |