From 5448721ea12aa8284b496b0b1ffde7fa2135129d Mon Sep 17 00:00:00 2001 From: Valentin Spiroski Date: Fri, 9 Feb 2024 22:29:12 +0100 Subject: [PATCH] test_testEmojiPickerButtonCount --- src/test/java/TestEmojiPicker.java | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/test/java/TestEmojiPicker.java b/src/test/java/TestEmojiPicker.java index 19b6128..5595063 100644 --- a/src/test/java/TestEmojiPicker.java +++ b/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); + + } + + + + + } \ No newline at end of file