File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
modules/simple-java-mail/src/test/java/org/simplejavamail/internal/util Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ package org .simplejavamail .internal .util ;
2+
3+ import org .assertj .core .api .ThrowableAssert ;
4+ import org .junit .Test ;
5+
6+ import java .io .File ;
7+ import java .io .IOException ;
8+
9+ import static org .assertj .core .api .Assertions .assertThat ;
10+ import static org .assertj .core .api .Assertions .assertThatThrownBy ;
11+
12+ public class FileUtilTest {
13+
14+ @ Test
15+ public void testReadFileContent ()
16+ throws IOException {
17+ assertThatThrownBy (new ThrowableAssert .ThrowingCallable () {
18+ @ Override
19+ public void call ()
20+ throws Throwable {
21+ FileUtil .readFileContent (new File ("moo" ));
22+ }
23+ })
24+ .isInstanceOf (IllegalArgumentException .class )
25+ .hasMessageContaining ("File not found: moo" );
26+
27+ assertThat (FileUtil .readFileContent (new File ("src/test/resources/ignore.properties" ))).contains ("simplejavamail.defaults.bcc.address=moo" );
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments