|
|
@ -30,7 +30,7 @@ class StudentTest { |
|
|
|
private static final Student sampleStudent = new Student("Sebastian Reichard", "S1001", "Student"); |
|
|
|
|
|
|
|
@org.junit.jupiter.api.Test |
|
|
|
void writeToFile() throws IOException { |
|
|
|
void testWriteToFile() throws IOException { |
|
|
|
Student student = sampleStudent; |
|
|
|
|
|
|
|
// String filename = "testStudentData.txt"; |
|
|
@ -46,7 +46,7 @@ class StudentTest { |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void readFromFile() throws IOException { |
|
|
|
void testReadFromFile() throws IOException { |
|
|
|
|
|
|
|
try (PrintWriter writer = new PrintWriter(new FileWriter("testStudentData.txt"))){ |
|
|
|
writer.println("Sebastian Reichard"); |
|
|
|