use of org.springframework.web.servlet.config.annotation.InterceptorRegistry in project coffeenet-starter by coffeenet.
the class CoffeeNetWebMvcConfigurerAdapterTest method addInterceptors.
@Test
public void addInterceptors() throws Exception {
InterceptorRegistry interceptorRegistryMock = mock(InterceptorRegistry.class);
InterceptorRegistration interceptorRegistrationMock = mock(InterceptorRegistration.class);
when(interceptorRegistryMock.addInterceptor(coffeeNetWebInterceptorMock)).thenReturn(interceptorRegistrationMock);
sut.addInterceptors(interceptorRegistryMock);
verify(interceptorRegistryMock).addInterceptor(coffeeNetWebInterceptorMock);
verify(interceptorRegistrationMock).addPathPatterns("/**");
}
Aggregations