Search Results for

    Show / Hide Table of Contents

    ClassicAssert.True

    ClassicAssert.True and ClassicAssert.IsTrue test that the specified condition is true. The two forms are provided for compatibility with past versions of NUnit and NUnitLite.

    ClassicAssert.True(bool condition);
    ClassicAssert.True(bool condition, string message, params object[] params);
    
    ClassicAssert.IsTrue(bool condition);
    ClassicAssert.IsTrue(bool condition, string message, params object[] params);
    

    You can also use Assert.That with a Boolean argument to achieve the same result.

    Assert.That(condition);
    

    See Also

    • Condition Constraints
    • Edit this page
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0