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

php - How to display all orders for a single product showing the most recent first? Woocommerce -

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

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -