assertj
assertj copied to clipboard
Rename public API methods containing 'NewLine' to 'Newline'
Check List:
- Fixes #2754
- Unit tests : NO (see below)
- Javadoc with a code example (on API only) : NO (Updated existing JavaDoc on lowercase methods, no duplicate JavaDoc on deprecated uppercase methods)
- PR meets the contributing guidelines, I think. This is my first PR for this project. If not, let me know 🙂
Changes:
-
Strings:-
Renamed
assertContainsIgnoringNewLines(uppercase) toassertContainsIgnoringNewlines(lowercase). I thought that since this classes is in theinternalpackage, I could safely rename the method, instead of keeping the uppercase one around for backward compatibility.
-
Renamed
-
AbstractCharSequenceAssert:-
Added
containsIgnoringNewlines(lowercase) -
Deprecated
containsIgnoringNewLines(uppercase), keeping this one around for backward compatibility -
Added
isEqualIgnoringNewlines(lowercase) -
Deprecated
isEqualIgnoringNewLines(uppercase), keeping this one around for backward compatibility
-
Added
- Unit tests: Updated for the exisiting public methods, didn't add any new unit tests for the deprecated methods. If required, I can add them.
Please note
- SonarLint throws up warnings about blocking issues: the uppercase and lowercase method names are confusing.
- I have not copied the JavaDoc from the lowercase methods to the uppercase methods.
Not changed:
- Errors concerning the aforementioned assertions:
- Class
ShouldBeEqualIgnoringNewLinesand its factory methodshouldBeEqualIgnoringNewLines; - Class
ShouldBeEqualIgnoringNewLineDifferencesand its factory methodshouldBeEqualIgnoringNewLineDifferences.
- Class
These can be changed, but I'm not sure how to name them. Change only the factory methods? Add a lowercase factory method? Duplicate the entire class (to lowercase) and deprecate the uppercase one?