View Javadoc
1   package org.bremersee.exception.spring.boot.autoconfigure.servlet;
2   
3   import static org.assertj.core.api.Assertions.assertThat;
4   import static org.assertj.core.api.Assertions.assertThatNoException;
5   
6   import org.bremersee.exception.RestApiExceptionMapper;
7   import org.bremersee.exception.spring.boot.autoconfigure.RestApiExceptionMapperBootProperties;
8   import org.junit.jupiter.api.Test;
9   
10  class RestApiExceptionMapperForWebAutoConfigurationTest {
11  
12    private final RestApiExceptionMapperForWebAutoConfiguration target
13        = new RestApiExceptionMapperForWebAutoConfiguration(
14        "test", new RestApiExceptionMapperBootProperties());
15  
16    @Test
17    void init() {
18      assertThatNoException().isThrownBy(target::init);
19    }
20  
21    @Test
22    void restApiExceptionMapper() {
23      RestApiExceptionMapper actual = target.restApiExceptionMapper();
24      assertThat(actual)
25          .isNotNull();
26    }
27  }