From 94c11f755030721d2b76355f2ceeb42ef291acee Mon Sep 17 00:00:00 2001 From: Paul Kattenborn Date: Fri, 9 Feb 2024 19:22:28 +0100 Subject: [PATCH] test_popupTest --- src/main/java/ChatGUI.java | 2 +- src/test/java/ChatGUITest.java | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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); + } }