paulirwin commented on code in PR #1018: URL: https://github.com/apache/lucenenet/pull/1018#discussion_r1845264220
########## src/Lucene.Net.Tests/Document/TestBinaryDocument.cs: ########## @@ -95,24 +89,35 @@ public virtual void TestCompressionTools() IIndexableField binaryFldCompressed = new StoredField("binaryCompressed", CompressionTools.Compress(binaryValCompressed.GetBytes(Encoding.UTF8))); IIndexableField stringFldCompressed = new StoredField("stringCompressed", CompressionTools.CompressString(binaryValCompressed)); - var doc = new Documents.Document {binaryFldCompressed, stringFldCompressed}; + var doc = new Document(); + doc.Add(binaryFldCompressed); + doc.Add(stringFldCompressed); + + // add the doc to a ram index using Directory dir = NewDirectory(); using RandomIndexWriter writer = new RandomIndexWriter(Random, dir); writer.AddDocument(doc); + // open a reader and fetch the document using IndexReader reader = writer.GetReader(); Document docFromReader = reader.Document(0); Assert.IsTrue(docFromReader != null); + // fetch the binary compressed field and compare it's content with the original one + // LUCENENET: was `= new String(CompressionTools.decompress(docFromReader.getBinaryValue("binaryCompressed")), StandardCharsets.UTF_8);` string binaryFldCompressedTest = Encoding.UTF8.GetString( Review Comment: Changed for now, and filed #1027 for that review. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org