testfx icon indicating copy to clipboard operation
testfx copied to clipboard

Capture Multiple Assertion Support

Open Grauenwolf opened this issue 3 years ago • 0 comments

Description

There are times when we want to capture multiple assertions at the same time. For example, checking a set of properties for equality.

Assert.AreEqual(key, echo.EmployeeClassificationKey);
Assert.AreEqual(row.EmployeeClassificationName, echo.EmployeeClassificationName);
Assert.AreEqual(row.IsEmployee, echo.IsEmployee);
Assert.AreEqual(row.IsExempt, echo.IsExempt);

It would be useful if we had the equivalent to NUnit's Assert.Multiple feature.

https://docs.nunit.org/articles/nunit/writing-tests/assertions/multiple-asserts.html

An alternate implementation is assertion scopes from Fluent Assertions.

https://fluentassertions.com/introduction#assertion-scopes

Grauenwolf avatar Jul 10 '21 06:07 Grauenwolf