コード例 #1
0
  @Test(expected = UpdateException.class)
  public void rescheduleErroneousTriggers_should_throw_exception_when_cant_getPlatformAccessor()
      throws Exception {
    doThrow(new IOException()).when(platformAPI).getPlatformAccessor();

    platformAPI.rescheduleErroneousTriggers();
  }
コード例 #2
0
  @Test
  public void rescheduleErroneousTriggers_should_call_rescheduleErroneousTriggers()
      throws Exception {
    platformAPI.rescheduleErroneousTriggers();

    verify(schedulerService).rescheduleErroneousTriggers();
  }
コード例 #3
0
  @Test(expected = UpdateException.class)
  public void
      rescheduleErroneousTriggers_should_throw_exception_when_rescheduleErroneousTriggers_failed()
          throws Exception {
    doThrow(new SSchedulerException("failed")).when(schedulerService).rescheduleErroneousTriggers();

    platformAPI.rescheduleErroneousTriggers();
  }