source: BMXNET_RPMS_dotNET_UTILITIES-BMX/branch/IHS BMX Framework/lib/NUnit/NUnit-2.5.10.11092/doc/delayedConstraint.html@ 1146

Last change on this file since 1146 was 1146, checked in by Sam Habiel, 13 years ago

Initial Import of BMX4

File size: 3.8 KB
Line 
1<!-- saved from url=(0014)about:internet --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2<html>
3<!-- Standard Head Part -->
4<head>
5<title>NUnit - DelayedConstraint</title>
6<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
7<meta http-equiv="Content-Language" content="en-US">
8<link rel="stylesheet" type="text/css" href="nunit.css">
9<link rel="shortcut icon" href="favicon.ico">
10</head>
11<!-- End Standard Head Part -->
12
13<body>
14
15<!-- Standard Header for NUnit.org -->
16<div id="header">
17 <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
18 <div id="nav">
19 <a href="http://www.nunit.org">NUnit</a>
20 <a class="active" href="index.html">Documentation</a>
21 </div>
22</div>
23<!-- End of Header -->
24
25<div id="content">
26
27<h2>Delayed Constraint (NUnit 2.5)</h2>
28
29<p><b>DelayedConstraint</b> delays the application of another constraint until a certain
30 amount of time has passed. In it's simplest form, it replaces use of a Sleep
31 in the code but it also supports polling, which may allow use of a longer
32 maximum time while still keeping the tests as fast as possible.
33
34<p>The <b>After</b> modifier is permitted on any constraint, and the delay applies to
35 the entire expression up to the point where <b>After</b> appears.
36
37<p>Use of a <b>DelayedConstraint</b> with a value argument makes no sense, since
38 the value will be extracted at the point of call. It's intended use is with
39 delegates and references. If a delegate is used with polling, it may be called
40 multiple times so only methods without side effects should be used in this way.
41
42<table class="constraints">
43<tr><th>Syntax Helper</th><th>Constructor</th><th>Operation</th></tr>
44<tr><td>After(int)</td><td>DelayedConstraint(Constraint, int)</td></td><td>tests that a constraint is satisfied after a delay.</tr>
45<tr><td>After(int, int)</td><td>DelayedConstraint(Constraint, int, int)</td></td><td>tests that a constraint is satisfied after a delay using polling.</tr>
46</table>
47
48
49</div>
50
51<!-- Submenu -->
52<div id="subnav">
53<ul>
54<li><a href="index.html">NUnit 2.5.10</a></li>
55<ul>
56<li><a href="getStarted.html">Getting&nbsp;Started</a></li>
57<li><a href="assertions.html">Assertions</a></li>
58<li><a href="constraintModel.html">Constraints</a></li>
59<ul>
60<li><a href="equalConstraint.html">Equal&nbsp;Constraint</a></li>
61<li><a href="sameasConstraint.html">SameAs&nbsp;Constraint</a></li>
62<li><a href="conditionConstraints.html">Condition&nbsp;Constraints</a></li>
63<li><a href="comparisonConstraints.html">Comparison&nbsp;Constrants</a></li>
64<li><a href="pathConstraints.html">Path&nbsp;Constraints</a></li>
65<li><a href="typeConstraints.html">Type&nbsp;Constraints</a></li>
66<li><a href="stringConstraints.html">String&nbsp;Constraints</a></li>
67<li><a href="collectionConstraints.html">Collection&nbsp;Constraints</a></li>
68<li><a href="propertyConstraint.html">Property&nbsp;Constraint</a></li>
69<li><a href="throwsConstraint.html">Throws&nbsp;Constraint</a></li>
70<li><a href="compoundConstraints.html">Compound&nbsp;Constraints</a></li>
71<li id="current"><a href="delayedConstraint.html">Delayed&nbsp;Constraint</a></li>
72<li><a href="listMapper.html">List&nbsp;Mapper</a></li>
73<li><a href="reusableConstraint.html">Reusable&nbsp;Constraint</a></li>
74</ul>
75<li><a href="attributes.html">Attributes</a></li>
76<li><a href="runningTests.html">Running&nbsp;Tests</a></li>
77<li><a href="extensibility.html">Extensibility</a></li>
78<li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
79<li><a href="samples.html">Samples</a></li>
80<li><a href="license.html">License</a></li>
81</ul>
82</ul>
83</div>
84<!-- End of Submenu -->
85
86
87<!-- Standard Footer for NUnit.org -->
88<div id="footer">
89 Copyright &copy; 2010 Charlie Poole. All Rights Reserved.
90</div>
91<!-- End of Footer -->
92
93</body>
94</html>
Note: See TracBrowser for help on using the repository browser.