From 1ce94ba809748c242a1542040abc7ca3cd64733c Mon Sep 17 00:00:00 2001 From: Tobias Herbert Date: Thu, 8 Feb 2024 16:37:28 +0100 Subject: [PATCH] refactoring: adjusting test functions to the naming conventions in class AdminTest --- src/test/java/org/example/AdminTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/example/AdminTest.java b/src/test/java/org/example/AdminTest.java index 890fed2..b6b50a2 100644 --- a/src/test/java/org/example/AdminTest.java +++ b/src/test/java/org/example/AdminTest.java @@ -30,7 +30,7 @@ class AdminTest { //Tests printAdminInfo Method @org.junit.jupiter.api.Test - void printAdminInfo() { + void testPrintAdminInfo() { Admin admin = new Admin("Aaron", "A1001", "Admin"); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); @@ -47,7 +47,7 @@ class AdminTest { } //Tests writeToFile Method @Test - void writeToFile() throws IOException { + void testWriteToFile() throws IOException { Admin admin = new Admin("Simon", "A1001", "Admin") ; admin.writeToFile(admin, fileName()); @@ -59,7 +59,7 @@ class AdminTest { } //Tests readFromFile Method @Test - void readFromFile() throws IOException { + void testReadFromFile() throws IOException { try (PrintWriter writer = new PrintWriter(new FileWriter("testAdminData.txt"))){ writer.println("Thomas");