|
@ -1,15 +1,38 @@ |
|
|
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 static org.junit.jupiter.api.Assertions.*; |
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
|
|
|
|
|
|
public class TestEmojiPicker { |
|
|
public class TestEmojiPicker { |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
public void testEmojiPickerConstructor() { |
|
|
|
|
|
JTextField textField = new JTextField(); |
|
|
|
|
|
|
|
|
public void testEmojiPickerConstructor() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JTextField textField = new JTextField(); |
|
|
|
|
|
|
|
|
EmojiPicker emojiPicker = new EmojiPicker(textField); |
|
|
EmojiPicker emojiPicker = new EmojiPicker(textField); |
|
|
|
|
|
|
|
|
assertNotNull(emojiPicker); |
|
|
assertNotNull(emojiPicker); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
@Test |
|
|
|
|
|
public void testEmojiPickerButtonCount() { |
|
|
|
|
|
JTextField textField = new JTextField(); |
|
|
|
|
|
|
|
|
|
|
|
EmojiPicker emojiPicker = new EmojiPicker(textField); |
|
|
|
|
|
|
|
|
|
|
|
Component[] components = emojiPicker.getComponents(); |
|
|
|
|
|
|
|
|
|
|
|
assertEquals(12, components.length); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |