Search in sources :

Example 1 with DateMultipleInputFieldValueMarshaller

use of org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.time.DateMultipleInputFieldValueMarshaller in project kie-wb-common by kiegroup.

the class AbstractBackendFormRenderingContextManagerTest method initTest.

@Before
public void initTest() {
    SubFormFieldValueMarshaller subFormFieldValueMarshaller = new SubFormFieldValueMarshaller();
    MultipleSubFormFieldValueMarshaller multipleSubFormFieldValueMarshaller = new MultipleSubFormFieldValueMarshaller();
    List<FieldValueMarshaller> marshallers = Arrays.asList(subFormFieldValueMarshaller, multipleSubFormFieldValueMarshaller, new DateMultipleInputFieldValueMarshaller(), new DateMultipleSelectorFieldValueMarshaller(), new LocalDateFieldValueMarshaller(), new TextAreaFormFieldValueMarshaller(), new StringMultipleInputValueMarshaller(), new StringMultipleSelectorValueMarshaller());
    marshallersInstance = mock(Instance.class);
    when(marshallersInstance.iterator()).then(proc -> marshallers.iterator());
    registry = new FieldValueMarshallerRegistryImpl(marshallersInstance);
    subFormFieldValueMarshaller.setRegistry(registry);
    multipleSubFormFieldValueMarshaller.setRegistry(registry);
    contextManager = new BackendFormRenderingContextManagerImpl(registry, new ContextModelConstraintsExtractorImpl());
    formData = generateFormData();
    classLoader = mock(ClassLoader.class);
    long timestamp = contextManager.registerContext(getRootForm(), formData, classLoader, getNestedForms()).getTimestamp();
    context = contextManager.getContext(timestamp);
    assertNotNull("Context cannot be null", context);
}
Also used : FieldValueMarshallerRegistryImpl(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.FieldValueMarshallerRegistryImpl) SubFormFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.models.SubFormFieldValueMarshaller) MultipleSubFormFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.models.MultipleSubFormFieldValueMarshaller) StringMultipleInputValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.lists.StringMultipleInputValueMarshaller) Instance(javax.enterprise.inject.Instance) TextAreaFormFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.TextAreaFormFieldValueMarshaller) FieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.FieldValueMarshaller) DateMultipleSelectorFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.time.DateMultipleSelectorFieldValueMarshaller) LocalDateFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.time.LocalDateFieldValueMarshaller) SubFormFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.models.SubFormFieldValueMarshaller) DateMultipleInputFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.time.DateMultipleInputFieldValueMarshaller) MultipleSubFormFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.models.MultipleSubFormFieldValueMarshaller) StringMultipleSelectorValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.lists.StringMultipleSelectorValueMarshaller) TextAreaFormFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.TextAreaFormFieldValueMarshaller) DateMultipleSelectorFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.time.DateMultipleSelectorFieldValueMarshaller) LocalDateFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.time.LocalDateFieldValueMarshaller) MultipleSubFormFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.models.MultipleSubFormFieldValueMarshaller) ContextModelConstraintsExtractorImpl(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.validation.impl.ContextModelConstraintsExtractorImpl) DateMultipleInputFieldValueMarshaller(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.time.DateMultipleInputFieldValueMarshaller) Before(org.junit.Before)

Aggregations

Instance (javax.enterprise.inject.Instance)1 Before (org.junit.Before)1 FieldValueMarshaller (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.FieldValueMarshaller)1 FieldValueMarshallerRegistryImpl (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.FieldValueMarshallerRegistryImpl)1 TextAreaFormFieldValueMarshaller (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.TextAreaFormFieldValueMarshaller)1 StringMultipleInputValueMarshaller (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.lists.StringMultipleInputValueMarshaller)1 StringMultipleSelectorValueMarshaller (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.lists.StringMultipleSelectorValueMarshaller)1 MultipleSubFormFieldValueMarshaller (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.models.MultipleSubFormFieldValueMarshaller)1 SubFormFieldValueMarshaller (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.models.SubFormFieldValueMarshaller)1 DateMultipleInputFieldValueMarshaller (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.time.DateMultipleInputFieldValueMarshaller)1 DateMultipleSelectorFieldValueMarshaller (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.time.DateMultipleSelectorFieldValueMarshaller)1 LocalDateFieldValueMarshaller (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.marshalling.time.LocalDateFieldValueMarshaller)1 ContextModelConstraintsExtractorImpl (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.validation.impl.ContextModelConstraintsExtractorImpl)1