-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add option to always add a newline to custom message #2
Comments
@silkfire The formatting of message + stacktrace is something that is done directly in the XUnit runner afaik, the only way I see to modify it directly is to add an extra newline to the message itself as XUnit does not support such a behaviour in its formatting. That sounds a bit clunky. One of the features that wasn't trivial to implement was filtering the XUnitMessages parts of the stacktrace (just like XUnit does with its own stacktrace parts), I might take another look to see if there is a way to get this to work. This might be an opportunity to add such a feature. Any specific reason you want to have the newline? |
It's more of a personal preference of mine. I like when the main message is separated from the rest visually. I thought this library was in control of the custom message, meaning that it would be easy to add an option for this, although you had to edit a lot of methods to get it to work. Would be exciting if you could find a working solution for this :) |
@silkfire Looking at xUnit, the easiest way to implement what you need in the meantime would probably be:
This will modify the reporter to prepend newlines before reporting the stacktrace. Beware that depending on your environment (TeamCity, ReShaper, etc...) another |
I'm running my tests in ReSharper while developing so that's probably not an option then. |
I absolutely love this library, but one thing that has been bothering me is that the output is always attached with the stack trace in the output window, something I don't really like.
To remedy this, I have to append a newline (
\n
) to all my custom messages.It'd be nice if there was a configuration or perhaps a global static configuration that would allow me to append the newline (or other custom text) to all custom messages.
Something along the lines of:
The text was updated successfully, but these errors were encountered: