From 09432450b7fcc607154a3e542638cc5b496df167 Mon Sep 17 00:00:00 2001 From: fdai7887 Date: Wed, 7 Feb 2024 00:50:07 +0100 Subject: [PATCH] Added test for findStudentById Method for Administration class --- src/test/java/org/example/AdministrationTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/test/java/org/example/AdministrationTest.java b/src/test/java/org/example/AdministrationTest.java index 8edf5c7..ef417e5 100644 --- a/src/test/java/org/example/AdministrationTest.java +++ b/src/test/java/org/example/AdministrationTest.java @@ -20,4 +20,16 @@ class AdministrationTest { } +@org.junit.jupiter.api.Test + + void findStudentById(){ + Administration administration = new Administration(); + Student student = new Student("Mark", "S1001", "Student"); + + administration.addStudents(student); + + Student student2 = administration.findStudentById("S1001"); + assertEquals(student, student2); + } + } \ No newline at end of file