Browse Source

Update TestEmojiPicker.java

main
Alena Bandarovich 11 months ago
parent
commit
20d804d215
  1. 6
      src/test/java/TestEmojiPicker.java

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

Loading…
Cancel
Save