刘光辉
昨天 bb638871a7fb692d80f1b7a758f991dc0879002c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package jnpf.limsService.support;
 
import java.time.LocalDate;
import java.util.Arrays;
import java.util.List;
 
public class LimsSxtQuyangJihuaRenwuPlannerChecks {
    public static void main(String[] args) {
        assertEquals(Arrays.asList(LocalDate.of(2026, 7, 1), LocalDate.of(2026, 7, 3), LocalDate.of(2026, 7, 5)),
                LimsSxtQuyangJihuaRenwuPlanner.executionDates(
                        LocalDate.of(2026, 7, 1), LocalDate.of(2026, 7, 5), "daily", 1));
        assertEquals(Arrays.asList(LocalDate.of(2026, 1, 31), LocalDate.of(2026, 2, 28), LocalDate.of(2026, 3, 31)),
                LimsSxtQuyangJihuaRenwuPlanner.executionDates(
                        LocalDate.of(2026, 1, 31), LocalDate.of(2026, 3, 31), "monthly", 0));
        assertEquals(Arrays.asList(LocalDate.of(2024, 2, 29), LocalDate.of(2025, 2, 28), LocalDate.of(2026, 2, 28)),
                LimsSxtQuyangJihuaRenwuPlanner.executionDates(
                        LocalDate.of(2024, 2, 29), LocalDate.of(2026, 2, 28), "yearly", 0));
    }
 
    private static void assertEquals(List<LocalDate> expected, List<LocalDate> actual) {
        if (!expected.equals(actual)) {
            throw new AssertionError("expected " + expected + " but was " + actual);
        }
    }
}