Browse Source

Finalizing documentation in AdministrationTest file

remotes/origin/fdai7780
fdai7921 11 months ago
parent
commit
6cc661011f
  1. 12
      src/test/java/org/example/AdministrationTest.java

12
src/test/java/org/example/AdministrationTest.java

@ -72,6 +72,10 @@ class AdministrationTest {
assertEquals(student, student2);
}
/**
* Test case for the addCourse method.
* Adds a course to the Administration instance and checks if it can be found by its ID.
*/
@Test
void addCourse() {
Administration admin = new Administration();
@ -80,6 +84,10 @@ class AdministrationTest {
assertEquals(course, admin.findCourseByID("M101"));
}
/**
* Test case for the deleteCourse method.
* Adds a course, deletes it, and checks if it's no longer found.
*/
@Test
public void testDeleteCourse() {
Administration administration = new Administration();
@ -94,6 +102,10 @@ class AdministrationTest {
assertNull(administration.findCourseByID("M101"));
}
/**
* Test case for the findCourseByID method.
* Adds a course and checks if it can be found by its ID.
*/
@Test
public void testFindCourseByID() {
Administration administration = new Administration();

Loading…
Cancel
Save