diff --git a/src/test/java/ChatGUITest.java b/src/test/java/ChatGUITest.java index 3afb790..8b06bf4 100644 --- a/src/test/java/ChatGUITest.java +++ b/src/test/java/ChatGUITest.java @@ -1,6 +1,7 @@ import static org.junit.Assert.assertEquals; import java.awt.Color; +import java.awt.Font; import org.junit.Before; import org.junit.Test; @@ -34,6 +35,12 @@ public class ChatGUITest { chatGUI.actionPerformed(new TestActionEvent(chatGUI.green)); 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()); + } }