|
|
|
@ -52,6 +52,10 @@ public class DependentUtilsTest {
|
|
|
|
|
public void getDateIntervalList() { |
|
|
|
|
|
|
|
|
|
Date curDay = DateUtils.stringToDate("2019-02-05 00:00:00"); |
|
|
|
|
|
|
|
|
|
DateInterval diCur = new DateInterval(DateUtils.getStartOfDay(curDay), |
|
|
|
|
DateUtils.getEndOfDay(curDay)); |
|
|
|
|
|
|
|
|
|
Date day1 = DateUtils.stringToDate("2019-02-04 00:00:00"); |
|
|
|
|
DateInterval di1 = new DateInterval(DateUtils.getStartOfDay(day1), |
|
|
|
|
DateUtils.getEndOfDay(day1)); |
|
|
|
@ -70,6 +74,13 @@ public class DependentUtilsTest {
|
|
|
|
|
|
|
|
|
|
Assert.assertEquals(dateIntervals.get(1), di1); |
|
|
|
|
Assert.assertEquals(dateIntervals.get(0), di2); |
|
|
|
|
|
|
|
|
|
dateValue = "today"; |
|
|
|
|
dateIntervals = DependentUtils.getDateIntervalList(curDay, dateValue); |
|
|
|
|
Assert.assertEquals(dateIntervals.get(0), diCur); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|