@Test public void testDMNModelFilter() { final DirectoryStream.Filter<org.uberfire.java.nio.file.Path> filter = pathsHelper.dmnModelFilter(); final org.uberfire.java.nio.file.Path nioPath1 = mock(org.uberfire.java.nio.file.Path.class); final org.uberfire.java.nio.file.Path nioPath2 = mock(org.uberfire.java.nio.file.Path.class); final Path path1 = mock(Path.class); final Path path2 = mock(Path.class); when(path1.getFileName()).thenReturn("/Users/karreiro/projects/dmn-project/file.dmn"); when(path2.getFileName()).thenReturn("/Users/karreiro/projects/dmn-project/Readme.md"); doReturn(path1).when(pathsHelper).convertPath(nioPath1); doReturn(path2).when(pathsHelper).convertPath(nioPath2); assertTrue(filter.accept(nioPath1)); assertFalse(filter.accept(nioPath2)); }
DirectoryStream.Filter<org.uberfire.java.nio.file.Path> dmnModelFilter() { return path -> importTypesHelper.isDMN(convertPath(path)); }
DMNPathsHelperImpl implements DMNPathsHelper { DirectoryStream.Filter<org.uberfire.java.nio.file.Path> dmnModelFilter() { return path -> importTypesHelper.isDMN(convertPath(path)); } }
DMNPathsHelperImpl implements DMNPathsHelper { DirectoryStream.Filter<org.uberfire.java.nio.file.Path> dmnModelFilter() { return path -> importTypesHelper.isDMN(convertPath(path)); } DMNPathsHelperImpl(); @Inject  DMNPathsHelperImpl(final RefactoringQueryService refactoringQueryService,
                              final DMNImportTypesHelper importTypesHelper,
                              final @Named("ioStrategy") IOService ioService); }
DMNPathsHelperImpl implements DMNPathsHelper { DirectoryStream.Filter<org.uberfire.java.nio.file.Path> dmnModelFilter() { return path -> importTypesHelper.isDMN(convertPath(path)); } 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.Filter<org.uberfire.java.nio.file.Path> dmnModelFilter() { return path -> importTypesHelper.isDMN(convertPath(path)); } 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);  }