1

Is there a possibility to get back a list of failed and passed objects in Fluent Assertions?

E.g.

var results = actual.Should().BeEquivalentTo(tc.Expected);

I am trying to get all of the results so that I could build an HTML report, which would display the results there.

Can this be done?

YoungDad
  • 765
  • 2
  • 6
  • 14
  • 1
    https://fluentassertions.com/introduction => scroll down to "Assertion Scopes": Something like that? – Fildor Dec 07 '20 at 08:26
  • @YoungDad Are you looking for a structured form of deviation between `actual` and `expected`? – Peter Csala Dec 07 '20 at 08:44
  • Something like Assertion Scopes, but I want to store the results in a variable. I don't need just a comparison bool result, but the actual result. I see that the I want to work still with the failed list, e.g. use them in reporting, time, value, field etc. This seems, I would need to parse the exception string to something concrete, but is there a possibility to get actually the list, similarly as per `KellermanSoftware.CompareNetObjects;` where I can get it as `var differences = comparer.Compare(Expected, output).Differences;` ? – YoungDad Dec 07 '20 at 09:51

0 Answers0