Skip to content

Commit 1a368ca

Browse files
author
Ahmed Tawila
committed
fix test failures
1 parent 53074cd commit 1a368ca

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎core-java/src/test/java/com/baeldung/file/GuavaTest.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.io.PrintWriter;
99

1010
import org.junit.After;
11+
import org.junit.Before;
1112
import org.junit.Test;
1213

1314
import com.baeldung.util.StreamUtils;
@@ -19,6 +20,13 @@
1920
public class GuavaTest {
2021

2122
public static final String fileName = "src/main/resources/countries.properties";
23+
24+
@Before
25+
public void setup() throws Exception {
26+
PrintWriter writer = new PrintWriter(fileName);
27+
writer.print("UK\r\n" + "US\r\n" + "Germany\r\n");
28+
writer.close();
29+
}
2230

2331
@Test
2432
public void whenAppendToFileUsingGuava_thenCorrect() throws IOException {

0 commit comments

Comments
 (0)