diff --git a/src/test/java/ChatGUITest.java b/src/test/java/ChatGUITest.java index 42065b8..04fa7d0 100644 --- a/src/test/java/ChatGUITest.java +++ b/src/test/java/ChatGUITest.java @@ -53,6 +53,14 @@ public class ChatGUITest { Font expectedFont = chatGUI.outputTextArea.getFont().deriveFont(Font.PLAIN, 20); assertEquals(expectedFont, chatGUI.outputTextArea.getFont()); } + @Test + public void testSendButtonActionPerformed() { + chatGUI.inputTextField.setText("Testnachricht"); + chatGUI.sendButton.doClick(); + + String expectedOutput = "Testnachricht\n"; + assertEquals(expectedOutput, chatGUI.outputTextArea.getText()); + } }