Search in sources :

Example 1 with MultipleSubFormFieldValueProcessor

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

the class AbstractBackendFormRenderingContextManagerTest method initTest.

@Before
public void initTest() {
    List<FieldValueProcessor> processors = Arrays.asList(new SubFormFieldValueProcessor(), new MultipleSubFormFieldValueProcessor());
    fieldValueProcessors = mock(Instance.class);
    when(fieldValueProcessors.iterator()).then(proc -> processors.iterator());
    formValuesProcessor = new FormValuesProcessorImpl(fieldValueProcessors);
    contextManager = new BackendFormRenderingContextManagerImpl(formValuesProcessor, 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 : FieldValueProcessor(org.kie.workbench.common.forms.dynamic.service.context.generation.dynamic.FieldValueProcessor) MultipleSubFormFieldValueProcessor(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.fieldProcessors.MultipleSubFormFieldValueProcessor) SubFormFieldValueProcessor(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.fieldProcessors.SubFormFieldValueProcessor) Instance(javax.enterprise.inject.Instance) MultipleSubFormFieldValueProcessor(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.fieldProcessors.MultipleSubFormFieldValueProcessor) SubFormFieldValueProcessor(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.fieldProcessors.SubFormFieldValueProcessor) ContextModelConstraintsExtractorImpl(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.validation.impl.ContextModelConstraintsExtractorImpl) MultipleSubFormFieldValueProcessor(org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.fieldProcessors.MultipleSubFormFieldValueProcessor) Before(org.junit.Before)

Aggregations

Instance (javax.enterprise.inject.Instance)1 Before (org.junit.Before)1 MultipleSubFormFieldValueProcessor (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.fieldProcessors.MultipleSubFormFieldValueProcessor)1 SubFormFieldValueProcessor (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.impl.fieldProcessors.SubFormFieldValueProcessor)1 ContextModelConstraintsExtractorImpl (org.kie.workbench.common.forms.dynamic.backend.server.context.generation.dynamic.validation.impl.ContextModelConstraintsExtractorImpl)1 FieldValueProcessor (org.kie.workbench.common.forms.dynamic.service.context.generation.dynamic.FieldValueProcessor)1