← Back to team overview

nunit-core team mailing list archive

[Bug 548841] Re: [Explicit] does not get overridden if there is another category exclude

 

OK, I see it now. The problem is that we want NotFilter to work
differently in different situations. /exclude:B all by itself should not
cause Explicit tests to be run. Nor should /include:-B.  But /include:T
/exclude:B or /include:T-B needs to examine the explicit cases under the
Not.

As a fix for now I'm putting in a property that tells NotFilter whether
it's at the top level. I don't much like this, but it's expedient.

This entire area needs to be re-examined, since the feature set "just
grew" without a lot of prior planning.

Charlie

-- 
[Explicit] does not get overridden if there is another category exclude
https://bugs.launchpad.net/bugs/548841
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.

Status in NUnit V2 Test Framework: Fix Committed

Bug description:
Steps to reproduce:
   - Test code below ([1])
   - nunit-console.exe <assemby.dll> /include=T /exclude=B"

Expected result:
   - TestA() is executed

Actual result:
   - No test is executed

Remarks
   - Everything works as expected, if you remove the [Expected] attribute


[1] Test case

    [TestFixture, Explicit, Category("T")]
    public class Test
    {
        [Test, Category("A")]
        public void TestA() { Console.WriteLine("-A-"); }
        [Test, Category("B")]
        public void TestB() { Console.WriteLine("-B-"); }
    }





References