Re: Need Feedback: RequiredAddinAttribute
"David Jeske" <[email protected]> Thu, 17 Jul 2008 09:44:59 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <[email protected]> |
For the reasons you list below, to me the "least surprise" design is to
changes this from "[RequiredAddin]" to "[LoadAddin]" where the
LoadAddin("name") attribute is required for the addin to work at all. That
way, if you have tests which at one time worked with an addin, you are
assured that they will never silently pass in the future because the addin
wasn't loaded.
I don't understand why you would allow this to be optional, and in turn
allow [MyTest] to silently do nothing if the addin was not properly
installed.
On Wed, Jul 16, 2008 at 7:34 PM, Charlie Poole <[email protected]>
wrote:
>
> Is it possible for an assembly to run with Attributes which reference
> unresolved assemblies?
>
> I would think that the mere appearance of [MyTest] would mean that plugin
> assembly would have to be present to run the code.
>
> I see what you're saying. If [MyTest] compiled, the addin must have been
> available. However...
>
> 1. Tests are sometimes compiled in one place, then execcuted elsewhere.
> 2. Having an assembly available to be referenced does not necessarily mean
> that it's
> properly installed as an addin - although NUnit /could/ try to find and use
> it in that case.
> 3. Most important, the canonical implementation of an addin does /not/ put
> the definition
> of any special attributes in the same assembly as the addin itself because
> of reference
> problems that arise. This could change in 3.0, but is still the recommended
> pattern
> for 2.5.
>
> So, for all those reasons, it is indeed possible ot have an attribute for
> which the
> addin is not available. In the case of [MyTest], the test will simply not
> be seen and
> whether anyone notices is an open question.
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users