1
0
mirror of synced 2026-10-14 10:36:22 +08:00

修复阳历年12月底获取下一节气为空的问题。

This commit is contained in:
6tail
2020-10-16 09:51:26 +08:00
parent e29ab49618
commit 0d1f64664e
2 changed files with 56 additions and 0 deletions

View File

@@ -154,5 +154,23 @@ public class JieQiTest {
Assert.assertEquals("小寒", lunar.getNextJie().getName());
Assert.assertEquals("大寒", lunar.getNextQi().getName());
Assert.assertEquals("小寒", lunar.getNextJieQi().getName());
solar = Solar.fromYmd(2012,12,25);
lunar = solar.getLunar();
Assert.assertEquals("", lunar.getJie());
Assert.assertEquals("", lunar.getQi());
Assert.assertEquals("", lunar.getJieQi());
Assert.assertNull(lunar.getCurrentJie());
Assert.assertNull(lunar.getCurrentQi());
Assert.assertNull(lunar.getCurrentJieQi());
Assert.assertEquals("小寒", lunar.getNextJie().getName());
Assert.assertEquals("大寒", lunar.getNextQi().getName());
Assert.assertEquals("小寒", lunar.getNextJieQi().getName());
Assert.assertEquals("大雪", lunar.getPrevJie().getName());
Assert.assertEquals("冬至", lunar.getPrevQi().getName());
Assert.assertEquals("冬至", lunar.getPrevJieQi().getName());
}
}