Browse Source

test_testEmojiPickerButtonCount

remotes/origin/client-handler
Valentin Spiroski 11 months ago
parent
commit
5448721ea1
  1. 27
      src/test/java/TestEmojiPicker.java

27
src/test/java/TestEmojiPicker.java

@ -1,15 +1,38 @@
import org.junit.jupiter.api.Test;
import javax.swing.*;
import java.awt.*;
import static org.junit.jupiter.api.Assertions.*;
public class TestEmojiPicker {
@Test
public void testEmojiPickerConstructor() {
JTextField textField = new JTextField();
public void testEmojiPickerConstructor() {
JTextField textField = new JTextField();
EmojiPicker emojiPicker = new EmojiPicker(textField);
assertNotNull(emojiPicker);
}
@Test
public void testEmojiPickerButtonCount() {
JTextField textField = new JTextField();
EmojiPicker emojiPicker = new EmojiPicker(textField);
Component[] components = emojiPicker.getComponents();
assertEquals(12, components.length);
}
}
Loading…
Cancel
Save