question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LineBreaks in formatting

See original GitHub issue

I’ve noticed the useLineBreaks parameter in formatters. How can i write an assertion that tells formatters to use line breaks? I couldn’t find this in the docs, is there something like

x.Should().BeEquivalentTo(y, ??? f => f.UseLineBreaks())

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
j-malycommented, Jun 16, 2019

Maybe I am not making myself clear, I am just interested on making the output more readable.

This assertion:

var a = new [] {"a", "b", "c", "d"}
var b = new [] {"b", "c", "d", "e"}

a.Should().BeEquivalentTo(b);

Prints something like:

Expected collection {“a”, “b”, “c”, “d”} to be equivalent to “b”, “c”, “d”, “e”}…

But it is not very readable when the objects in the collection are complex and have long ToString outputs. So I was hoping I could get it formatted like

Expected collection { “a”, “b”, “c”, “d” } to be equivalent to { “b”, “c”, “d”, “e” } …

0reactions
jnyrupcommented, Sep 1, 2018

Closed due to inactivity, please re-open if you have more to add.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Line and page breaks
Inside the text box, right-click, and then select Paragraph. · Select the Line and Page Breaks tab. · Under Textbox options, in the...
Read more >
Formatting Line Breaks
A line break starts formatted text at a new line. Line breaks are formatted with the .BREAK command. An alternative method of breaking...
Read more >
Line breaks in a Word document
On the Layout tab, in the Page Setup group, click Breaks, and then click Text Wrapping: Line Breaks in Word 365 · Press...
Read more >
The Dos and Don'ts of Adding an HTML Line Break
To do a line break in HTML, use the <br> tag. Simply place the tag wherever you want to force a line break....
Read more >
Add Line Breaks
This free online tool will add line breaks to any broken text you have. Scrunched-up text will instantly become more readable using this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found