Browse Source

test_ButtonTest

remotes/origin/server
Paul Kattenborn 11 months ago
parent
commit
0f07791c87
  1. 8
      src/test/java/ChatGUITest.java

8
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());
}
}
Loading…
Cancel
Save