Skip to content

Commit

Permalink
Print commas at the end of the line
Browse files Browse the repository at this point in the history
When using line breaks, print commas behind the listed items, instead
of on a new line.

Before:
```
Expected someCollection {
    item1
    ,
    item2
    ,
```
After:
```
Expected someCollection {
    item1,
    item2,
```
  • Loading branch information
ronaldkroon committed Jun 24, 2022
1 parent 59e96d4 commit c90a430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/FluentAssertions/Formatting/DefaultValueFormatter.cs
Expand Up @@ -42,7 +42,7 @@ public void Format(object value, FormattedObjectGraph formattedGraph, Formatting
{
if (context.UseLineBreaks)
{
formattedGraph.AddLine(value.ToString());
formattedGraph.AddFragmentOnNewLine(value.ToString());
}
else
{
Expand Down

0 comments on commit c90a430

Please sign in to comment.