diff --git a/src/main/java/ChatGUI.java b/src/main/java/ChatGUI.java index 93c62e7..6ad34f1 100644 --- a/src/main/java/ChatGUI.java +++ b/src/main/java/ChatGUI.java @@ -34,7 +34,7 @@ public class ChatGUI implements ActionListener { JMenuItem exit = new JMenuItem("Exit"); - private JButton popupButton; + JButton popupButton; JTextField inputTextField = new JTextField(); JTextArea outputTextArea = new JTextArea(); diff --git a/src/test/java/ChatGUITest.java b/src/test/java/ChatGUITest.java index 2931dad..f38488e 100644 --- a/src/test/java/ChatGUITest.java +++ b/src/test/java/ChatGUITest.java @@ -92,6 +92,16 @@ public class ChatGUITest { assertTrue(chatGUI.outputTextArea.getText().contains(expectedMessage)); } + @Test + public void testSendPopupMessage() { + ChatGUI chatGUI = new ChatGUI(); + + + String testMessage = "Test Popup-Nachricht"; + + + chatGUI.sendPopupMessage(testMessage); + } }