Search in sources :

Example 31 with Field

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();
}
Also used : Field(org.apache.tapestry5.Field) FieldValidator(org.apache.tapestry5.FieldValidator) MessageFormatter(org.apache.tapestry5.commons.MessageFormatter) FieldValidator(org.apache.tapestry5.FieldValidator) Validator(org.apache.tapestry5.Validator) Test(org.testng.annotations.Test)

Example 32 with Field

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();
}
Also used : Field(org.apache.tapestry5.Field) FieldValidator(org.apache.tapestry5.FieldValidator) MessageFormatter(org.apache.tapestry5.commons.MessageFormatter) FieldValidator(org.apache.tapestry5.FieldValidator) Validator(org.apache.tapestry5.Validator) Test(org.testng.annotations.Test)

Example 33 with Field

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();
}
Also used : Locale(java.util.Locale) TranslatorSource(org.apache.tapestry5.services.TranslatorSource) FieldTranslatorSource(org.apache.tapestry5.services.FieldTranslatorSource) Field(org.apache.tapestry5.Field) Messages(org.apache.tapestry5.commons.Messages) AnnotationProvider(org.apache.tapestry5.commons.AnnotationProvider) FieldTranslatorSource(org.apache.tapestry5.services.FieldTranslatorSource) Map(java.util.Map) Test(org.testng.annotations.Test)

Example 34 with Field

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));
}
Also used : Field(org.apache.tapestry5.Field)

Example 35 with Field

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());
}
Also used : Field(org.talend.hl7.Field) HL7Message(org.talend.hl7.HL7Message) Segment(org.talend.hl7.Segment)

Aggregations

Field (io.atlasmap.v2.Field)221 FieldGroup (io.atlasmap.v2.FieldGroup)86 Test (org.junit.jupiter.api.Test)67 SimpleField (io.atlasmap.v2.SimpleField)62 Field (org.apache.tapestry5.Field)46 JavaField (io.atlasmap.java.v2.JavaField)45 ArrayList (java.util.ArrayList)42 Mapping (io.atlasmap.v2.Mapping)39 Test (org.testng.annotations.Test)39 AtlasPath (io.atlasmap.core.AtlasPath)29 ConstantField (io.atlasmap.v2.ConstantField)29 JavaEnumField (io.atlasmap.java.v2.JavaEnumField)26 AtlasException (io.atlasmap.api.AtlasException)25 JsonField (io.atlasmap.json.v2.JsonField)25 MessageFormatter (org.apache.tapestry5.commons.MessageFormatter)25 PropertyField (io.atlasmap.v2.PropertyField)22 AtlasMapping (io.atlasmap.v2.AtlasMapping)21 KafkaConnectField (io.atlasmap.kafkaconnect.v2.KafkaConnectField)19 AtlasInternalSession (io.atlasmap.spi.AtlasInternalSession)19 Head (io.atlasmap.spi.AtlasInternalSession.Head)18