Created
January 10, 2014 04:04
-
-
Save tarynsauer/8346835 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class CLIBoardTest { | |
| private CLIBoard cliBoard; | |
| private MockPrintStream printStream; | |
| @Before | |
| public void setUp() throws Exception { | |
| MockOutputStream outputStream = new MockOutputStream(); | |
| printStream = new MockPrintStream(outputStream); | |
| printStream.setPrintCallHistory(new ArrayList<String>()); | |
| cliBoard = new CLIBoard(printStream); | |
| } | |
| @Test | |
| public void testPrintDivider() { | |
| String expectedOutput = "------------------\n"; | |
| cliBoard.printDivider(); | |
| assertEquals(expectedOutput, printStream.lastPrintCall()); | |
| } | |
| ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment