Legacy Documentation. View NUnit 3 Documentation

StringAssert

The StringAssert class provides a number of methods that are useful when examining string values.

StringAssert.Contains( string expected, string actual );
StringAssert.Contains( string expected, string actual,
                string message );
StringAssert.Contains( string expected, string actual,
                string message, params object[] args );

StringAssert.StartsWith( string expected, string actual );
StringAssert.StartsWith( string expected, string actual,
                string message );
StringAssert.StartsWith( string expected, string actual,
                string message, params object[] args );

StringAssert.EndsWith( string expected, string actual );
StringAssert.EndsWith( string expected, string actual,
                string message );
StringAssert.EndsWith( string expected, string actual,
                string message, params object[] args );

StringAssert.AreEqualIgnoringCase( string expected, string actual );
StringAssert.AreEqualIgnoringCase( string expected, string actual,
                string message );
StringAssert.AreEqualIgnoringCase( string expected, string actual,
                string message params object[] args );