[Issue now tracked at https://github.com/nunit/nunit-framework/issues/50]
First the problem:
We make a test, that could not be satisfied up to now, because the implementation of the functionality is not ready. We give him the attribute explicit, so the developer can run the test while he implements the functionality. But for the person who looks at the tests, he didn't see the test. So we make a empty copy of the test and give hin the attribute ignore.
If we give the test both attributes, explicit and ignore, the test is not runable under the gui.
A possibility would be that ignored tests can be run if a special option is set (perhaps on the tab for categories or command line).
This would be a very nice feature!
I have worked on a solution, here it is. Would it be possible to integrate this in NUnit itself?
[AttributeUsage (AttributeTarge ts.Method, AllowMultiple= false)] tAttribute : PropertyAttribute tAttribute( ) lopment" )
public class UnderDevelopmen
{
public UnderDevelopmen
: base("UnderDeve
{ }
}
[DllImport( "kernel32. dll", CharSet = CharSet.Auto, ExactSpelling = true)] nt();
public static extern bool IsDebuggerPrese
public static bool IsDebuggerAttached Diagnostics. Debugger. IsAttached /* managed */
{
get
{
return System.
|| IsDebuggerPresent() /* unmanged */;
}
}
[SetUp] Properties. Contains( "UnderDevelopme nt")) ached) Ignore( "under development");
public void Setup()
{
if (TestContext.
{
if (!IsDebuggerAtt
Assert.
}
}