MCPcopy Create free account
hub / github.com/6tail/lunar-java / testGanZhi2

Method testGanZhi2

src/test/java/test/BaZiTest.java:29–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 }
28
29 @Test
30 public void testGanZhi2() {
31 Solar solar = new Solar(1988, 2, 15, 23, 30, 0);
32 Lunar lunar = solar.getLunar();
33 EightChar eightChar = lunar.getEightChar();
34 Assert.assertEquals("年柱", "戊辰", eightChar.getYear());
35 Assert.assertEquals("月柱", "甲寅", eightChar.getMonth());
36 Assert.assertEquals("日柱", "庚子", eightChar.getDay());
37 Assert.assertEquals("时柱", "戊子", eightChar.getTime());
38
39 eightChar.setSect(1);
40 Assert.assertEquals("年柱", "戊辰", eightChar.getYear());
41 Assert.assertEquals("月柱", "甲寅", eightChar.getMonth());
42 Assert.assertEquals("日柱", "辛丑", eightChar.getDay());
43 Assert.assertEquals("时柱", "戊子", eightChar.getTime());
44
45 solar = new Solar(1988, 2, 15, 22, 30, 0);
46 lunar = solar.getLunar();
47 eightChar = lunar.getEightChar();
48 Assert.assertEquals("年柱", "戊辰", eightChar.getYear());
49 Assert.assertEquals("月柱", "甲寅", eightChar.getMonth());
50 Assert.assertEquals("日柱", "庚子", eightChar.getDay());
51 Assert.assertEquals("时柱", "丁亥", eightChar.getTime());
52
53 solar = new Solar(1988, 2, 2, 22, 30, 0);
54 lunar = solar.getLunar();
55 eightChar = lunar.getEightChar();
56 Assert.assertEquals("年柱", "丁卯", eightChar.getYear());
57 Assert.assertEquals("月柱", "癸丑", eightChar.getMonth());
58 Assert.assertEquals("日柱", "丁亥", eightChar.getDay());
59 Assert.assertEquals("时柱", "辛亥", eightChar.getTime());
60 }
61
62 @Test
63 public void testGanZhi3(){

Callers

nothing calls this directly

Calls 7

getLunarMethod · 0.95
getEightCharMethod · 0.95
getYearMethod · 0.95
getMonthMethod · 0.95
getDayMethod · 0.95
getTimeMethod · 0.95
setSectMethod · 0.95

Tested by

no test coverage detected