fix test failure

This commit is contained in:
Ahmed Tawila 2017-11-16 12:07:48 +02:00
parent 31a26aca25
commit 53074cd7f0
1 changed files with 2 additions and 2 deletions

View File

@ -24,11 +24,11 @@ public class GuavaTest {
public void whenAppendToFileUsingGuava_thenCorrect() throws IOException {
File file = new File(fileName);
CharSink chs = Files.asCharSink(file, Charsets.UTF_8, FileWriteMode.APPEND);
chs.write("Spain");
chs.write("Spain\r\n");
assertThat(StreamUtils.getStringFromInputStream(
new FileInputStream(fileName)))
.isEqualTo("UK\r\n" + "US\r\n" + "Germany\r\n" + "Spain");
.isEqualTo("UK\r\n" + "US\r\n" + "Germany\r\n" + "Spain\r\n");
}
@After