@Test public void getLectureList() { String generatedLecturesAsString = courseDescriptionBuilder.getLectureList(lecturers); assertEquals("Wrong lecture list", LECTURE_SOLL, generatedLecturesAsString); }
protected String getLectureList(List<Identity> lecturers) { StringBuilder builder = new StringBuilder(); boolean firstEntry = true; for (Identity lecture : lecturers) { if (!firstEntry) { builder.append(", "); } builder.append(lecture.getAttributes().getFirstName()); builder.append(" "); builder.append(lecture.getAttributes().getLastName()); firstEntry = false; } return builder.toString(); }
CourseDescriptionBuilder { protected String getLectureList(List<Identity> lecturers) { StringBuilder builder = new StringBuilder(); boolean firstEntry = true; for (Identity lecture : lecturers) { if (!firstEntry) { builder.append(", "); } builder.append(lecture.getAttributes().getFirstName()); builder.append(" "); builder.append(lecture.getAttributes().getLastName()); firstEntry = false; } return builder.toString(); } }
CourseDescriptionBuilder { protected String getLectureList(List<Identity> lecturers) { StringBuilder builder = new StringBuilder(); boolean firstEntry = true; for (Identity lecture : lecturers) { if (!firstEntry) { builder.append(", "); } builder.append(lecture.getAttributes().getFirstName()); builder.append(" "); builder.append(lecture.getAttributes().getLastName()); firstEntry = false; } return builder.toString(); } CourseDescriptionBuilder(); }
CourseDescriptionBuilder { protected String getLectureList(List<Identity> lecturers) { StringBuilder builder = new StringBuilder(); boolean firstEntry = true; for (Identity lecture : lecturers) { if (!firstEntry) { builder.append(", "); } builder.append(lecture.getAttributes().getFirstName()); builder.append(" "); builder.append(lecture.getAttributes().getLastName()); firstEntry = false; } return builder.toString(); } CourseDescriptionBuilder(); String buildDescriptionFrom(CampusCourseImportTO campusCourseData, String language); String buildDescriptionFrom(CampusCourseImportTO campusCourseData, String campusCourseMultiSemester, String language); }
CourseDescriptionBuilder { protected String getLectureList(List<Identity> lecturers) { StringBuilder builder = new StringBuilder(); boolean firstEntry = true; for (Identity lecture : lecturers) { if (!firstEntry) { builder.append(", "); } builder.append(lecture.getAttributes().getFirstName()); builder.append(" "); builder.append(lecture.getAttributes().getLastName()); firstEntry = false; } return builder.toString(); } CourseDescriptionBuilder(); String buildDescriptionFrom(CampusCourseImportTO campusCourseData, String language); String buildDescriptionFrom(CampusCourseImportTO campusCourseData, String campusCourseMultiSemester, String language);  }