Beispiel #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private java.util.List<String> getExpectedStoreFiles(org.neo4j.kernel.NeoStoreDataSource neoStoreDataSource) throws java.io.IOException
        private IList <string> GetExpectedStoreFiles(NeoStoreDataSource neoStoreDataSource)
        {
            NeoStoreFileListing.StoreFileListingBuilder builder = neoStoreDataSource.NeoStoreFileListing.builder();
            builder.ExcludeLogFiles().excludeExplicitIndexStoreFiles().excludeSchemaIndexStoreFiles().excludeAdditionalProviders();
            using (Stream <StoreFileMetadata> stream = builder.Build().stream())
            {
                return(stream.filter(IsCountFile(neoStoreDataSource.DatabaseLayout).negate()).map(sfm => sfm.file().Name).collect(toList()));
            }
        }
Beispiel #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp()
        public virtual void SetUp()
        {
            NeoStoreDataSource dataSource = mock(typeof(NeoStoreDataSource));

            _fileListingBuilder = mock(typeof(NeoStoreFileListing.StoreFileListingBuilder), CALLS_REAL_METHODS);
            _databaseLayout     = TestDirectory.databaseLayout();
            when(dataSource.DatabaseLayout).thenReturn(_databaseLayout);
            _indexListingMock = mock(typeof(NeoStoreFileIndexListing));
            when(_indexListingMock.IndexIds).thenReturn(new LongHashSet());
            NeoStoreFileListing storeFileListing = mock(typeof(NeoStoreFileListing));

            when(storeFileListing.NeoStoreFileIndexListing).thenReturn(_indexListingMock);
            when(storeFileListing.Builder()).thenReturn(_fileListingBuilder);
            when(dataSource.NeoStoreFileListing).thenReturn(storeFileListing);
            _prepareStoreCopyFiles = new PrepareStoreCopyFiles(dataSource, _fileSystemAbstraction);
        }