use of com.google.firestore.admin.v1.Field in project tapestry-5 by apache.
the class FieldValidatorImplTest method blank_value_skipped.
@SuppressWarnings("unchecked")
@Test
public void blank_value_skipped() throws Exception {
Field field = mockField();
MessageFormatter formatter = mockMessageFormatter();
Validator validator = mockValidator();
train_isRequired(validator, false);
replay();
FieldValidator fv = new FieldValidatorImpl(field, null, formatter, validator, null);
fv.validate("");
verify();
}
use of com.google.firestore.admin.v1.Field in project tapestry-5 by apache.
the class FieldValidatorImplTest method value_type_check_skipped_for_null_values.
@SuppressWarnings("unchecked")
@Test
public void value_type_check_skipped_for_null_values() throws Exception {
Field field = mockField();
MessageFormatter formatter = mockMessageFormatter();
Validator validator = mockValidator();
train_isRequired(validator, true);
validator.validate(field, null, formatter, null);
replay();
FieldValidator fv = new FieldValidatorImpl(field, null, formatter, validator, null);
fv.validate(null);
verify();
}
use of com.google.firestore.admin.v1.Field in project tapestry-5 by apache.
the class FieldTranslatorSourceImplTest method create_default_translator_not_found_for_type.
@Test
public void create_default_translator_not_found_for_type() {
Field field = mockField();
Messages messages = mockMessages();
Locale locale = Locale.ENGLISH;
Class propertyType = Map.class;
TranslatorSource ts = mockTranslatorSource();
AnnotationProvider ap = mockAnnotationProvider(null);
train_findByType(ts, propertyType, null);
replay();
FieldTranslatorSource source = new FieldTranslatorSourceImpl(ts, null, null);
assertNull(source.createDefaultTranslator(field, "override", messages, locale, propertyType, ap));
verify();
}
use of com.google.firestore.admin.v1.Field in project tapestry-5 by apache.
the class BeanFieldValidatorDefaultSource method createDefaultValidator.
@Override
public FieldValidator createDefaultValidator(final ComponentResources resources, final String parameterName) {
final Class propertyType = resources.getBoundType(parameterName);
if (propertyType == null)
return null;
final Field field = (Field) resources.getComponent();
return createDefaultValidator(field, resources.getId(), resources.getContainerMessages(), resources.getLocale(), propertyType, resources.getAnnotationProvider(parameterName));
}
use of com.google.firestore.admin.v1.Field in project tdi-studio-se by Talend.
the class TestMain method main.
public static void main(String[] args) throws Exception {
String[][] paths = getMSH3();
for (String[] arrPaths : paths) {
for (String arrPath : arrPaths) {
System.out.println(arrPath);
}
}
HL7Message message = new HL7Message();
Segment seg = new Segment("MSH");
message.addSegment(seg);
for (String[] path : paths) {
Field field = TalendHL7Util.setValue(path[0], path[1]);
seg.addField(field);
}
System.out.println(message.message());
}
Aggregations