//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()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void individualFileCopyWorks() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void IndividualFileCopyWorks() { // given a file exists on the server AddData(_graphDb); File existingFile = new File(_temporaryDirectory, EXISTING_FILE_NAME); // and SimpleCatchupClient simpleCatchupClient = new SimpleCatchupClient(_graphDb, _fsa, _catchupClient, _catchupServer, _temporaryDirectory, _logProvider); // when we copy that file _pageCache.flushAndForce(); StoreCopyFinishedResponse storeCopyFinishedResponse = simpleCatchupClient.RequestIndividualFile(existingFile); simpleCatchupClient.Close(); // then the response is successful assertEquals(StoreCopyFinishedResponse.Status.Success, storeCopyFinishedResponse.Status()); // then the contents matches FileContentEquals(ClientFileToDatabaseFile(existingFile), existingFile); }