Search in sources :

Example 1 with BPMFinderServiceImpl

use of org.kie.workbench.common.forms.jbpm.server.service.impl.BPMFinderServiceImpl in project kie-wb-common by kiegroup.

the class GetProcessModelsTest method init.

@Before
public void init() {
    when(ioService.newDirectoryStream(any(), any())).thenAnswer(invocationOnMock -> Files.newDirectoryStream((Path) invocationOnMock.getArguments()[0], (DirectoryStream.Filter<Path>) invocationOnMock.getArguments()[1]));
    when(ioService.newInputStream(any())).thenAnswer(invocationOnMock -> new FileInputStream(((Path) invocationOnMock.getArguments()[0]).toFile()));
    bpmnFormModelGenerator = new BPMNFormModelGeneratorImpl(moduleService, classLoaderHelper);
    finderService = new BPMFinderServiceImpl(ioService, moduleService, bpmnFormModelGenerator);
    finderService.init();
}
Also used : Path(org.uberfire.java.nio.file.Path) BPMNFormModelGeneratorImpl(org.kie.workbench.common.forms.jbpm.server.service.impl.BPMNFormModelGeneratorImpl) BPMFinderServiceImpl(org.kie.workbench.common.forms.jbpm.server.service.impl.BPMFinderServiceImpl) FileInputStream(java.io.FileInputStream) Before(org.junit.Before)

Aggregations

FileInputStream (java.io.FileInputStream)1 Before (org.junit.Before)1 BPMFinderServiceImpl (org.kie.workbench.common.forms.jbpm.server.service.impl.BPMFinderServiceImpl)1 BPMNFormModelGeneratorImpl (org.kie.workbench.common.forms.jbpm.server.service.impl.BPMNFormModelGeneratorImpl)1 Path (org.uberfire.java.nio.file.Path)1