use of org.kie.workbench.common.forms.service.shared.FieldManager in project kie-wb-common by kiegroup.
the class FormGenerationIntegrationTest method init.
@Before
public void init() {
formModelHandlerManager = new TestFormModelHandlerManager(moduleService, moduleClassLoaderHelper, fieldManager, finderService);
when(pathModelReaderService.getModelReader(any())).thenReturn(new RuntimeDMOModelReader(moduleClassLoader, new RawMVELEvaluator()));
when(formFinderService.findFormsForType(anyString(), any())).then((Answer<List<FormDefinition>>) invocationOnMock -> {
String type = invocationOnMock.getArguments()[0].toString();
return Collections.singletonList(readFormDefinitionForType(type));
});
service = new BPMNVFSFormDefinitionGeneratorService(fieldManager, pathModelReaderService, formModelHandlerManager, formFinderService, formSerializer, ioService, commentedOptionFactory, formModelSynchronizationUtil);
when(moduleService.resolveModule(any())).thenReturn(module);
when(moduleClassLoaderHelper.getModuleClassLoader(any())).thenReturn(moduleClassLoader);
generator = new BPMNFormModelGeneratorImpl(moduleService, moduleClassLoaderHelper);
final Path rootPathWithNestedForms = PathFactory.newPath(DATA_OBJECTS_FOLDER, getUriOfResource(PREPARED_NESTED_FORMS_FOLDER));
;
processFormModel = generator.generateProcessFormModel(formGenerationProcessDefinitions, rootPathWithNestedForms);
taskFormModels = generator.generateTaskFormModels(formGenerationProcessDefinitions, rootPathWithNestedForms);
}
Aggregations