//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void testConsume() throws java.io.IOException public virtual void testConsume() { TokenStream ts = new EmptyTokenStream(); ts.reset(); assertFalse(ts.incrementToken()); ts.end(); ts.close(); // try again with reuse: ts.reset(); assertFalse(ts.incrementToken()); ts.end(); ts.close(); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void testIndexWriter_LUCENE4656() throws java.io.IOException public virtual void testIndexWriter_LUCENE4656() { Directory directory = newDirectory(); IndexWriter writer = new IndexWriter(directory, newIndexWriterConfig(TEST_VERSION_CURRENT, null)); TokenStream ts = new EmptyTokenStream(); assertFalse(ts.hasAttribute(typeof(TermToBytesRefAttribute))); Document doc = new Document(); doc.add(new StringField("id", "0", Field.Store.YES)); doc.add(new TextField("description", ts)); // this should not fail because we have no TermToBytesRefAttribute writer.addDocument(doc); assertEquals(1, writer.numDocs()); writer.close(); directory.close(); }