Skip to content

SubstringConstraint

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

SubstringConstraint tests for a substring.

Constructor

```C# SubstringConstraint(string expected) ```

Syntax

```C# Does.Contain(string expected) ```

Modifiers

```C# ...IgnoreCase ```

Examples of Use

```C# string phrase = "Make your tests fail before passing!"

Assert.That( phrase, Does.Contain( "tests fail" ) ); Assert.That( phrase, Does.Not.Contain( "tests pass" ) ); Assert.That( phrase, Does.Contain( "make" ).IgnoreCase );


Clone this wiki locally