@Test public void addsTheErrorsOnTheResult() { try { validator.add(A_MESSAGE); validator.onErrorForwardTo(MyComponent.class).logic(); } catch (ValidationException e) { } verify(result).include(eq("errors"), argThat(is(not(empty())))); }
public void add(Message message) { if (message instanceof I18nMessage && !((I18nMessage) message).hasBundle()) { ((I18nMessage) message).setLazyBundle(new LocalizationSupplier()); } errors.add(message); }
DefaultValidator extends AbstractValidator { public void add(Message message) { if (message instanceof I18nMessage && !((I18nMessage) message).hasBundle()) { ((I18nMessage) message).setLazyBundle(new LocalizationSupplier()); } errors.add(message); } }
DefaultValidator extends AbstractValidator { public void add(Message message) { if (message instanceof I18nMessage && !((I18nMessage) message).hasBundle()) { ((I18nMessage) message).setLazyBundle(new LocalizationSupplier()); } errors.add(message); } DefaultValidator(); @Inject  DefaultValidator(Result result, ValidationViewsFactory factory, Outjector outjector, Proxifier proxifier, BeanValidator beanValidator, Localization localization); }
DefaultValidator extends AbstractValidator { public void add(Message message) { if (message instanceof I18nMessage && !((I18nMessage) message).hasBundle()) { ((I18nMessage) message).setLazyBundle(new LocalizationSupplier()); } errors.add(message); } DefaultValidator(); @Inject  DefaultValidator(Result result, ValidationViewsFactory factory, Outjector outjector, Proxifier proxifier, BeanValidator beanValidator, Localization localization); void checking(Validations validations); void validate(Object object, Class<?>... groups); void validateProperties(Object object, String... properties); void validateProperty(Object object, String property, Class<?>... groups); T onErrorUse(Class<T> view); void addAll(Collection<? extends Message> messages); void add(Message message); boolean hasErrors(); List<Message> getErrors(); }
DefaultValidator extends AbstractValidator { public void add(Message message) { if (message instanceof I18nMessage && !((I18nMessage) message).hasBundle()) { ((I18nMessage) message).setLazyBundle(new LocalizationSupplier()); } errors.add(message); } DefaultValidator(); @Inject  DefaultValidator(Result result, ValidationViewsFactory factory, Outjector outjector, Proxifier proxifier, BeanValidator beanValidator, Localization localization); void checking(Validations validations); void validate(Object object, Class<?>... groups); void validateProperties(Object object, String... properties); void validateProperty(Object object, String property, Class<?>... groups); T onErrorUse(Class<T> view); void addAll(Collection<? extends Message> messages); void add(Message message); boolean hasErrors(); List<Message> getErrors();  }