Browse Source

test_fonttest

remotes/origin/server
Paul Kattenborn 11 months ago
parent
commit
ef68912273
  1. 7
      src/test/java/ChatGUITest.java

7
src/test/java/ChatGUITest.java

@ -1,6 +1,7 @@
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import java.awt.Color; import java.awt.Color;
import java.awt.Font;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@ -34,6 +35,12 @@ public class ChatGUITest {
chatGUI.actionPerformed(new TestActionEvent(chatGUI.green)); chatGUI.actionPerformed(new TestActionEvent(chatGUI.green));
assertEquals(Color.GREEN, chatGUI.outputTextArea.getForeground()); assertEquals(Color.GREEN, chatGUI.outputTextArea.getForeground());
} }
@Test
public void testSetOutputTextFontSizeSmall() {
chatGUI.actionPerformed(new TestActionEvent(chatGUI.small));
Font expectedFont = chatGUI.outputTextArea.getFont().deriveFont(Font.PLAIN, 12);
assertEquals(expectedFont, chatGUI.outputTextArea.getFont());
}
} }
Loading…
Cancel
Save