use of org.kie.workbench.common.services.backend.source.SourceService in project drools-wb by kiegroup.
the class GuidedDecisionTableEditorServiceImplTest method checkToSource.
@Test
@SuppressWarnings("unchecked")
public void checkToSource() {
final Path path = mock(Path.class);
final GuidedDecisionTable52 model = new GuidedDecisionTable52();
final SourceService mockSourceService = mock(SourceService.class);
when(path.toURI()).thenReturn("default://project/src/main/resources/mypackage");
when(mockSourceServices.getServiceFor(any(org.uberfire.java.nio.file.Path.class))).thenReturn(mockSourceService);
service.toSource(path, model);
verify(mockSourceServices, times(1)).getServiceFor(any(org.uberfire.java.nio.file.Path.class));
verify(mockSourceService, times(1)).getSource(any(org.uberfire.java.nio.file.Path.class), eq(model));
}
Aggregations