MicStudent implements IMicStudent { public String getEmail() { return email; } MicStudent(String voornaam, String achternaam); String getVoornaam(); String getAchternaam(); String getEmail(); int getId();  }
@Test public void testEmail(){ String email = student.getEmail(); assertEquals("Jawin.Netels@han.nl",email); }
@Test public void testExterneStudent(){ ExterneStudent externeStudent = new ExterneStudent("Belle","Beest","Belle.Beest@anderschool.nl",600); IMicStudent conversieStudent = new StudentAdapter(externeStudent); String email = conversieStudent.getEmail(); assertEquals("Belle.Beest@anderschool.nl",email); }
@Test public void testStudentFactoryExtern(){ IMicStudent eenStudent = StudentFactory.createStudent(StudentType.Extern,"Belle","Beest","Belle.Beest@anderschool.nl",600); String email = eenStudent.getEmail(); assertEquals("Belle.Beest@anderschool.nl",email); }
@Test public void testStudentFactoryIntern(){ IMicStudent eenStudent = StudentFactory.createStudent(StudentType.Intern,"Belle","Beest","Belle.Beest@anderschool.nl",600); String email = eenStudent.getEmail(); assertEquals("Belle.Beest@han.nl",email); }