From 20d804d21570b5ce95680d0d8a89e5aa848d1e73 Mon Sep 17 00:00:00 2001 From: Alena Bandarovich Date: Fri, 9 Feb 2024 23:59:28 +0100 Subject: [PATCH] Update TestEmojiPicker.java --- src/test/java/TestEmojiPicker.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/TestEmojiPicker.java b/src/test/java/TestEmojiPicker.java index 2b0c634..aec81b5 100644 --- a/src/test/java/TestEmojiPicker.java +++ b/src/test/java/TestEmojiPicker.java @@ -45,7 +45,7 @@ public class TestEmojiPicker { // Assert for (Component component : components) { - assertTrue(component instanceof JButton); + assertInstanceOf(JButton.class, component); JButton button = (JButton) component; assertTrue(button.getText().matches("[\uD83C-\uDBFF\uDC00-\uDFFF]+")); // Check if button text is an emoji } @@ -63,11 +63,11 @@ public class TestEmojiPicker { // Assert for (Component component : components) { - assertTrue(component instanceof JButton); + assertInstanceOf(JButton.class, component); JButton button = (JButton) component; assertNotNull(button.getActionListeners()); assertEquals(1, button.getActionListeners().length); - assertTrue(button.getActionListeners()[0] instanceof EmojiPicker.EmojiActionListener); + assertInstanceOf(EmojiPicker.EmojiActionListener.class, button.getActionListeners()[0]); } }