Search in sources :

Example 1 with DefaultMessageCodesResolver

use of org.springframework.validation.DefaultMessageCodesResolver in project spring-framework by spring-projects.

the class DelegatingWebMvcConfigurationTests method getCustomMessageCodesResolver.

@Test
public void getCustomMessageCodesResolver() {
    given(webMvcConfigurer.getMessageCodesResolver()).willReturn(new DefaultMessageCodesResolver());
    webMvcConfig.setConfigurers(Collections.singletonList(webMvcConfigurer));
    webMvcConfig.getMessageCodesResolver();
    verify(webMvcConfigurer).getMessageCodesResolver();
}
Also used : DefaultMessageCodesResolver(org.springframework.validation.DefaultMessageCodesResolver) Test(org.junit.jupiter.api.Test)

Example 2 with DefaultMessageCodesResolver

use of org.springframework.validation.DefaultMessageCodesResolver in project spring-framework-5.2.9.RELEASE by somepeopleHavingDream.

the class DelegatingWebMvcConfigurationTests method getCustomMessageCodesResolver.

@Test
public void getCustomMessageCodesResolver() {
    given(webMvcConfigurer.getMessageCodesResolver()).willReturn(new DefaultMessageCodesResolver());
    delegatingConfig.setConfigurers(Collections.singletonList(webMvcConfigurer));
    delegatingConfig.getMessageCodesResolver();
    verify(webMvcConfigurer).getMessageCodesResolver();
}
Also used : DefaultMessageCodesResolver(org.springframework.validation.DefaultMessageCodesResolver) Test(org.junit.jupiter.api.Test)

Example 3 with DefaultMessageCodesResolver

use of org.springframework.validation.DefaultMessageCodesResolver in project spring-framework-debug by Joker-5.

the class DelegatingWebMvcConfigurationTests method getCustomMessageCodesResolver.

@Test
public void getCustomMessageCodesResolver() {
    given(webMvcConfigurer.getMessageCodesResolver()).willReturn(new DefaultMessageCodesResolver());
    delegatingConfig.setConfigurers(Collections.singletonList(webMvcConfigurer));
    delegatingConfig.getMessageCodesResolver();
    verify(webMvcConfigurer).getMessageCodesResolver();
}
Also used : DefaultMessageCodesResolver(org.springframework.validation.DefaultMessageCodesResolver) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)3 DefaultMessageCodesResolver (org.springframework.validation.DefaultMessageCodesResolver)3