После вставки или изменения каких-то элементов XPage или CustomControl в исходном XML-представлении (закладка Source) при работе с дизайнером форматирование тегов может съезжать (отступы и пр.). Это несколько раздражает и затрудняет понимание. Ручное форматирование раздражает еще больше да и не нужно: для придания нужного отображения со всеми отступами можно использовать Ctrl+Shift+F (или в меню Source->Format)
Summary Unit test object validation when validator(s) has a dependency. For instance, we have some custom field and cross-field validators. Want to test their combination. Additionally some of validators have dependencies, injected through constructor or setters. You're not using property injection, right? Shortcut If you are just searching for an answer, here's the fast way: Declare CustomConstraintValidatorFactory that implements javax.validation.ConstraintValidatorFactory Override getInstance method and on facing your constraint validator class instantiate it Otherwise delegate validator construction to org.hibernate.validator.internal.engine.constraintvalidation.ConstraintValidatorFactoryImpl Build validator factory and provide it your CustomConstraintValidatorFactory Build validator, using that factory... Go to demo project on GitHub for details: https://github.com/MrArtemAA/blog-demos/blob/master/test-validator-with-injection/src/test/java/ru/artemaa/...
Комментарии
Отправить комментарий