@Test public void testGetStandaloneModelPaths() { final org.uberfire.java.nio.file.Path root = mock(org.uberfire.java.nio.file.Path.class); final DirectoryStream.Filter<org.uberfire.java.nio.file.Path> filter = (path) -> true; final DirectoryStream<org.uberfire.java.nio.file.Path> expectedStream = new DirectoryStreamFake(); doReturn(root).when(pathsHelper).getStandaloneRootPath(); doReturn(filter).when(pathsHelper).allModelsFilter(); when(ioService.newDirectoryStream(root, filter)).thenReturn(expectedStream); final DirectoryStream<org.uberfire.java.nio.file.Path> actualStream = pathsHelper.getStandaloneModelPaths(filter); assertEquals(expectedStream, actualStream); }
DirectoryStream<org.uberfire.java.nio.file.Path> getStandaloneModelPaths(final DirectoryStream.Filter<org.uberfire.java.nio.file.Path> filter) { final org.uberfire.java.nio.file.Path root = getStandaloneRootPath(); return ioService.newDirectoryStream(root, filter); }
DMNPathsHelperImpl implements DMNPathsHelper { DirectoryStream<org.uberfire.java.nio.file.Path> getStandaloneModelPaths(final DirectoryStream.Filter<org.uberfire.java.nio.file.Path> filter) { final org.uberfire.java.nio.file.Path root = getStandaloneRootPath(); return ioService.newDirectoryStream(root, filter); } }
DMNPathsHelperImpl implements DMNPathsHelper { DirectoryStream<org.uberfire.java.nio.file.Path> getStandaloneModelPaths(final DirectoryStream.Filter<org.uberfire.java.nio.file.Path> filter) { final org.uberfire.java.nio.file.Path root = getStandaloneRootPath(); return ioService.newDirectoryStream(root, filter); } DMNPathsHelperImpl(); @Inject  DMNPathsHelperImpl(final RefactoringQueryService refactoringQueryService,
                              final DMNImportTypesHelper importTypesHelper,
                              final @Named("ioStrategy") IOService ioService); }
DMNPathsHelperImpl implements DMNPathsHelper { DirectoryStream<org.uberfire.java.nio.file.Path> getStandaloneModelPaths(final DirectoryStream.Filter<org.uberfire.java.nio.file.Path> filter) { final org.uberfire.java.nio.file.Path root = getStandaloneRootPath(); return ioService.newDirectoryStream(root, filter); } DMNPathsHelperImpl(); @Inject  DMNPathsHelperImpl(final RefactoringQueryService refactoringQueryService,
                              final DMNImportTypesHelper importTypesHelper,
                              final @Named("ioStrategy") IOService ioService); @Override List<Path> getModelsPaths(final WorkspaceProject workspaceProject); @Override List<Path> getDMNModelsPaths(final WorkspaceProject workspaceProject); @Override List<Path> getPMMLModelsPaths(final WorkspaceProject workspaceProject); @Override String getRelativeURI(final Path dmnModelPath,
                                 final Path includedModelPath); }
DMNPathsHelperImpl implements DMNPathsHelper { DirectoryStream<org.uberfire.java.nio.file.Path> getStandaloneModelPaths(final DirectoryStream.Filter<org.uberfire.java.nio.file.Path> filter) { final org.uberfire.java.nio.file.Path root = getStandaloneRootPath(); return ioService.newDirectoryStream(root, filter); } DMNPathsHelperImpl(); @Inject  DMNPathsHelperImpl(final RefactoringQueryService refactoringQueryService,
                              final DMNImportTypesHelper importTypesHelper,
                              final @Named("ioStrategy") IOService ioService); @Override List<Path> getModelsPaths(final WorkspaceProject workspaceProject); @Override List<Path> getDMNModelsPaths(final WorkspaceProject workspaceProject); @Override List<Path> getPMMLModelsPaths(final WorkspaceProject workspaceProject); @Override String getRelativeURI(final Path dmnModelPath,
                                 final Path includedModelPath);  }