Is there a functional difference between Assert.That and traditional syntax?

In NUnit, I can write either

Assert.That(5, Is.EqualTo(5));

or

Assert.AreEqual(5, 5);

Is there any functional difference between the two forms or a choice between the two, up to personal preferences and perceptions of readability?

+5
source share
3 answers

There is no semantic difference between the examples you give. It is entirely up to preference.

+4
source

The only difference is readability and your preferences in this regard. It is worth noting that the old syntax was redefined to work the new behind the scenes, so that they are functionally the same.

+2
source

, . API . .

0

All Articles