test_class.file: siri/gtfs_reader/src/test/java/il/org/hasadna/siri_client/gtfs/crud/CalendarCrudTest.java
test_class.identifier: CalendarCrudTest
test_case.body: @Test
  	public void testgetRelevantCalendarItems() throws IOException {
  		// prepare
  		BaseCalendar c1 = new BaseCalendar(new ServiceId("1"), EnumSet.of(DayOfWeek.SUNDAY, DayOfWeek.MONDAY),
  				LocalDate.of(2017, 1, 1), LocalDate.of(2018, 1, 1));
  		BaseCalendar c2 = new BaseCalendar(new ServiceId("2"), EnumSet.of(DayOfWeek.SUNDAY), LocalDate.of(2017, 1, 1),
  				LocalDate.of(2018, 1, 1)); // wrong day
  		BaseCalendar c3 = new BaseCalendar(new ServiceId("3"), EnumSet.of(DayOfWeek.SUNDAY, DayOfWeek.THURSDAY),
  				LocalDate.of(2017, 1, 1), LocalDate.of(2018, 1, 1)); // // wrong day
  		BaseCalendar c4 = new BaseCalendar(new ServiceId("4"), EnumSet.of(DayOfWeek.SUNDAY), LocalDate.of(2017, 1, 1),
  				LocalDate.of(2017, 4, 1)); // not in dates range
  		BaseCalendar c5 = new BaseCalendar(new ServiceId("5"), EnumSet.of(DayOfWeek.SUNDAY), LocalDate.of(2017, 6, 1),
  				LocalDate.of(2018, 1, 1));// not in dates range
  
  		CalendarCrud calendarCrud = new CalendarCrud(
  				Paths.get("src/test/resources/siri_client/gtfs/cruds/min_calendar.txt")) {
  			@Override
  			public Stream<Calendar> ReadAll() throws IOException {
  				return Arrays.asList(c1, c2, c3, c4, c5).stream().map(i -> (Calendar) i);
  			}
  		};
  
  		LocalDate currentDate = LocalDate.of(2017, 5, 1); // Monday
  
  		// expected
  		List<BaseCalendar> expected = Arrays.asList(c1);
  
  		// Execute
  		List<Calendar> actual = calendarCrud.getRelevantCalendarItems(currentDate).collect(Collectors.toList());
  
  		// Test
  		assertEquals(expected, actual);
  
  	}
test_case.class_method_signature: CalendarCrudTest.testgetRelevantCalendarItems()
test_case.full_signature: @Test public void testgetRelevantCalendarItems()
test_case.identifier: testgetRelevantCalendarItems
test_case.invocations: of of of of of of of of of of of of of of of get map stream asList of asList collect getRelevantCalendarItems toList assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testgetRelevantCalendarItems()
focal_class.file: siri/gtfs_reader/src/main/java/il/org/hasadna/siri_client/gtfs/crud/CalendarCrud.java
focal_class.identifier: CalendarCrud
focal_class.class_method_signature: CalendarCrud.CalendarCrud(Path file)
focal_class.full_signature: public  CalendarCrud(Path file)
focal_class.identifier: CalendarCrud
focal_class.modifiers: public
focal_class.parameters: (Path file)
focal_class.signature:  CalendarCrud(Path file)
focal_class.class_method_signature: CalendarCrud.parseLine(String string)
focal_class.full_signature: @Override Calendar parseLine(String string)
focal_class.identifier: parseLine
focal_class.modifiers: @Override
focal_class.parameters: (String string)
focal_class.return: Calendar
focal_class.signature: Calendar parseLine(String string)
focal_class.class_method_signature: CalendarCrud.getRelevantCalendarItems(LocalDate currentDate)
focal_class.full_signature: public Stream<Calendar> getRelevantCalendarItems(LocalDate currentDate)
focal_class.identifier: getRelevantCalendarItems
focal_class.modifiers: public
focal_class.parameters: (LocalDate currentDate)
focal_class.return: Stream<Calendar>
focal_class.signature: Stream<Calendar> getRelevantCalendarItems(LocalDate currentDate)
focal_class.superclass: extends AbstractFileCrud<Calendar>
focal_method.body: public Stream<Calendar> getRelevantCalendarItems(LocalDate currentDate) throws IOException {
  
  		return ReadAll().filter(c -> c.getStartDate()
  				.compareTo(currentDate) < 0)
  				.filter(c -> c.getEndDate()
  						.compareTo(currentDate) > 0)
  				.filter(c -> c.isDayValid(currentDate.getDayOfWeek()));
  	}
focal_method.class_method_signature: CalendarCrud.getRelevantCalendarItems(LocalDate currentDate)
focal_method.full_signature: public Stream<Calendar> getRelevantCalendarItems(LocalDate currentDate)
focal_method.identifier: getRelevantCalendarItems
focal_method.invocations: filter filter filter ReadAll compareTo getStartDate compareTo getEndDate isDayValid getDayOfWeek
focal_method.modifiers: public
focal_method.parameters: (LocalDate currentDate)
focal_method.return: Stream<Calendar>
focal_method.signature: Stream<Calendar> getRelevantCalendarItems(LocalDate currentDate)