@Test public void shouldNotRedirectIfHasNotErrors() { try { validator.onErrorRedirectTo(MyComponent.class).logic(); assertThat(validator.getErrors(), hasSize(0)); verify(outjector, never()).outjectRequestMap(); } catch (ValidationException e) { fail("no error occurs"); } }
public List<Message> getErrors() { return unmodifiableList(errors); }
DefaultValidator extends AbstractValidator { public List<Message> getErrors() { return unmodifiableList(errors); } }
DefaultValidator extends AbstractValidator { public List<Message> getErrors() { return unmodifiableList(errors); } DefaultValidator(); @Inject  DefaultValidator(Result result, ValidationViewsFactory factory, Outjector outjector, Proxifier proxifier, BeanValidator beanValidator, Localization localization); }
DefaultValidator extends AbstractValidator { public List<Message> getErrors() { return unmodifiableList(errors); } 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 List<Message> getErrors() { return unmodifiableList(errors); } 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();  }