Agile Javaв„ў: Crafting Code with Test-Driven Development
CourseSession will need to store a new attributea collection of Student objects. You will want to bolster your CourseSession creation test so that it says something about this new attribute. If you have just created a new course session, you haven't yet enrolled any students in it. What can you assert against an empty course session? Modify testCreate so that it contains the bolded assertion: public void testCreate() { CourseSession session = new CourseSession("ENGL", "101"); assertEquals("ENGL", session.getDepartment()); assertEquals("101", session.getNumber()); assertEquals(0, session.getNumberOfStudents()); } |