thecoop commented on code in PR #14518:
URL: https://github.com/apache/lucene/pull/14518#discussion_r2054153636
##########
lucene/core/src/test/org/apache/lucene/document/TestDocument.java:
##########
@@ -233,7 +245,7 @@ public void testPositionIncrementMultiFields() throws
Exception {
PhraseQuery query = new PhraseQuery("indexed_not_tokenized", "test1",
"test2");
ScoreDoc[] hits = searcher.search(query, 1000).scoreDocs;
- assertEquals(1, hits.length);
+ assertThat(hits, arrayWithSize(1));
Review Comment:
I prefer the more declarative style of `assertThat`, and the assertion
failure specifies what the problem actually is, rather than 'this singular
value is not what is expected'
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]