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