use of org.kie.workbench.common.forms.editor.service.shared.model.impl.FormModelSynchronizationUtilImpl in project kie-wb-common by kiegroup.
the class FormGenerationIntegrationTest method setup.
@BeforeClass
public static void setup() throws ClassNotFoundException {
FormModelPropertiesUtil.registerBaseType(DOCUMENT_TYPE);
FormModelPropertiesUtil.registerBaseType(DocumentFieldType.DOCUMENT_IMPL_TYPE);
fieldManager = new TestFieldManager() {
{
registerFieldProvider(new DocumentFieldProvider() {
{
doRegisterFields();
}
});
}
};
formSerializer = new FormDefinitionSerializerImpl(new FieldSerializer(), new FormModelSerializer(), new TestMetaDataEntryManager());
ioService = new IOServiceDotFileImpl();
templateGenerator = new StaticFormLayoutTemplateGenerator();
formModelSynchronizationUtil = new FormModelSynchronizationUtilImpl(fieldManager, templateGenerator);
moduleClassLoader = FormGenerationIntegrationTest.class.getClassLoader();
formGenerationProcessDefinitions = TestUtils.getDefinitionsFromResources(FormGenerationIntegrationTest.class, DEFINITION_PATH);
formModelerContent = new FormModelerContent();
formEditorHelper = new FormEditorHelper(fieldManager, null);
}
use of org.kie.workbench.common.forms.editor.service.shared.model.impl.FormModelSynchronizationUtilImpl in project kie-wb-common by kiegroup.
the class BPMNVFSFormDefinitionGeneratorServiceTest method setup.
@Before
public void setup() throws IOException {
when(projectService.resolveModule(any())).thenReturn(module);
when(projectClassLoaderHelper.getModuleClassLoader(module)).thenReturn(this.getClass().getClassLoader());
source = mock(Path.class);
simpleFileSystemProvider = new SimpleFileSystemProvider();
simpleFileSystemProvider.forceAsDefault();
when(source.toURI()).thenReturn("default:///src/main/resources/test.frm");
when(commentedOptionFactory.makeCommentedOption(anyString())).then(invocationOnMock -> new CommentedOption("1", invocationOnMock.getArguments()[0].toString()));
formModelHandlerManager = new TestFormModelHandlerManager(projectService, projectClassLoaderHelper, fieldManager, dataObjectFinderService);
service = new BPMNVFSFormDefinitionGeneratorService(fieldManager, formModelHandlerManager, formFinderService, formSerializer, ioService, commentedOptionFactory, new FormModelSynchronizationUtilImpl(fieldManager, templateGenerator));
}
Aggregations