コード例 #1
0
 @Test
 public void testGetOneMinuteQty() throws Exception {
   BlinkCounter testClass = new BlinkCounter();
   int expectedValue = testClass.getCalendar().get(Calendar.MINUTE) % testClass.DIVISOR;
   int returnedValue = testClass.getOneMinuteQty();
   assertEquals(expectedValue, returnedValue);
 }
コード例 #2
0
 @Test
 public void testGetFiveHoursQty() throws Exception {
   BlinkCounter testClass = new BlinkCounter();
   int expectedValue = testClass.getCalendar().get(Calendar.HOUR_OF_DAY) / testClass.DIVISOR;
   int returnedValue = testClass.getFiveHoursQty();
   assertEquals(expectedValue, returnedValue);
 }