v1.2.27 修复立春比春节早时年九星的错误;新增阳历月中获取周。
This commit is contained in:
26
src/test/java/test/NineStarTest.java
Normal file
26
src/test/java/test/NineStarTest.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package test;
|
||||
|
||||
import com.nlf.calendar.Lunar;
|
||||
import com.nlf.calendar.Solar;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class NineStarTest {
|
||||
@Test
|
||||
public void test1() {
|
||||
Lunar lunar = Solar.fromYmd(1985, 2, 19).getLunar();
|
||||
Assert.assertEquals("六", lunar.getYearNineStar().getNumber());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test2() {
|
||||
Lunar lunar = Lunar.fromYmd(2022, 1, 1);
|
||||
Assert.assertEquals("六白金开阳", lunar.getYearNineStar().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test3() {
|
||||
Lunar lunar = Lunar.fromYmd(2033, 1, 1);
|
||||
Assert.assertEquals("四绿木天权", lunar.getYearNineStar().toString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user