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