Search Results for

    Show / Hide Table of Contents

    NoItem Constraint

    NoItemConstraint applies a constraint to each item in a collection, succeeding only if all of them fail. An exception is thrown if the actual value passed does not implement IEnumerable.

    Constructor

    NoItemConstraint(Constraint itemConstraint)
    

    Syntax

    Has.None...
    

    Examples of Use

    int[] iarray = new int[] { 1, 2, 3 };
    string[] sarray = new string[] { "a", "b", "c" };
    Assert.That(iarray, Has.None.Null);
    Assert.That(sarray, Has.None.EqualTo("d"));
    Assert.That(iarray, Has.None.LessThan(0));
    
    • 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