This commit is contained in:
Looly
2021-06-17 18:52:19 +08:00
parent b9cf8b0c5b
commit 5302edf980
3 changed files with 10 additions and 12 deletions

View File

@@ -1,15 +1,14 @@
package cn.hutool.cron.pattern;
import cn.hutool.core.date.DateUtil;
import org.junit.Assert;
import org.junit.Test;
import java.util.Date;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import cn.hutool.core.date.DateUtil;
public class CronPatternUtilTest {
@Test
public void matchedDatesTest() {
//测试每30秒执行
@@ -21,7 +20,7 @@ public class CronPatternUtilTest {
Assert.assertEquals("2018-10-15 14:35:00", matchedDates.get(3).toString());
Assert.assertEquals("2018-10-15 14:35:30", matchedDates.get(4).toString());
}
@Test
public void matchedDatesTest2() {
//测试每小时执行
@@ -33,7 +32,7 @@ public class CronPatternUtilTest {
Assert.assertEquals("2018-10-15 18:00:00", matchedDates.get(3).toString());
Assert.assertEquals("2018-10-15 19:00:00", matchedDates.get(4).toString());
}
@Test
public void matchedDatesTest3() {
//测试最后一天