You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On calling org.beryx.textio.mock.MockTextTerminal#getOutput the returned string has all the new lines and leading/trailing spaces removed because org.beryx.textio.mock.MockTextTerminal#stripAll is called on the stored string before returning it.
Given that the output is joined using the new line as separator, I assume this has been done in order to have a uniform and linear output.
Unfortunately, this doesn't allow to test certain scenarios, like "Does the output ends with a new line?".
In my opinion, stripping should be an option that the consumer of the class can decide to use or not.
A simple overload of getOutput() with a boolean flag would be enough :)
The text was updated successfully, but these errors were encountered:
On calling
org.beryx.textio.mock.MockTextTerminal#getOutput
the returned string has all the new lines and leading/trailing spaces removed becauseorg.beryx.textio.mock.MockTextTerminal#stripAll
is called on the stored string before returning it.Given that the output is joined using the new line as separator, I assume this has been done in order to have a uniform and linear output.
Unfortunately, this doesn't allow to test certain scenarios, like "Does the output ends with a new line?".
In my opinion, stripping should be an option that the consumer of the class can decide to use or not.
A simple overload of
getOutput()
with a boolean flag would be enough :)The text was updated successfully, but these errors were encountered: