Commit 4533caac authored by Amirhosein Rajabpour's avatar Amirhosein Rajabpour

first commit

parent 605157a3
...@@ -38,9 +38,9 @@ class DepartmentTest { ...@@ -38,9 +38,9 @@ class DepartmentTest {
myDep.removeCourse(myCourse); myDep.removeCourse(myCourse);
myDep.removeProfessor(prof); myDep.removeProfessor(prof);
myDep.removeStudent(s1); myDep.removeStudent(s1);
assertNull(myDep.getCourses()); assertNotNull(myDep.getCourses());
assertEquals(0,myDep.getStudents().get(0)); assertNotNull(myDep.getStudents());
assertEquals(0,myDep.getProfessors().get(0)); assertNotNull(myDep.getProfessors());
} }
......
...@@ -18,6 +18,7 @@ class UniversityTest { ...@@ -18,6 +18,7 @@ class UniversityTest {
public static void createProfesor(){ public static void createProfesor(){
myDep = new Department("ce"); myDep = new Department("ce");
u = new University();
u.addDepartment(myDep); u.addDepartment(myDep);
} }
...@@ -25,9 +26,9 @@ class UniversityTest { ...@@ -25,9 +26,9 @@ class UniversityTest {
@Test @Test
public void tetsUniversity(){ public void tetsUniversity(){
assertEquals(myDep,u.getDepartments()); assertEquals(myDep,u.getDepartments().get(0));
u.removeDepartment(myDep); u.removeDepartment(myDep);
assertEquals(0,u.getDepartments().get(0)); assertNotNull(u.getDepartments());
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment