| 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 - RequiredAddin</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 | <h3>RequiredAddinAttribute (NUnit 2.5)</h3>
|
|---|
| 28 |
|
|---|
| 29 | <p>The RequiredAddin attribute is used to indicate that an
|
|---|
| 30 | assembly requires a particular addin in order to function correctly. If
|
|---|
| 31 | that addin is not installed, the entire assembly is marked as non-runnable.
|
|---|
| 32 |
|
|---|
| 33 | <p><b>Note:</b> In the Alpha-3 release, this attribute may be applied to
|
|---|
| 34 | classes or methods as well. This is of limited utility, for two reasons:
|
|---|
| 35 | <ol>
|
|---|
| 36 | <li>If the method or class is not recognized as a test, due to the addin
|
|---|
| 37 | being missing, then NUnit will never process it.
|
|---|
| 38 | <li>If the method or class is handled by some a different addin, that
|
|---|
| 39 | addin may not recognize the attribute.
|
|---|
| 40 | </ol>
|
|---|
| 41 | <p>The attribute will be limited to assemblies only in the next release.
|
|---|
| 42 |
|
|---|
| 43 | <h4>Example</h4>
|
|---|
| 44 |
|
|---|
| 45 | <In the
|
|---|
| 46 |
|
|---|
| 47 | <div class="code"><pre>
|
|---|
| 48 | [assembly: RequiredAddin("MyTestFixtureAddin")]
|
|---|
| 49 | [assembly: RequiredAddin("MyTestAddin")]
|
|---|
| 50 | [assembly: RequiredAddin("MyDecoratorAddin")]
|
|---|
| 51 |
|
|---|
| 52 | ...
|
|---|
| 53 |
|
|---|
| 54 | namespace NUnit.Tests
|
|---|
| 55 | {
|
|---|
| 56 | using System;
|
|---|
| 57 | using NUnit.Framework;
|
|---|
| 58 |
|
|---|
| 59 | [MyTestFixture]
|
|---|
| 60 | public class MyTests
|
|---|
| 61 | {
|
|---|
| 62 | [MyTest]
|
|---|
| 63 | public void SomeTest()
|
|---|
| 64 | {
|
|---|
| 65 | ...
|
|---|
| 66 | }
|
|---|
| 67 | }
|
|---|
| 68 |
|
|---|
| 69 | [TestFixture, MyDecorator]
|
|---|
| 70 | public class MoreTests
|
|---|
| 71 | {
|
|---|
| 72 | [Test, MyDecorator]
|
|---|
| 73 | public void AnotherTest()
|
|---|
| 74 | {
|
|---|
| 75 | ...
|
|---|
| 76 | }
|
|---|
| 77 | }
|
|---|
| 78 | }
|
|---|
| 79 | </pre>
|
|---|
| 80 | </div>
|
|---|
| 81 |
|
|---|
| 82 | </div>
|
|---|
| 83 |
|
|---|
| 84 | <!-- Submenu -->
|
|---|
| 85 | <div id="subnav">
|
|---|
| 86 | <ul>
|
|---|
| 87 | <li><a href="index.html">NUnit 2.5.10</a></li>
|
|---|
| 88 | <ul>
|
|---|
| 89 | <li><a href="getStarted.html">Getting Started</a></li>
|
|---|
| 90 | <li><a href="assertions.html">Assertions</a></li>
|
|---|
| 91 | <li><a href="constraintModel.html">Constraints</a></li>
|
|---|
| 92 | <li><a href="attributes.html">Attributes</a></li>
|
|---|
| 93 | <ul>
|
|---|
| 94 | <li><a href="category.html">Category</a></li>
|
|---|
| 95 | <li><a href="combinatorial.html">Combinatorial</a></li>
|
|---|
| 96 | <li><a href="culture.html">Culture</a></li>
|
|---|
| 97 | <li><a href="datapoint.html">Datapoint(s)</a></li>
|
|---|
| 98 | <li><a href="description.html">Description</a></li>
|
|---|
| 99 | <li><a href="exception.html">Exception</a></li>
|
|---|
| 100 | <li><a href="explicit.html">Explicit</a></li>
|
|---|
| 101 | <li><a href="ignore.html">Ignore</a></li>
|
|---|
| 102 | <li><a href="maxtime.html">Maxtime</a></li>
|
|---|
| 103 | <li><a href="pairwise.html">Pairwise</a></li>
|
|---|
| 104 | <li><a href="platform.html">Platform</a></li>
|
|---|
| 105 | <li><a href="property.html">Property</a></li>
|
|---|
| 106 | <li><a href="random.html">Random</a></li>
|
|---|
| 107 | <li><a href="range.html">Range</a></li>
|
|---|
| 108 | <li><a href="repeat.html">Repeat</a></li>
|
|---|
| 109 | <li id="current"><a href="requiredAddin.html">RequiredAddin</a></li>
|
|---|
| 110 | <li><a href="requiresMTA.html">Requires MTA</a></li>
|
|---|
| 111 | <li><a href="requiresSTA.html">Requires STA</a></li>
|
|---|
| 112 | <li><a href="requiresThread.html">Requires Thread</a></li>
|
|---|
| 113 | <li><a href="sequential.html">Sequential</a></li>
|
|---|
| 114 | <li><a href="setCulture.html">SetCulture</a></li>
|
|---|
| 115 | <li><a href="setUICulture.html">SetUICulture</a></li>
|
|---|
| 116 | <li><a href="setup.html">Setup</a></li>
|
|---|
| 117 | <li><a href="setupFixture.html">SetupFixture</a></li>
|
|---|
| 118 | <li><a href="suite.html">Suite</a></li>
|
|---|
| 119 | <li><a href="teardown.html">Teardown</a></li>
|
|---|
| 120 | <li><a href="test.html">Test</a></li>
|
|---|
| 121 | <li><a href="testCase.html">TestCase</a></li>
|
|---|
| 122 | <li><a href="testCaseSource.html">TestCaseSource</a></li>
|
|---|
| 123 | <li><a href="testFixture.html">TestFixture</a></li>
|
|---|
| 124 | <li><a href="fixtureSetup.html">TestFixtureSetUp</a></li>
|
|---|
| 125 | <li><a href="fixtureTeardown.html">TestFixtureTearDown</a></li>
|
|---|
| 126 | <li><a href="theory.html">Theory</a></li>
|
|---|
| 127 | <li><a href="timeout.html">Timeout</a></li>
|
|---|
| 128 | <li><a href="values.html">Values</a></li>
|
|---|
| 129 | <li><a href="valueSource.html">ValueSource</a></li>
|
|---|
| 130 | </ul>
|
|---|
| 131 | <li><a href="runningTests.html">Running Tests</a></li>
|
|---|
| 132 | <li><a href="extensibility.html">Extensibility</a></li>
|
|---|
| 133 | <li><a href="releaseNotes.html">Release Notes</a></li>
|
|---|
| 134 | <li><a href="samples.html">Samples</a></li>
|
|---|
| 135 | <li><a href="license.html">License</a></li>
|
|---|
| 136 | </ul>
|
|---|
| 137 | </ul>
|
|---|
| 138 | </div>
|
|---|
| 139 | <!-- End of Submenu -->
|
|---|
| 140 |
|
|---|
| 141 |
|
|---|
| 142 | <!-- Standard Footer for NUnit.org -->
|
|---|
| 143 | <div id="footer">
|
|---|
| 144 | Copyright © 2010 Charlie Poole. All Rights Reserved.
|
|---|
| 145 | </div>
|
|---|
| 146 | <!-- End of Footer -->
|
|---|
| 147 |
|
|---|
| 148 | </body>
|
|---|
| 149 | </html>
|
|---|