1
0
mirror of synced 2026-10-16 11:36:11 +08:00

v1.2.3 修复除夕错误;代码优化。

This commit is contained in:
6tail
2021-06-01 21:38:30 +08:00
parent dffee267c0
commit d65f6852e9
6 changed files with 51 additions and 26 deletions

View File

@@ -125,6 +125,31 @@ public class LunarTest {
Assert.assertEquals("2020-01-06",lunar.getSolar().toString());
}
@Test
public void test18(){
Lunar lunar = new Lunar(2021,12,29);
Assert.assertEquals("除夕",lunar.getFestivals().get(0));
}
@Test
public void test19(){
Lunar lunar = new Lunar(2020,12,30);
Assert.assertEquals("除夕",lunar.getFestivals().get(0));
}
@Test
public void test20(){
Lunar lunar = new Lunar(2020,12,29);
Assert.assertEquals(0,lunar.getFestivals().size());
}
@Test
public void test21(){
Solar solar = Solar.fromYmd(2022, 1, 31);
Lunar lunar = solar.getLunar();
Assert.assertEquals("除夕",lunar.getFestivals().get(0));
}
@Test
public void testNext(){
Solar solar = new Solar(2020,1,10,12,0,0);