Skip to content

CollectionSupersetConstraint

Charlie Poole edited this page Jan 31, 2016 · 4 revisions

CollectionSupersetConstraint tests that one IEnumerable is a superset of another. If the actual value passed does not implement IEnumerable, an exception is thrown.

Constructor

CollectionSupersetConstraint( IEnumerable )

Syntax

Is.SupersetOf( IEnumerable )

Example of Use

int[] iarray = new int[] { 1, 2, 3 };
Assert.That( iarray, Is.SupersetOf( new int[] { 1, 3 }) );
Clone this wiki locally