Browse Source

test_Emoji5

remotes/origin/client-handler
Valentin Spiroski 11 months ago
parent
commit
024648af8c
  1. 19
      src/test/java/TestEmojiPicker.java

19
src/test/java/TestEmojiPicker.java

@ -1,7 +1,7 @@
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.util.Arrays;
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.*;
public class TestEmojiPicker { public class TestEmojiPicker {
@ -117,5 +117,22 @@ public class TestEmojiPicker {
assertEquals(12, components.length); 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());
}
}
}
}
} }
Loading…
Cancel
Save