private static ResourceIterator <File> ScanStoreFilesAre(LabelScanStore labelScanStore, string[] fileNames)
        {
            List <File> files = new List <File>();

            MockFiles(fileNames, files, false);
            ResourceIterator <File> snapshot = spy(asResourceIterator(Files.GetEnumerator()));

            when(labelScanStore.SnapshotStoreFiles()).thenReturn(snapshot);
            return(snapshot);
        }
Beispiel #2
0
        private static void GatherLabelScanStoreFiles(GraphDatabaseAPI db, ISet <Path> labelScanStoreFiles)
        {
            Path           databaseDirectory = Db.databaseLayout().databaseDirectory().toPath();
            LabelScanStore labelScanStore    = Db.DependencyResolver.resolveDependency(typeof(LabelScanStore));

            using (ResourceIterator <File> files = labelScanStore.SnapshotStoreFiles())
            {
//JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
                Path relativePath = databaseDirectory.relativize(Files.next().toPath().toAbsolutePath());
                labelScanStoreFiles.Add(relativePath);
            }
        }