()
| 236 | } |
| 237 | } |
| 238 | @Test |
| 239 | public void testLunarTimeGan(){ |
| 240 | for(Map.Entry<String,String> entry:GAN.entrySet()){ |
| 241 | int hour = 0,minute = 0; |
| 242 | String time = entry.getKey(); |
| 243 | int year = Integer.parseInt(time.substring(0,4)); |
| 244 | int month = Integer.parseInt(time.substring(4,time.indexOf(","))); |
| 245 | int day = Integer.parseInt(time.substring(time.indexOf(",")+1,time.lastIndexOf(","))); |
| 246 | String hm = time.substring(time.lastIndexOf(",")+1); |
| 247 | if(hm.length()>=5){ |
| 248 | hour = Integer.parseInt(hm.substring(0,2),10); |
| 249 | minute = Integer.parseInt(hm.substring(3,5),10); |
| 250 | } |
| 251 | Lunar lunar = Lunar.fromYmdHms(year,month,day,hour,minute,0); |
| 252 | String gan = entry.getValue(); |
| 253 | Assert.assertEquals(lunar.getYear()+"年"+lunar.getMonthInChinese()+"月"+lunar.getDayInChinese()+" "+hm, gan, lunar.getTimeGan()); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | |
| 258 | @Test |
nothing calls this directly
no test coverage detected