fix test failures
This commit is contained in:
parent
53074cd7f0
commit
1a368ca9f3
|
@ -8,6 +8,7 @@ import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import com.baeldung.util.StreamUtils;
|
import com.baeldung.util.StreamUtils;
|
||||||
|
@ -20,6 +21,13 @@ public class GuavaTest {
|
||||||
|
|
||||||
public static final String fileName = "src/main/resources/countries.properties";
|
public static final String fileName = "src/main/resources/countries.properties";
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() throws Exception {
|
||||||
|
PrintWriter writer = new PrintWriter(fileName);
|
||||||
|
writer.print("UK\r\n" + "US\r\n" + "Germany\r\n");
|
||||||
|
writer.close();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenAppendToFileUsingGuava_thenCorrect() throws IOException {
|
public void whenAppendToFileUsingGuava_thenCorrect() throws IOException {
|
||||||
File file = new File(fileName);
|
File file = new File(fileName);
|
||||||
|
|
Loading…
Reference in New Issue