|
|
@ -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()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|