コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void markAsOnlineTwice() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void MarkAsOnlineTwice()
        {
            _index = CreateIndex();
            _index.markAsOnline();

            _index.IndexWriter.addDocument(NewDocument());
            _index.markAsOnline();

            assertTrue(_index.Online, "Should have had online status set");
        }
コード例 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void markAsOnlineIsRespectedByOtherWriter() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void MarkAsOnlineIsRespectedByOtherWriter()
        {
            _index = CreateIndex();
            _index.markAsOnline();
            _index.close();

            _index = OpenIndex();
            _index.IndexWriter.addDocument(NewDocument());
            _index.close();

            _index = OpenIndex();
            assertTrue(_index.Online, "Should have had online status set");
        }