예제 #1
0
 @Test
 public void testMonth() throws Exception {
   boolean test = false;
   System.out.println("month begin");
   System.out.println(new Date());
   while (!test) {
     if (time.getTmonth() == 12) {
       System.out.println("Month :" + time.getTmonth());
       System.out.println(new Date());
       test = true;
     }
   }
   System.out.println("month end");
   assertTrue(time.getTmonth() == 12);
 }
예제 #2
0
 @Test
 public void testYear() throws Exception {
   boolean test = false;
   System.out.println("Year begin");
   System.out.println(new Date());
   while (!test) {
     if (time.getTyear() == 1) {
       System.out.println("Year :" + time.getTyear());
       System.out.println(new Date());
       test = true;
     }
   }
   System.out.println("year end");
   assertTrue(time.getTyear() == 1);
 }
예제 #3
0
 @Test
 public void testWeek() throws Exception {
   boolean test = false;
   System.out.println("Week begin");
   System.out.println(new Date());
   while (!test) {
     if (time.getTweek() == 48) {
       System.out.println("Week :" + time.getTweek());
       System.out.println(new Date());
       test = true;
     }
   }
   System.out.println("Week end");
   assertTrue(time.getTweek() == 48);
 }