Example #1
0
 internal virtual PartitionedIndexStorage NewFaultyPartitionedIndexStorage()
 {
     try
     {
         PartitionedIndexStorage storage = mock(typeof(PartitionedIndexStorage));
         when(storage.ListFolders()).thenReturn(singletonList(new File("/some/path/somewhere/1")));
         when(storage.OpenDirectory(any())).thenThrow(Error);
         return(storage);
     }
     catch (IOException e)
     {
         throw new UncheckedIOException(e);
     }
 }
Example #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private java.util.List<long> getAllNodes(org.neo4j.kernel.api.impl.index.storage.PartitionedIndexStorage indexStorage, String propertyValue) throws java.io.IOException
        private IList <long> GetAllNodes(PartitionedIndexStorage indexStorage, string propertyValue)
        {
            return(AllNodesCollector.GetAllNodes(indexStorage.OpenDirectory(indexStorage.GetPartitionFolder(1)), Values.stringValue(propertyValue)));
        }