@Test public void testSetCourses() { List<Course> l = new ArrayList<>(); l.add(new Course("aaa")); dao.setCourses(l); assertEquals(1, dao.getCourses().size()); }
public void setCourses(List<Course> courses) { this.courses = courses; dataSource.save(courses); }
CourseDAO { public void setCourses(List<Course> courses) { this.courses = courses; dataSource.save(courses); } }
CourseDAO { public void setCourses(List<Course> courses) { this.courses = courses; dataSource.save(courses); } CourseDAO(DataSource<Course> dataSource); }
CourseDAO { public void setCourses(List<Course> courses) { this.courses = courses; dataSource.save(courses); } CourseDAO(DataSource<Course> dataSource); void loadCourses(); List<Course> getCourses(); void setCourses(List<Course> courses); void updateCourse(Course course); Course getCurrentCourse(Settings settings); Course getCourseByName(String name); }
CourseDAO { public void setCourses(List<Course> courses) { this.courses = courses; dataSource.save(courses); } CourseDAO(DataSource<Course> dataSource); void loadCourses(); List<Course> getCourses(); void setCourses(List<Course> courses); void updateCourse(Course course); Course getCurrentCourse(Settings settings); Course getCourseByName(String name);  }