-
Couldn't load subscription status.
- Fork 2k
Replace doesNotContains and Collectors.joining() #754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Use String.join() for better readability and simplicity
| assertThat(allText).contains( | ||
| List.of("Page 1 of 4", "Page 2 of 4", "Page 3 of 4", "Page 4 of 4", "PDF Bookmark Sample")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the tests are passing with doesNotContain, the purpose of this test is to verify that the headers/footers were excluded. I don't understand how you see the failing test, the CI is green with respect to this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the ExtractedTextFormatterTests class and it seems to be a "\n" problem.
Window: "\r\n"
Linux or Mac: "\n"
I think it's because System.lineSeparator() works in a different way between Windows and Linux or Mac OS.
I will figure it out how this code works on windows as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was my idea, but when I did some research into why the test was failing, I guess that the reason I was confused was because the name of the method was unclear.
How about changing the method name like this as below ?
If we've already discussed the method name, please ignore it
- classPathRead() -> excludeHeadersAndFootersPdfPages()
- classPathRead() -> withoutHeadersAndFooters()
- other
|
Nothing to change |


[refactor: Collectors.joining() -> String.join()]issue link
doesNotContains->containand ReplaceCollectors.joining()toString.join()#753