What is the simplest way to completely replace an assertion message using FA (and nunit)? -


for example;

results.errors.count.should().be(0, $"because {results.errors[0]}"); 

produces result message:

expected value 0 because 'name' should not empty., found 2. 

but want, in particular instance (invocation of assertion) value of results.errors[0], message just: 'name' should not empty.

(as aside want pass concatenated string representation of entire results.errors array, linq/lambda skills aren't there yet)!

so how can fa use supply message string?

you can't that. because part baked language promote failure messages natural possible.


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -