From af237c01d275adbf259320173eb482013cf93de4 Mon Sep 17 00:00:00 2001 From: Tobias Herbert Date: Tue, 6 Feb 2024 22:00:54 +0100 Subject: [PATCH] refactoring: AdminTestClass --- src/test/java/org/example/AdminTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/example/AdminTest.java b/src/test/java/org/example/AdminTest.java index f844ece..e8fa2fa 100644 --- a/src/test/java/org/example/AdminTest.java +++ b/src/test/java/org/example/AdminTest.java @@ -36,10 +36,11 @@ class AdminTest { admin.writeToFile(admin, filename); - String content = Files.readString(Path.of(filename)); + Path path = Path.of(filename); + String content = Files.readString(path); assertEquals("Simon\nA1001\nAdmin", content); - Files.delete(Path.of(filename)); + Files.delete(path); }