Differences between Assert.True and Assert.IsTrue in NUnit?

No difference. Assert.True() and others (without Is) were added since v2.5.

From documentation for the version 2.5: (nunit v2.5)

Two forms are provided for the True, False, Null and NotNull
conditions. The “Is” forms are compatible with earlier versions of the
NUnit framework, while those without “Is” are provided for
compatibility with NUnitLite

BTW, Disassembled nunit.framework.dll (using ILSPY)

public static void IsTrue(bool condition)
{
    Assert.That(condition, Is.True, null, null);
}

public static void True(bool condition)
{
    Assert.That(condition, Is.True, null, null);
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)