From caf3336bf594c126332324b7f69a0cb70a4e9d70 Mon Sep 17 00:00:00 2001 From: Valentin Spiroski Date: Fri, 9 Feb 2024 22:39:10 +0100 Subject: [PATCH] refactoring:TestEmojiPicker --- src/test/java/TestEmojiPicker.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/TestEmojiPicker.java b/src/test/java/TestEmojiPicker.java index ad5aa2e..997f920 100644 --- a/src/test/java/TestEmojiPicker.java +++ b/src/test/java/TestEmojiPicker.java @@ -1,22 +1,22 @@ import org.junit.jupiter.api.Test; import javax.swing.*; - import java.awt.*; - import static org.junit.jupiter.api.Assertions.*; -public class TestEmojiPicker { +public class TestEmojiPicker { + //Test to ensure the EmojiPicker constructor initializes without errors @Test public void testEmojiPickerConstructor() { - - + // Arrange JTextField textField = new JTextField(); + + // Act + EmojiPicker emojiPicker = new EmojiPicker(textField); - EmojiPicker emojiPicker = new EmojiPicker(textField); - - assertNotNull(emojiPicker); + // Assert + assertNotNull(emojiPicker); } @Test