Code formatted

This commit is contained in:
Nikunj Gandhi 2019-09-08 16:42:03 -04:00
parent f66e0d8053
commit 827c97e47b

View File

@ -37,7 +37,7 @@ public class FileWriterExampleTest {
}
System.out.println(new String(Files.readAllBytes(Path.of("src/test/resources/FileWriterTest.txt"))));
assertEquals("Hello Folks! Let us learn the Fa?ade design pattern", new String(Files.readAllBytes(Path.of("src/test/resources/FileWriterTest.txt"))));
assertEquals("Hello Folks! Let us learn the Fa?ade design pattern", new String(Files.readAllBytes(Path.of("src/test/resources/FileWriterTest.txt"))));
}
@Test
@ -112,8 +112,7 @@ public class FileWriterExampleTest {
@Test
public void testFileWriter_Constructor_With_FileDescriptor() throws FileNotFoundException, IOException {
try(FileOutputStream fos = new FileOutputStream(new File("src/test/resources/FileWriterTest.txt"));
FileWriter fileWriter = new FileWriter(fos.getFD())){
try (FileOutputStream fos = new FileOutputStream(new File("src/test/resources/FileWriterTest.txt")); FileWriter fileWriter = new FileWriter(fos.getFD())) {
fileWriter.write("Hello Folks!");
}