[1146] | 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 - ExtensionTips</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>Tips for Writing Extensions</h3>
|
---|
| 28 |
|
---|
| 29 | <p>An Extenders Guide will be published in the future. At the moment, writing an
|
---|
| 30 | extension is a bit of an adventure. Extension authors are advised to join the
|
---|
| 31 | nunit-developer list and post questions and comments there.
|
---|
| 32 |
|
---|
| 33 | <p>For the moment, the following tips may be of assistance.
|
---|
| 34 | <ul>
|
---|
| 35 | <li>The <b>nunit.core.interfaces</b> assembly is intended to be stable in the future
|
---|
| 36 | while the <b>nunit.core</b> assembly will change from release to release. Right now,
|
---|
| 37 | both assemblies are still in flux, but extensions that depend solely on the interfaces
|
---|
| 38 | assembly will have a much better chance of surviving NUnit version changes. Unfortunately,
|
---|
| 39 | this is rather difficult to do without duplicating a great deal of NUnit code. Most
|
---|
| 40 | of the add-in samples provided with NUnit are currently version dependent.
|
---|
| 41 |
|
---|
| 42 | <li>If you place the definition of a custom attribute in the same assembly as your
|
---|
| 43 | add-in, then user tests are dependent on the add-in assembly. If the add-in is
|
---|
| 44 | version-dependent, then the user tests will also be version-dependent. We suggest
|
---|
| 45 | placing any types referenced by user tests in a separate assembly, particularly if
|
---|
| 46 | your extension relies on nunit.core.
|
---|
| 47 |
|
---|
| 48 | <li>If using Visual Studio, set Copy Local to false for any references to nunit.core
|
---|
| 49 | or nunit.core.interfaces. This is especially important if you are also building
|
---|
| 50 | NUnit itself.
|
---|
| 51 |
|
---|
| 52 | <li>There is currently no mechanism to allow decorators to apply in a particular order.
|
---|
| 53 | NUnit applies decorators in the order in which they are returned through reflection,
|
---|
| 54 | which may vary among different runtimes.
|
---|
| 55 |
|
---|
| 56 | <li>Avoid trying to "stretch" the existing extension points to do more than they were
|
---|
| 57 | intended to do. Rather, let us know what further extension points you would like to see!
|
---|
| 58 | </ul>
|
---|
| 59 |
|
---|
| 60 |
|
---|
| 61 | </div>
|
---|
| 62 |
|
---|
| 63 | <!-- Submenu -->
|
---|
| 64 | <div id="subnav">
|
---|
| 65 | <ul>
|
---|
| 66 | <li><a href="index.html">NUnit 2.5.10</a></li>
|
---|
| 67 | <ul>
|
---|
| 68 | <li><a href="getStarted.html">Getting Started</a></li>
|
---|
| 69 | <li><a href="assertions.html">Assertions</a></li>
|
---|
| 70 | <li><a href="constraintModel.html">Constraints</a></li>
|
---|
| 71 | <li><a href="attributes.html">Attributes</a></li>
|
---|
| 72 | <li><a href="runningTests.html">Running Tests</a></li>
|
---|
| 73 | <li><a href="extensibility.html">Extensibility</a></li>
|
---|
| 74 | <ul>
|
---|
| 75 | <li><a href="customConstraints.html">Custom Constraints</a></li>
|
---|
| 76 | <li><a href="nunitAddins.html">NUnit Addins</a></li>
|
---|
| 77 | <li id="current"><a href="extensionTips.html">Tips for Extenders</a></li>
|
---|
| 78 | </ul>
|
---|
| 79 | <li><a href="releaseNotes.html">Release Notes</a></li>
|
---|
| 80 | <li><a href="samples.html">Samples</a></li>
|
---|
| 81 | <li><a href="license.html">License</a></li>
|
---|
| 82 | </ul>
|
---|
| 83 | </ul>
|
---|
| 84 | </div>
|
---|
| 85 | <!-- End of Submenu -->
|
---|
| 86 |
|
---|
| 87 |
|
---|
| 88 | <!-- Standard Footer for NUnit.org -->
|
---|
| 89 | <div id="footer">
|
---|
| 90 | Copyright © 2010 Charlie Poole. All Rights Reserved.
|
---|
| 91 | </div>
|
---|
| 92 | <!-- End of Footer -->
|
---|
| 93 |
|
---|
| 94 | </body>
|
---|
| 95 | </html>
|
---|