コード例 #1
0
  @Test
  public void testProcessed() throws Exception {
    RoundRobinSchedulerStats stats = new RoundRobinSchedulerStats();
    assertEquals("Wrong default value.", 0, stats.getProcessedItemCount());

    stats.incrementProcessed();
    assertEquals("Wrong incremented value.", 1, stats.getProcessedItemCount());
    stats.incrementProcessed();
    assertEquals("Wrong incremented value.", 2, stats.getProcessedItemCount());
    stats.incrementProcessed();
    assertEquals("Wrong incremented value.", 3, stats.getProcessedItemCount());
  }