In NUnit, I can write either
Assert.That(5, Is.EqualTo(5));
or
Assert.AreEqual(5, 5);
Is there any functional difference between these two forms or is the choice between the two just down to personal preference and perception of readability?
There isn't any semantic difference between the examples that you give. It solely comes down to preference.
The only difference is readability, and your preference on that matter. It is worth noting that the older syntax has been reimplemented to work off of the new behind the scenes, so that are functionally the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With