@Test(expected = NullPointerException.class) public void convert_XSettings() { converter.convert("XYZ", null); }
@Override public DayPeriod convert(String value, XSettings xsettings) { Preconditions.checkNotNull(value); Preconditions.checkNotNull(xsettings); LocalDate startDate = SearchDateTimeUtils.convertISOStringToDate(value); Period period = xdateRangeUtils.getDateRange(xsettings).getGap(); LocalDate endDate = xdateRangeUtils.generateEndDate(startDate, period); return new DayPeriod(new SimpleLocalDate(startDate), new SimpleLocalDate(endDate)); }
FacetDayPeriodValueConverter implements FacetValueConverter { @Override public DayPeriod convert(String value, XSettings xsettings) { Preconditions.checkNotNull(value); Preconditions.checkNotNull(xsettings); LocalDate startDate = SearchDateTimeUtils.convertISOStringToDate(value); Period period = xdateRangeUtils.getDateRange(xsettings).getGap(); LocalDate endDate = xdateRangeUtils.generateEndDate(startDate, period); return new DayPeriod(new SimpleLocalDate(startDate), new SimpleLocalDate(endDate)); } }
FacetDayPeriodValueConverter implements FacetValueConverter { @Override public DayPeriod convert(String value, XSettings xsettings) { Preconditions.checkNotNull(value); Preconditions.checkNotNull(xsettings); LocalDate startDate = SearchDateTimeUtils.convertISOStringToDate(value); Period period = xdateRangeUtils.getDateRange(xsettings).getGap(); LocalDate endDate = xdateRangeUtils.generateEndDate(startDate, period); return new DayPeriod(new SimpleLocalDate(startDate), new SimpleLocalDate(endDate)); }  }
FacetDayPeriodValueConverter implements FacetValueConverter { @Override public DayPeriod convert(String value, XSettings xsettings) { Preconditions.checkNotNull(value); Preconditions.checkNotNull(xsettings); LocalDate startDate = SearchDateTimeUtils.convertISOStringToDate(value); Period period = xdateRangeUtils.getDateRange(xsettings).getGap(); LocalDate endDate = xdateRangeUtils.generateEndDate(startDate, period); return new DayPeriod(new SimpleLocalDate(startDate), new SimpleLocalDate(endDate)); }  @Override DayPeriod convert(String value, XSettings xsettings); @Override boolean handles(XSettings xsettings); @Autowired void setXdateRangeUtils(XDateRangeUtils xdateRangeUtils); }
FacetDayPeriodValueConverter implements FacetValueConverter { @Override public DayPeriod convert(String value, XSettings xsettings) { Preconditions.checkNotNull(value); Preconditions.checkNotNull(xsettings); LocalDate startDate = SearchDateTimeUtils.convertISOStringToDate(value); Period period = xdateRangeUtils.getDateRange(xsettings).getGap(); LocalDate endDate = xdateRangeUtils.generateEndDate(startDate, period); return new DayPeriod(new SimpleLocalDate(startDate), new SimpleLocalDate(endDate)); }  @Override DayPeriod convert(String value, XSettings xsettings); @Override boolean handles(XSettings xsettings); @Autowired void setXdateRangeUtils(XDateRangeUtils xdateRangeUtils);  }