~ubuntu-branches/debian/sid/nunit/sid

« back to all changes in this revision

Viewing changes to doc/testcaseBuilders.html

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2014-09-16 13:43:36 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140916134336-kjxz48tty6lx2ja5
Tags: 2.6.3+dfsg-1
* [c7bd1b5] Imported Upstream version 2.6.3+dfsg
* [bcb4bf8] Move nunit-console-runner to GAC-installed libnunit2.6, 
  don't treat it as a private lib. This lib is signed, and treated 
  as a GAC lib by consumers such as MonoDevelop.
* [7f08e99] Bump version to 2.6.3 as required
* [84535eb] Refreshed patches
* [8479f61] Split package up into per-assembly packages. This makes 
  ABI tracking easier in the future, as we can meaningfully have GAC 
  policy for cases where ABI isn't truly bumped, and no policy for 
  cases where it is. For example, if nunit.framework bumps ABI but 
  nunit.core does not, previously we would need to rebuild everything 
  using NUnit, but under the new split packaging, that rebuild would 
  not be needed for apps only using nunit.core.
* [17a7dc7] Add missing nunit.mocks.dll to nunit.pc

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 - TestcaseBuilders</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">
11
 
</head>
12
 
<!-- End Standard Head Part -->
13
 
 
14
 
<body>
15
 
 
16
 
<!-- Standard Header for NUnit.org -->
17
 
<div id="header">
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">
 
2
<html>
 
3
<!-- Standard Head Part -->
 
4
<head>
 
5
<title>NUnit - TestcaseBuilders</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">
 
11
</head>
 
12
<!-- End Standard Head Part -->
 
13
 
 
14
<body>
 
15
 
 
16
<!-- Standard Header for NUnit.org -->
 
17
<div id="header">
 
18
  <a id="logo" href="http://www.nunit.org"><img src="img/logo.gif" alt="NUnit.org" title="NUnit.org"></a>
19
19
  <div id="nav">
20
20
    <a href="http://www.nunit.org">NUnit</a>
21
21
    <a class="active" href="index.html">Documentation</a>
22
 
  </div>
23
 
</div>
24
 
<!-- End of Header -->
25
 
 
26
 
<div id="content">
27
 
 
28
 
<h3>TestCaseBuilders (NUnit 2.4)</h3>
29
 
 
30
 
<h4>Purpose</h4>
31
 
<p>TestCaseBuilders create Tests based on a MethodInfo. NUnit uses several
32
 
TestCaseBuilders internally to create various kinds of TestMethods.
33
 
 
34
 
<h4>Extension Point</h4>
35
 
Addins use the host to access this extension point by name:
36
 
 
37
 
<pre>
38
 
        IExtensionPoint testCaseBuilders = host.GetExtensionPoint( "TestCaseBuilders" );</pre>
39
 
 
40
 
<h4>Interfaces</h4>
41
 
<p>The extension object passed to Install must implement either the ITestCaseBuilder 
42
 
or the ITestCaseBuilder2 interface:
43
 
 
44
 
<pre>
45
 
        public interface ITestCaseBuilder
46
 
        {
47
 
                bool CanBuildFrom( MethodInfo method );
48
 
                Test BuildFrom( MethodInfo method );
49
 
        }
50
 
 
51
 
        public interface ITestCaseBuilder2 : ITestCaseBuilder
52
 
        {
53
 
                bool CanBuildFrom( MethodInfo method, Test suite );
54
 
                Test BuildFrom( MethodInfo method, Test suite );
55
 
        }
56
 
</pre>
57
 
 
58
 
<p>NUnit will call ITestCaseBuilder2 if it is available. Otherwise
59
 
ITestCaseBuilder will be used.
60
 
 
61
 
<p>The CanBuildFrom method should return true if the addin can build
62
 
a test from the MethodInfo provided. Some TestCaseBuilder addins are only 
63
 
intended to apply to methods within a specific type of fixture. The
64
 
suite argument of the ITestCaseBuilder2 interface may be used to make
65
 
this determination.
66
 
 
67
 
<p>The BuildFrom method should return a test constructed over the MethodInfo
68
 
provided as an argument or null if the method cannot be used.
69
 
 
70
 
 
71
 
</div>
72
 
 
73
 
<!-- Submenu -->
74
 
<div id="subnav">
75
 
<ul>
76
 
<li><a href="index.html">NUnit 2.6</a></li>
77
 
<ul>
78
 
<li><a href="getStarted.html">Getting&nbsp;Started</a></li>
79
 
<li><a href="writingTests.html">Writing&nbsp;Tests</a></li>
80
 
<li><a href="runningTests.html">Running&nbsp;Tests</a></li>
81
 
<li><a href="extensibility.html">Extensibility</a></li>
82
 
<ul>
83
 
<li><a href="customConstraints.html">Custom&nbsp;Constraints</a></li>
84
 
<li><a href="nunitAddins.html">NUnit&nbsp;Addins</a></li>
85
 
<ul>
86
 
<li><a href="suiteBuilders.html">SuiteBuilders</a></li>
87
 
<li id="current"><a href="testcaseBuilders.html">TestcaseBuilders</a></li>
88
 
<li><a href="testDecorators.html">TestDecorators</a></li>
89
 
<li><a href="testcaseProviders.html">TestcaseProviders</a></li>
90
 
<li><a href="datapointProviders.html">DatapointProviders</a></li>
91
 
<li><a href="eventListeners.html">EventListeners</a></li>
92
 
</ul>
93
 
<li><a href="extensionTips.html">Tips&nbsp;for&nbsp;Extenders</a></li>
94
 
</ul>
95
 
<li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
96
 
<li><a href="samples.html">Samples</a></li>
97
 
<li><a href="license.html">License</a></li>
98
 
</ul>
99
 
<li><a href="vsTestAdapter.html">NUnit&nbsp;Test&nbsp;Adapter&nbsp;0.90</a></li>
100
 
<ul>
101
 
<li><a href="vsTestAdapterLicense.html">License</a></li>
102
 
</ul>
103
 
<li><a href="&r=2.6.html"></a></li>
104
 
<li><a href="&r=2.6.html"></a></li>
105
 
</ul>
106
 
</div>
107
 
<!-- End of Submenu -->
108
 
 
109
 
 
110
 
<!-- Standard Footer for NUnit.org -->
111
 
<div id="footer">
112
 
  Copyright &copy; 2012 Charlie Poole. All Rights Reserved.
113
 
</div>
114
 
<!-- End of Footer -->
115
 
 
116
 
</body>
117
 
</html>
 
22
  </div>
 
23
</div>
 
24
<!-- End of Header -->
 
25
 
 
26
<div id="content">
 
27
 
 
28
<h3>TestCaseBuilders (NUnit 2.4)</h3>
 
29
 
 
30
<h4>Purpose</h4>
 
31
<p>TestCaseBuilders create Tests based on a MethodInfo. NUnit uses several
 
32
TestCaseBuilders internally to create various kinds of TestMethods.
 
33
 
 
34
<h4>Extension Point</h4>
 
35
Addins use the host to access this extension point by name:
 
36
 
 
37
<pre>
 
38
        IExtensionPoint testCaseBuilders = host.GetExtensionPoint( "TestCaseBuilders" );</pre>
 
39
 
 
40
<h4>Interfaces</h4>
 
41
<p>The extension object passed to Install must implement either the ITestCaseBuilder 
 
42
or the ITestCaseBuilder2 interface:
 
43
 
 
44
<pre>
 
45
        public interface ITestCaseBuilder
 
46
        {
 
47
                bool CanBuildFrom( MethodInfo method );
 
48
                Test BuildFrom( MethodInfo method );
 
49
        }
 
50
 
 
51
        public interface ITestCaseBuilder2 : ITestCaseBuilder
 
52
        {
 
53
                bool CanBuildFrom( MethodInfo method, Test suite );
 
54
                Test BuildFrom( MethodInfo method, Test suite );
 
55
        }
 
56
</pre>
 
57
 
 
58
<p>NUnit will call ITestCaseBuilder2 if it is available. Otherwise
 
59
ITestCaseBuilder will be used.
 
60
 
 
61
<p>The CanBuildFrom method should return true if the addin can build
 
62
a test from the MethodInfo provided. Some TestCaseBuilder addins are only 
 
63
intended to apply to methods within a specific type of fixture. The
 
64
suite argument of the ITestCaseBuilder2 interface may be used to make
 
65
this determination.
 
66
 
 
67
<p>The BuildFrom method should return a test constructed over the MethodInfo
 
68
provided as an argument or null if the method cannot be used.
 
69
 
 
70
 
 
71
</div>
 
72
 
 
73
<!-- Submenu -->
 
74
<div id="subnav">
 
75
<ul>
 
76
<li><a href="index.html">NUnit 2.6.3</a></li>
 
77
<ul>
 
78
<li><a href="getStarted.html">Getting&nbsp;Started</a></li>
 
79
<li><a href="writingTests.html">Writing&nbsp;Tests</a></li>
 
80
<li><a href="runningTests.html">Running&nbsp;Tests</a></li>
 
81
<li><a href="extensibility.html">Extensibility</a></li>
 
82
<ul>
 
83
<li><a href="customConstraints.html">Custom&nbsp;Constraints</a></li>
 
84
<li><a href="nunitAddins.html">NUnit&nbsp;Addins</a></li>
 
85
<ul>
 
86
<li><a href="suiteBuilders.html">SuiteBuilders</a></li>
 
87
<li id="current"><a href="testcaseBuilders.html">TestcaseBuilders</a></li>
 
88
<li><a href="testDecorators.html">TestDecorators</a></li>
 
89
<li><a href="testcaseProviders.html">TestcaseProviders</a></li>
 
90
<li><a href="datapointProviders.html">DatapointProviders</a></li>
 
91
<li><a href="eventListeners.html">EventListeners</a></li>
 
92
</ul>
 
93
<li><a href="extensionTips.html">Tips&nbsp;for&nbsp;Extenders</a></li>
 
94
</ul>
 
95
<li><a href="releaseNotes.html">Release&nbsp;Notes</a></li>
 
96
<li><a href="samples.html">Samples</a></li>
 
97
<li><a href="license.html">License</a></li>
 
98
</ul>
 
99
<li><a href="vsTestAdapter.html">NUnit&nbsp;Test&nbsp;Adapter</a></li>
 
100
<ul>
 
101
<li><a href="vsTestAdapterLicense.html">License</a></li>
 
102
<li><a href="vsTestAdapterReleaseNotes.html">Release&nbsp;Notes</a></li>
 
103
</ul>
 
104
<li><a href="&r=2.6.3.html"></a></li>
 
105
<li><a href="&r=2.6.3.html"></a></li>
 
106
</ul>
 
107
</div>
 
108
<!-- End of Submenu -->
 
109
 
 
110
 
 
111
<!-- Standard Footer for NUnit.org -->
 
112
<div id="footer">
 
113
  Copyright &copy; 2012 Charlie Poole. All Rights Reserved.
 
114
</div>
 
115
<!-- End of Footer -->
 
116
 
 
117
</body>
 
118
</html>