Search in sources :

Example 1 with PageValidator

use of org.entando.entando.web.page.validator.PageValidator in project entando-core by entando.

the class PageControllerTest method setUp.

@Before
public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
    validator = factory.getValidator();
    mockMvc = MockMvcBuilders.standaloneSetup(controller).addInterceptors(entandoOauth2Interceptor).setHandlerExceptionResolvers(createHandlerExceptionResolver()).build();
    PageValidator pageValidator = new PageValidator();
    pageValidator.setPageManager(pageManager);
    this.controller.setPageValidator(pageValidator);
}
Also used : ValidatorFactory(javax.validation.ValidatorFactory) PageValidator(org.entando.entando.web.page.validator.PageValidator) Before(org.junit.Before)

Aggregations

ValidatorFactory (javax.validation.ValidatorFactory)1 PageValidator (org.entando.entando.web.page.validator.PageValidator)1 Before (org.junit.Before)1