Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

IsCollectionContaining

grahamrhay edited this page · 1 revision

IsCollectionContaining

Matches if any item in the collection meets the criteria:

    [Test]
    public void IsCollectionContaining()
    {
        var matchesCat = Contains.String("cat");
        var containsCat = new IsCollectionContaining(matchesCat);
        var actual = new[] { "the", "cat", "sat", "on", "the", "mat" };

        Assert.That(actual, containsCat);
        // or alternatively
        Assert.That(new[] { "aaa", "bbb", "ccc" }, Has.Items("aaa", "bbb"));
    }
Something went wrong with that request. Please try again.