fix test failure

This commit is contained in:
Ahmed Tawila 2017-11-16 11:31:05 +02:00
parent 0ffa8c6c8c
commit df3aa78d57
1 changed files with 2 additions and 2 deletions

View File

@ -21,10 +21,10 @@ public class GuavaTest {
public static final String fileName = "src/main/resources/countries.txt";
@Test
public void whenAppendToFileUsingFileWriter_thenCorrect() throws IOException {
public void whenAppendToFileUsingGuava_thenCorrect() throws IOException {
File file = new File(fileName);
CharSink chs = Files.asCharSink(file, Charsets.UTF_8, FileWriteMode.APPEND);
chs.write("Spain\r\n");
chs.write("Spain\n");
assertThat(StreamUtils.getStringFromInputStream(
new FileInputStream(fileName)))