use of cn.taketoday.validation.beanvalidation.LocalValidatorFactoryBean in project today-framework by TAKETODAY.
the class RequestResponseBodyMethodProcessorMockTests method initBindingContext.
public void initBindingContext() {
BindingContext bindingContext = new BindingContext() {
@Override
public void initBinder(WebDataBinder dataBinder, RequestContext request) {
LocalValidatorFactoryBean validator = new LocalValidatorFactoryBean();
validator.afterPropertiesSet();
dataBinder.setValidator(validator);
}
};
webRequest.setBindingContext(bindingContext);
}
use of cn.taketoday.validation.beanvalidation.LocalValidatorFactoryBean in project today-framework by TAKETODAY.
the class ValidationBindHandlerTests method setup.
@BeforeEach
void setup() {
this.binder = new Binder(this.sources);
this.validator = new LocalValidatorFactoryBean();
this.validator.afterPropertiesSet();
this.handler = new ValidationBindHandler(this.validator);
}
use of cn.taketoday.validation.beanvalidation.LocalValidatorFactoryBean in project today-infrastructure by TAKETODAY.
the class ValidationBindHandlerTests method setup.
@BeforeEach
void setup() {
this.binder = new Binder(this.sources);
this.validator = new LocalValidatorFactoryBean();
this.validator.afterPropertiesSet();
this.handler = new ValidationBindHandler(this.validator);
}
Aggregations