fix test failure
This commit is contained in:
parent
0ffa8c6c8c
commit
df3aa78d57
|
@ -21,10 +21,10 @@ public class GuavaTest {
|
||||||
public static final String fileName = "src/main/resources/countries.txt";
|
public static final String fileName = "src/main/resources/countries.txt";
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenAppendToFileUsingFileWriter_thenCorrect() throws IOException {
|
public void whenAppendToFileUsingGuava_thenCorrect() throws IOException {
|
||||||
File file = new File(fileName);
|
File file = new File(fileName);
|
||||||
CharSink chs = Files.asCharSink(file, Charsets.UTF_8, FileWriteMode.APPEND);
|
CharSink chs = Files.asCharSink(file, Charsets.UTF_8, FileWriteMode.APPEND);
|
||||||
chs.write("Spain\r\n");
|
chs.write("Spain\n");
|
||||||
|
|
||||||
assertThat(StreamUtils.getStringFromInputStream(
|
assertThat(StreamUtils.getStringFromInputStream(
|
||||||
new FileInputStream(fileName)))
|
new FileInputStream(fileName)))
|
||||||
|
|
Loading…
Reference in New Issue