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

Method testFromSunday

src/test/java/test/WeekTest.java:31–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 }
30
31 @Test
32 public void testFromSunday(){
33 //一周的开始从星期日开始计
34 int start = 0;
35 SolarWeek week = new SolarWeek(2019,5,1,start);
36 Assert.assertEquals("2019.5.1",week.toString());
37 Assert.assertEquals("2019年5月第1周",week.toFullString());
38 //当月共几周
39 Assert.assertEquals(5,SolarUtil.getWeeksOfMonth(week.getYear(),week.getMonth(),start));
40 //当周第一天
41 Assert.assertEquals("2019-04-28",week.getFirstDay().toString());
42 //当周第一天(本月)
43 Assert.assertEquals("2019-05-01",week.getFirstDayInMonth().toString());
44 }
45
46 @Test
47 public void test1(){

Callers

nothing calls this directly

Calls 8

toStringMethod · 0.95
toFullStringMethod · 0.95
getWeeksOfMonthMethod · 0.95
getYearMethod · 0.95
getMonthMethod · 0.95
getFirstDayMethod · 0.95
getFirstDayInMonthMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected