@Test public void testInitialize() { fieldStateValidator.initialize(); assertThat(fieldStateValidator.validators).hasSize(2); assertThat(fieldStateValidator.validators).containsKeys(String.class, ArrayList.class); }
@PostConstruct public void initialize() { validators.put(String.class, (String string) -> string != null && !string.isEmpty()); validators.put(ArrayList.class, (ArrayList list) -> list != null && !list.isEmpty()); }
FieldStateValidatorImpl implements FieldStateValidator { @PostConstruct public void initialize() { validators.put(String.class, (String string) -> string != null && !string.isEmpty()); validators.put(ArrayList.class, (ArrayList list) -> list != null && !list.isEmpty()); } }
FieldStateValidatorImpl implements FieldStateValidator { @PostConstruct public void initialize() { validators.put(String.class, (String string) -> string != null && !string.isEmpty()); validators.put(ArrayList.class, (ArrayList list) -> list != null && !list.isEmpty()); } @Inject  FieldStateValidatorImpl(TranslationService translationService); }
FieldStateValidatorImpl implements FieldStateValidator { @PostConstruct public void initialize() { validators.put(String.class, (String string) -> string != null && !string.isEmpty()); validators.put(ArrayList.class, (ArrayList list) -> list != null && !list.isEmpty()); } @Inject  FieldStateValidatorImpl(TranslationService translationService); @PostConstruct void initialize(); @Override boolean validate(Collection<FormField> fields); @Override boolean validate(FormField field); }
FieldStateValidatorImpl implements FieldStateValidator { @PostConstruct public void initialize() { validators.put(String.class, (String string) -> string != null && !string.isEmpty()); validators.put(ArrayList.class, (ArrayList list) -> list != null && !list.isEmpty()); } @Inject  FieldStateValidatorImpl(TranslationService translationService); @PostConstruct void initialize(); @Override boolean validate(Collection<FormField> fields); @Override boolean validate(FormField field);  }