@Test(expected = IllegalStateException.class) public void execute_without_an_implementation_should_throw_an_IllegalStateException() { new DefaultRetryable().executeWith(retryExecutor()); } }
@Test(expected = RuntimeException.class) @SuppressWarnings("unchecked") public void execute_should_unwrap_RetryGiveupException_but_rewrap_checked_exception_in_a_RuntimeException() { new DefaultRetryable(Deny.until(4).with(new Exception("A checked exception"))) .executeWith(retryExecutor().withRetryLimit(3)); }
@Test(expected = Deny.class) @SuppressWarnings("unchecked") public void execute_should_unwrap_RetryGiveupException() throws Exception { new DefaultRetryable(Deny.until(4)) .executeWith(retryExecutor().withRetryLimit(3)); }