1
<!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
3
<!-- Standard Head Part -->
5
<title>NUnit - StringAssert</title>
6
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
7
<meta http-equiv="Content-Language" content="en-US">
8
<meta name="norton-safeweb-site-verification" content="tb6xj01p4hgo5x-8wscsmq633y11-e6nhk-bnb5d987bseanyp6p0uew-pec8j963qlzj32k5x9h3r2q7wh-vmy8bbhek5lnpp5w4p8hocouuq39e09jrkihdtaeknua" />
9
<link rel="stylesheet" type="text/css" href="nunit.css">
10
<link rel="shortcut icon" href="favicon.ico">
12
<!-- End Standard Head Part -->
16
<!-- Standard Header for NUnit.org -->
18
<a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
1
<!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
3
<!-- Standard Head Part -->
5
<title>NUnit - StringAssert</title>
6
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
7
<meta http-equiv="Content-Language" content="en-US">
8
<meta name="norton-safeweb-site-verification" content="tb6xj01p4hgo5x-8wscsmq633y11-e6nhk-bnb5d987bseanyp6p0uew-pec8j963qlzj32k5x9h3r2q7wh-vmy8bbhek5lnpp5w4p8hocouuq39e09jrkihdtaeknua" />
9
<link rel="stylesheet" type="text/css" href="nunit.css">
10
<link rel="shortcut icon" href="favicon.ico">
12
<!-- End Standard Head Part -->
16
<!-- Standard Header for NUnit.org -->
18
<a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
20
20
<a href="http://www.nunit.org">NUnit</a>
21
21
<a class="active" href="index.html">Documentation</a>
24
<!-- End of Header -->
28
<h2>StringAssert (NUnit 2.2.3)</h2>
29
<p>The StringAssert class provides a number of methods that are useful
30
when examining string values.</p>
32
<div class="code" style="width: 36em">
33
<pre>StringAssert.Contains( string expected, string actual );
34
StringAssert.Contains( string expected, string actual,
36
StringAssert.Contains( string expected, string actual,
37
string message, params object[] args );
39
StringAssert.StartsWith( string expected, string actual );
40
StringAssert.StartsWith( string expected, string actual,
42
StringAssert.StartsWith( string expected, string actual,
43
string message, params object[] args );
45
StringAssert.EndsWith( string expected, string actual );
46
StringAssert.EndsWith( string expected, string actual,
48
StringAssert.EndsWith( string expected, string actual,
49
string message, params object[] args );
51
StringAssert.AreEqualIgnoringCase( string expected, string actual );
52
StringAssert.AreEqualIgnoringCase( string expected, string actual,
54
StringAssert.AreEqualIgnoringCase( string expected, string actual,
55
string message params object[] args );
57
StringAssert.IsMatch( string regexPattern, string actual );
58
StringAssert.IsMatch( string regexPattern, string actual,
60
StringAssert.IsMatch( string regexPattern, string actual,
61
string message, params object[] args );</pre>
69
<li><a href="index.html">NUnit 2.6</a></li>
71
<li><a href="getStarted.html">Getting Started</a></li>
72
<li><a href="writingTests.html">Writing Tests</a></li>
74
<li><a href="assertions.html">Assertions</a></li>
76
<li><a href="equalityAsserts.html">Equality Asserts</a></li>
77
<li><a href="identityAsserts.html">Identity Asserts</a></li>
78
<li><a href="conditionAsserts.html">Condition Asserts</a></li>
79
<li><a href="comparisonAsserts.html">Comparison Asserts</a></li>
80
<li><a href="typeAsserts.html">Type Asserts</a></li>
81
<li><a href="exceptionAsserts.html">Exception Asserts</a></li>
82
<li><a href="utilityAsserts.html">Utility Methods</a></li>
83
<li id="current"><a href="stringAssert.html">String Assert</a></li>
84
<li><a href="collectionAssert.html">Collection Assert</a></li>
85
<li><a href="fileAssert.html">File Assert</a></li>
86
<li><a href="directoryAssert.html">Directory Assert</a></li>
88
<li><a href="attributes.html">Attributes</a></li>
89
<li><a href="constraintModel.html">Constraints</a></li>
90
<li><a href="testContext.html">Test Context</a></li>
92
<li><a href="runningTests.html">Running Tests</a></li>
93
<li><a href="extensibility.html">Extensibility</a></li>
94
<li><a href="releaseNotes.html">Release Notes</a></li>
95
<li><a href="samples.html">Samples</a></li>
96
<li><a href="license.html">License</a></li>
98
<li><a href="vsTestAdapter.html">NUnit Test Adapter 0.90</a></li>
100
<li><a href="vsTestAdapterLicense.html">License</a></li>
102
<li><a href="&r=2.6.html"></a></li>
103
<li><a href="&r=2.6.html"></a></li>
106
<!-- End of Submenu -->
109
<!-- Standard Footer for NUnit.org -->
111
Copyright © 2012 Charlie Poole. All Rights Reserved.
113
<!-- End of Footer -->
24
<!-- End of Header -->
28
<h2>StringAssert (NUnit 2.2.3)</h2>
29
<p>The StringAssert class provides a number of methods that are useful
30
when examining string values.</p>
32
<div class="code" style="width: 36em">
33
<pre>StringAssert.Contains( string expected, string actual );
34
StringAssert.Contains( string expected, string actual,
36
StringAssert.Contains( string expected, string actual,
37
string message, params object[] args );
39
StringAssert.StartsWith( string expected, string actual );
40
StringAssert.StartsWith( string expected, string actual,
42
StringAssert.StartsWith( string expected, string actual,
43
string message, params object[] args );
45
StringAssert.EndsWith( string expected, string actual );
46
StringAssert.EndsWith( string expected, string actual,
48
StringAssert.EndsWith( string expected, string actual,
49
string message, params object[] args );
51
StringAssert.AreEqualIgnoringCase( string expected, string actual );
52
StringAssert.AreEqualIgnoringCase( string expected, string actual,
54
StringAssert.AreEqualIgnoringCase( string expected, string actual,
55
string message params object[] args );
57
StringAssert.IsMatch( string regexPattern, string actual );
58
StringAssert.IsMatch( string regexPattern, string actual,
60
StringAssert.IsMatch( string regexPattern, string actual,
61
string message, params object[] args );</pre>
69
<li><a href="index.html">NUnit 2.6.3</a></li>
71
<li><a href="getStarted.html">Getting Started</a></li>
72
<li><a href="writingTests.html">Writing Tests</a></li>
74
<li><a href="assertions.html">Assertions</a></li>
76
<li><a href="classicModel.html">Classic Model</a></li>
78
<li><a href="equalityAsserts.html">Equality Asserts</a></li>
79
<li><a href="identityAsserts.html">Identity Asserts</a></li>
80
<li><a href="conditionAsserts.html">Condition Asserts</a></li>
81
<li><a href="comparisonAsserts.html">Comparison Asserts</a></li>
82
<li><a href="typeAsserts.html">Type Asserts</a></li>
83
<li><a href="exceptionAsserts.html">Exception Asserts</a></li>
84
<li><a href="utilityAsserts.html">Utility Methods</a></li>
85
<li id="current"><a href="stringAssert.html">String Assert</a></li>
86
<li><a href="collectionAssert.html">Collection Assert</a></li>
87
<li><a href="fileAssert.html">File Assert</a></li>
88
<li><a href="directoryAssert.html">Directory Assert</a></li>
90
<li><a href="constraintModel.html">Constraint Model</a></li>
92
<li><a href="attributes.html">Attributes</a></li>
93
<li><a href="testContext.html">Test Context</a></li>
95
<li><a href="runningTests.html">Running Tests</a></li>
96
<li><a href="extensibility.html">Extensibility</a></li>
97
<li><a href="releaseNotes.html">Release Notes</a></li>
98
<li><a href="samples.html">Samples</a></li>
99
<li><a href="license.html">License</a></li>
101
<li><a href="vsTestAdapter.html">NUnit Test Adapter</a></li>
103
<li><a href="vsTestAdapterLicense.html">License</a></li>
104
<li><a href="vsTestAdapterReleaseNotes.html">Release Notes</a></li>
106
<li><a href="&r=2.6.3.html"></a></li>
107
<li><a href="&r=2.6.3.html"></a></li>
110
<!-- End of Submenu -->
113
<!-- Standard Footer for NUnit.org -->
115
Copyright © 2012 Charlie Poole. All Rights Reserved.
117
<!-- End of Footer -->