Search in sources :

Example 1 with TimeLimiterOnSuccessEvent

use of io.github.resilience4j.timelimiter.event.TimeLimiterOnSuccessEvent in project resilience4j by resilience4j.

the class TimeLimiterEventDTOTest method shouldMapTimeLimiterOnSuccessEvent.

@Test
public void shouldMapTimeLimiterOnSuccessEvent() {
    TimeLimiterOnSuccessEvent event = new TimeLimiterOnSuccessEvent("name");
    TimeLimiterEventDTO timeLimiterEventDTO = TimeLimiterEventDTO.createTimeLimiterEventDTO(event);
    assertThat(timeLimiterEventDTO.getTimeLimiterName()).isEqualTo("name");
    assertThat(timeLimiterEventDTO.getType()).isEqualTo(TimeLimiterEvent.Type.SUCCESS);
    assertThat(timeLimiterEventDTO.getCreationTime()).isNotNull();
}
Also used : TimeLimiterOnSuccessEvent(io.github.resilience4j.timelimiter.event.TimeLimiterOnSuccessEvent) TimeLimiterEventDTO(io.github.resilience4j.common.timelimiter.monitoring.endpoint.TimeLimiterEventDTO) Test(org.junit.Test)

Aggregations

TimeLimiterEventDTO (io.github.resilience4j.common.timelimiter.monitoring.endpoint.TimeLimiterEventDTO)1 TimeLimiterOnSuccessEvent (io.github.resilience4j.timelimiter.event.TimeLimiterOnSuccessEvent)1 Test (org.junit.Test)1