use of io.github.resilience4j.timelimiter.event.TimeLimiterOnErrorEvent in project resilience4j by resilience4j.
the class TimeLimiterEventDTOTest method shouldMapTimeLimiterOnErrorEvent.
@Test
public void shouldMapTimeLimiterOnErrorEvent() {
TimeLimiterOnErrorEvent event = new TimeLimiterOnErrorEvent("name", new IOException("Error message"));
TimeLimiterEventDTO timeLimiterEventDTO = TimeLimiterEventDTO.createTimeLimiterEventDTO(event);
assertThat(timeLimiterEventDTO.getTimeLimiterName()).isEqualTo("name");
assertThat(timeLimiterEventDTO.getType()).isEqualTo(TimeLimiterEvent.Type.ERROR);
assertThat(timeLimiterEventDTO.getCreationTime()).isNotNull();
}
Aggregations