//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Before public void before() throws org.neo4j.internal.kernel.api.exceptions.schema.MisconfiguredIndexException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void Before() { when(_mockedIndexProvider.ProviderDescriptor).thenReturn(PROVIDER_DESCRIPTOR); when(_mockedIndexProvider.storeMigrationParticipant(any(typeof(FileSystemAbstraction)), any(typeof(PageCache)))).thenReturn(Org.Neo4j.Kernel.impl.storemigration.StoreMigrationParticipant_Fields.NotParticipating); when(_mockedIndexProvider.bless(any(typeof(IndexDescriptor)))).thenCallRealMethod(); TestGraphDatabaseFactory factory = new TestGraphDatabaseFactory(); factory.FileSystem = Fs.get(); factory.KernelExtensions = Collections.singletonList(_mockedIndexProviderFactory); _db = ( GraphDatabaseAPI )factory.NewImpermanentDatabaseBuilder().setConfig(default_schema_provider, PROVIDER_DESCRIPTOR.name()).newGraphDatabase(); _ctxSupplier = _db.DependencyResolver.resolveDependency(typeof(ThreadToStatementContextBridge)); }
private void StartDb <T1>(KernelExtensionFactory <T1> indexProviderFactory) { if (_db != null) { _db.shutdown(); } TestGraphDatabaseFactory factory = new TestGraphDatabaseFactory(); factory.FileSystem = Fs.get(); factory.KernelExtensions = Collections.singletonList(indexProviderFactory); _db = ( GraphDatabaseAPI )factory.NewImpermanentDatabaseBuilder().setConfig(default_schema_provider, PROVIDER_DESCRIPTOR.name()).newGraphDatabase(); }