Awesome AssertJ: Use isEqualToNormalizingNewlines To Assert With Text Block
A blog by @mrhaki

A Java text block is an easy way to have a multiline string value. But there is a catch if we want to use a text block with the assertion method isEqualTo. Suppose you have written a piece of code that create a new string value where the line endings are defined using System.lineSeparator(). The string value would have the...

#dev #softwaredevelopment #Java #Testing #AssertJ

https://jdriven.com/blog/2026/02/Awesome-AssertJ-Use-isEqualToNormalizingNewlines-To-Assert-With-Text-Block/

Awesome AssertJ: Use isEqualToNormalizingNewlines To Assert With Text Block

A Java text block is an easy way to have a multiline string value. But there is a catch if we want to use a text block with the assertion method isEqualTo. Suppose you have written a piece of code tha

JDriven Blog