Code formatted
This commit is contained in:
parent
f66e0d8053
commit
827c97e47b
@ -37,7 +37,7 @@ public class FileWriterExampleTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
System.out.println(new String(Files.readAllBytes(Path.of("src/test/resources/FileWriterTest.txt"))));
|
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
|
@Test
|
||||||
@ -112,8 +112,7 @@ public class FileWriterExampleTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFileWriter_Constructor_With_FileDescriptor() throws FileNotFoundException, IOException {
|
public void testFileWriter_Constructor_With_FileDescriptor() throws FileNotFoundException, IOException {
|
||||||
try(FileOutputStream fos = new FileOutputStream(new File("src/test/resources/FileWriterTest.txt"));
|
try (FileOutputStream fos = new FileOutputStream(new File("src/test/resources/FileWriterTest.txt")); FileWriter fileWriter = new FileWriter(fos.getFD())) {
|
||||||
FileWriter fileWriter = new FileWriter(fos.getFD())){
|
|
||||||
fileWriter.write("Hello Folks!");
|
fileWriter.write("Hello Folks!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user