@Test public void testIsOverPaymentLimitTour04() { TourInfo tour = new TourInfo(); DateTime depDay = now.withTime(0, 0, 0, 0).plusDays(7); tour.setDepDay(depDay.toDate()); when(dateFactory.newDateTime()).thenReturn(now.withTime(0, 0, 0, 0) .plusHours(23).plusMinutes(59).plusSeconds(59).plusMillis(999)); boolean result = tourInfoSharedService.isOverPaymentLimit(tour); assertThat(result, is(false)); }
@Override public boolean isOverPaymentLimit(TourInfo tour) { Assert.notNull(tour, "tour must not be null"); DateTime today = dateFactory.newDateTime().withTime(0, 0, 0, 0); DateTime paymentLimit = tour.getPaymentLimit(); log.debug("today={}, paymentLimit={}", today, paymentLimit); return today.isAfter(paymentLimit); }
TourInfoSharedServiceImpl implements TourInfoSharedService { @Override public boolean isOverPaymentLimit(TourInfo tour) { Assert.notNull(tour, "tour must not be null"); DateTime today = dateFactory.newDateTime().withTime(0, 0, 0, 0); DateTime paymentLimit = tour.getPaymentLimit(); log.debug("today={}, paymentLimit={}", today, paymentLimit); return today.isAfter(paymentLimit); } }
TourInfoSharedServiceImpl implements TourInfoSharedService { @Override public boolean isOverPaymentLimit(TourInfo tour) { Assert.notNull(tour, "tour must not be null"); DateTime today = dateFactory.newDateTime().withTime(0, 0, 0, 0); DateTime paymentLimit = tour.getPaymentLimit(); log.debug("today={}, paymentLimit={}", today, paymentLimit); return today.isAfter(paymentLimit); }  }
TourInfoSharedServiceImpl implements TourInfoSharedService { @Override public boolean isOverPaymentLimit(TourInfo tour) { Assert.notNull(tour, "tour must not be null"); DateTime today = dateFactory.newDateTime().withTime(0, 0, 0, 0); DateTime paymentLimit = tour.getPaymentLimit(); log.debug("today={}, paymentLimit={}", today, paymentLimit); return today.isAfter(paymentLimit); }  @Override TourInfo findOneWithDetails(String tourCode); @Override boolean isOverPaymentLimit(TourInfo tour); @Override TourInfo findOneWithDetailsForUpdate(String tourCode); }
TourInfoSharedServiceImpl implements TourInfoSharedService { @Override public boolean isOverPaymentLimit(TourInfo tour) { Assert.notNull(tour, "tour must not be null"); DateTime today = dateFactory.newDateTime().withTime(0, 0, 0, 0); DateTime paymentLimit = tour.getPaymentLimit(); log.debug("today={}, paymentLimit={}", today, paymentLimit); return today.isAfter(paymentLimit); }  @Override TourInfo findOneWithDetails(String tourCode); @Override boolean isOverPaymentLimit(TourInfo tour); @Override TourInfo findOneWithDetailsForUpdate(String tourCode);  }