Browse Source

test_popupTest

remotes/origin/server
Paul Kattenborn 11 months ago
parent
commit
94c11f7550
  1. 2
      src/main/java/ChatGUI.java
  2. 10
      src/test/java/ChatGUITest.java

2
src/main/java/ChatGUI.java

@ -34,7 +34,7 @@ public class ChatGUI implements ActionListener {
JMenuItem exit = new JMenuItem("Exit"); JMenuItem exit = new JMenuItem("Exit");
private JButton popupButton;
JButton popupButton;
JTextField inputTextField = new JTextField(); JTextField inputTextField = new JTextField();
JTextArea outputTextArea = new JTextArea(); JTextArea outputTextArea = new JTextArea();

10
src/test/java/ChatGUITest.java

@ -92,6 +92,16 @@ public class ChatGUITest {
assertTrue(chatGUI.outputTextArea.getText().contains(expectedMessage)); assertTrue(chatGUI.outputTextArea.getText().contains(expectedMessage));
} }
@Test
public void testSendPopupMessage() {
ChatGUI chatGUI = new ChatGUI();
String testMessage = "Test Popup-Nachricht";
chatGUI.sendPopupMessage(testMessage);
}
} }
Loading…
Cancel
Save