Search Results for

    Show / Hide Table of Contents

    WhiteSpace Constraint

    The WhiteSpaceConstraint tests if a string contains only white-space.

    The constraint is the equivalent of String.IsNullOrWhiteSpace

    White-space characters are defined by the Unicode standard as interpreted by Char.IsWhiteSpace method.

    Constructor

    WhiteSpaceConstraint()
    

    Syntax

    Is.WhiteSpace  // From version 4.2
    

    Examples of Use

    Assert.That(" ", Is.WhiteSpace);
    Assert.That("A String", Is.Not.WhiteSpace);
    
    • 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