Exemple #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.neo4j.kernel.impl.store.NeoStores open(org.neo4j.io.fs.FileSystemAbstraction fs, org.neo4j.io.pagecache.PageCache pageCache, org.neo4j.kernel.impl.store.format.RecordFormats format, System.Func<org.neo4j.io.fs.FileSystemAbstraction,org.neo4j.kernel.impl.store.id.IdGeneratorFactory> idGeneratorFactory, String... config) throws java.io.IOException
        private NeoStores Open(FileSystemAbstraction fs, PageCache pageCache, RecordFormats format, System.Func <FileSystemAbstraction, IdGeneratorFactory> idGeneratorFactory, params string[] config)
        {
            Debug.Assert(_neoStores == null, "Already opened");
            TestDirectory testDirectory = TestDirectory.TestDirectoryConflict(fs);

            testDirectory.PrepareDirectory(_testClass, null);
            Config       configuration = ConfigOf(config);
            StoreFactory storeFactory  = new StoreFactory(testDirectory.DatabaseLayout(), configuration, idGeneratorFactory(fs), pageCache, fs, format, NullLogProvider.Instance, EmptyVersionContextSupplier.EMPTY);

            return(_neoStores = _stores.Length == 0 ? storeFactory.OpenAllNeoStores(true) : storeFactory.OpenNeoStores(true, _stores));
        }
        public override Statement Apply(Statement @base, Description description)
        {
            if (_chain == null)
            {
                if (_fs == null)
                {
                    _fs = new EphemeralFileSystemRule();
                }
                this._pageCacheRule = new PageCacheRule(_pageCacheConfig);
                this._directory     = TestDirectory.TestDirectoryConflict(_clazz, _fs);
                this._chain         = RuleChain.outerRule(_fs).around(_directory).around(_pageCacheRule);
            }

            return(_chain.apply(@base, description));
        }
Exemple #3
0
 private void InitializeInstanceFields()
 {
     _testDirectory = TestDirectory.TestDirectoryConflict(_fs);
 }
 public EmbeddedDatabaseRule()
 {
     this._testDirectory = TestDirectory.TestDirectoryConflict();
 }