Browse Source

documentation: AdministrationTest and AdminTest

remotes/origin/fdai7780
Tobias Herbert 11 months ago
parent
commit
d2146298c6
  1. 6
      src/test/java/org/example/AdminTest.java
  2. 1
      src/test/java/org/example/AdministrationTest.java

6
src/test/java/org/example/AdminTest.java

@ -10,7 +10,7 @@ import java.util.List;
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.*;
class AdminTest { class AdminTest {
//Tests printAdminInfo Method
@org.junit.jupiter.api.Test @org.junit.jupiter.api.Test
void printAdminInfo() { void printAdminInfo() {
Admin admin = new Admin("Aaron", "A1001", "Admin"); Admin admin = new Admin("Aaron", "A1001", "Admin");
@ -27,7 +27,7 @@ class AdminTest {
assertTrue(printedOutput.contains("Admin")); assertTrue(printedOutput.contains("Admin"));
} }
//Tests writeToFile Method
@Test @Test
void writeToFile() throws IOException { void writeToFile() throws IOException {
Admin admin = new Admin("Simon", "A1001", "Admin") ; Admin admin = new Admin("Simon", "A1001", "Admin") ;
@ -43,7 +43,7 @@ class AdminTest {
Files.delete(path); Files.delete(path);
} }
//Tests readFromFile Method
@Test @Test
void readFromFile() throws IOException { void readFromFile() throws IOException {

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

@ -6,6 +6,7 @@ import static org.junit.jupiter.api.Assertions.*;
class AdministrationTest { class AdministrationTest {
// Test the findProfessorById Method
@Test @Test
void findProfessorById() { void findProfessorById() {
Administration administration = new Administration(); Administration administration = new Administration();

Loading…
Cancel
Save