@Test public void readFile_shouldReadAllLinesFromTheGivenFile() throws Exception { assertThat(cut.readFile("src/test/java/.test"), is(testRawFileLines())); }
@Test(expected = IllegalArgumentException.class) public void readFile_shouldThrowIllegalArgumentExceptionWhenFileDoesNotExist() throws Exception { cut.readFile("not/a/real/.file"); }
@Test public void readFile_shouldIgnoreLeadingAndTrailingWhitespaceInFilenameParameter() throws Exception { assertThat(cut.readFile(" src/test/java/.test "), is(testRawFileLines())); }
@Test(expected = IllegalArgumentException.class) public void readFile_shouldFailWhenPassedAStringContainingOnlyWhitespace() throws Exception { cut.readFile(" "); }
@Test(expected = IllegalArgumentException.class) public void readFile_shouldFailWhenPassedAnEmptyString() throws Exception { cut.readFile(""); }
@Test(expected = IllegalArgumentException.class) public void readFile_shouldFailWhenPassedNull() throws Exception { cut.readFile(null); }