public virtual void EnsureStarted() { lock (this) { if (_database == null) { _database = ( GraphDatabaseAPI )_databaseBuilder.newGraphDatabase(); _databaseLayout = _database.databaseLayout(); _statementSupplier = ResolveDependency(typeof(ThreadToStatementContextBridge)); } } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void individualFileCopyFailsIfStoreIdMismatch() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void IndividualFileCopyFailsIfStoreIdMismatch() { // given a file exists on the server AddData(_graphDb); File expectedExistingFile = _graphDb.databaseLayout().file(EXISTING_FILE_NAME); // and SimpleCatchupClient simpleCatchupClient = new SimpleCatchupClient(_graphDb, _fsa, _catchupClient, _catchupServer, _temporaryDirectory, _logProvider); // when we copy that file using a different storeId StoreCopyFinishedResponse storeCopyFinishedResponse = simpleCatchupClient.RequestIndividualFile(expectedExistingFile, _wrongStoreId); simpleCatchupClient.Close(); // then the response from the server should be an error message that describes a store ID mismatch assertEquals(StoreCopyFinishedResponse.Status.EStoreIdMismatch, storeCopyFinishedResponse.Status()); }
public override DatabaseLayout DatabaseLayout() { return(_database.databaseLayout()); }