Search Results for

    Show / Hide Table of Contents

    Null Constraint

    NullConstraint tests that a value is null.

    Constructor

    NullConstraint()
    

    Syntax

    Is.Null
    

    Examples of Use

    [Test]
    public void NullConstraint_Examples()
    {
        object anObject = null;
        Assert.That(anObject, Is.Null);
        
        anObject = "something";
        Assert.That(anObject, Is.Not.Null);
    }
    
    • 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