@Test public void shouldGetDelayMinutes() { List<Integer> delayMinutes = shopService.getDelayMinutes(); assertTrue(delayMinutes.size() > 0); }
public List<Integer> getDelayMinutes() { return IntStream.range(0, MAX_INTERVAL_PERIODS) .map(period -> (period + 1) * DELAY_INTERVAL_MINUTES) .filter(this::isShopOpenInMinutes) .boxed() .collect(Collectors.toList()); }
ShopService { public List<Integer> getDelayMinutes() { return IntStream.range(0, MAX_INTERVAL_PERIODS) .map(period -> (period + 1) * DELAY_INTERVAL_MINUTES) .filter(this::isShopOpenInMinutes) .boxed() .collect(Collectors.toList()); } }
ShopService { public List<Integer> getDelayMinutes() { return IntStream.range(0, MAX_INTERVAL_PERIODS) .map(period -> (period + 1) * DELAY_INTERVAL_MINUTES) .filter(this::isShopOpenInMinutes) .boxed() .collect(Collectors.toList()); } ShopService(DynamicConfigurationService dynamicConfigurationService, HolidaysService holidaysService, OpeningHoursService openingHoursService); }
ShopService { public List<Integer> getDelayMinutes() { return IntStream.range(0, MAX_INTERVAL_PERIODS) .map(period -> (period + 1) * DELAY_INTERVAL_MINUTES) .filter(this::isShopOpenInMinutes) .boxed() .collect(Collectors.toList()); } ShopService(DynamicConfigurationService dynamicConfigurationService, HolidaysService holidaysService, OpeningHoursService openingHoursService); boolean isClosed(); boolean isDisabled(); boolean areOpeningHoursOverridden(); boolean isShopOpenInMinutes(int delayMinutes); List<Integer> getDelayMinutes(); }
ShopService { public List<Integer> getDelayMinutes() { return IntStream.range(0, MAX_INTERVAL_PERIODS) .map(period -> (period + 1) * DELAY_INTERVAL_MINUTES) .filter(this::isShopOpenInMinutes) .boxed() .collect(Collectors.toList()); } ShopService(DynamicConfigurationService dynamicConfigurationService, HolidaysService holidaysService, OpeningHoursService openingHoursService); boolean isClosed(); boolean isDisabled(); boolean areOpeningHoursOverridden(); boolean isShopOpenInMinutes(int delayMinutes); List<Integer> getDelayMinutes();  }