avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject cvs commit: avalon-cornerstone/src/test/org/apache/avalon/cornerstone/services/scheduler/test CronTimeTriggerTestCase.java
Date Tue, 25 Feb 2003 10:17:10 GMT
giacomo     2003/02/25 02:17:10

  Modified:    src/test/org/apache/avalon/cornerstone/services/scheduler/test
                        CronTimeTriggerTestCase.java
  Log:
  
  
  Revision  Changes    Path
  1.6       +9 -2      avalon-cornerstone/src/test/org/apache/avalon/cornerstone/services/scheduler/test/CronTimeTriggerTestCase.java
  
  Index: CronTimeTriggerTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-cornerstone/src/test/org/apache/avalon/cornerstone/services/scheduler/test/CronTimeTriggerTestCase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -d -b -u -r1.5 -r1.6
  --- CronTimeTriggerTestCase.java	19 Jan 2003 13:40:20 -0000	1.5
  +++ CronTimeTriggerTestCase.java	25 Feb 2003 10:17:10 -0000	1.6
  @@ -367,7 +367,14 @@
   
           long time = now.getTime().getTime();
           long next = trigger.getTimeAfter( time );
  +        int year =  now.get( Calendar.YEAR ) + 1;
   
  -        assertTrue(next > time );
  +        now.setTime( new Date( next ) );
  +
  +        assertEquals( "Second", now.get( Calendar.SECOND ), 0 );
  +        assertEquals( "Minute", now.get( Calendar.MINUTE ), 51 );
  +        assertEquals( "Hour of Day", now.get( Calendar.HOUR_OF_DAY ), 5 );
  +        assertEquals( "Month", now.get( Calendar.MONTH ), Calendar.JANUARY );
  +        assertEquals( "Year", now.get( Calendar.YEAR ), year );
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message