Build/Test Issues

Do not strip messages on new line

Started by jgauffin on 4,305 views

I got the following test:

[Fact]
public void parameter_with_space_cannot_be_a_parameter_revert_it_to_text()
{
    var sut = new StringFormatter();

    var result = sut.Format("Hello {{{name}}}! {stupid } strange}", new { name = "Jonas" });

    result.Should().Be("Hello {Jonas}! {stupid } strange}");
}


It runs OK in the Resharper test runner and produces a correct error:

Xunit.Sdk.AssertException
Expected string to be
"Hello {{Jonas}}! {{stupid }} strange}}" with a length of 33, but
"Hello {{Jonas}}! {{stupid strange}}" has a length of 32.


However, if I hover over the NCrunch red "X" I get the following:

External image

And when I click on the X:

External image

If I click on the link in the above screenshot I get the complete message:

External image


Can you at least show the first couple of lines when hovering or clicking on the X?
Hi, thanks for sharing this issue!

It looks like the CR/LF in the exception message is causing some problems in the UI. I'll see if I can get this fixed, I'm fairly certain it will be easy to reproduce.


Thanks again,

Remco

Post a reply

Log in to reply.