← Back to team overview

nunit-core team mailing list archive

Re: [Bug 633884] [NEW] TestCaseSource does not use Arguments, Categories etc as described in documentation for 2.5.7

 

I'm not sure why you are expecting this to work.
What's the signature of the test method to which
you apply this attribute?

Charlie

On Thu, Sep 9, 2010 at 11:59 AM, Hamish Gunn <633884@xxxxxxxxxxxxxxxxxx> wrote:
> Public bug reported:
>
> What happens:
>
> Created a class X that is returned as an IEnumerable<X> in method M of class Z.
> This is used in [TestCaseSource(typeof(Z), "M"]
>
> Class X has been given
>
>                public string TestName { get; private set; }
>
>                public IList<string> Categories { get; private set; }
>
>                public bool Ignored;
>
> In the constructor for X,  these have been initialised
>                        this.Categories = new List<string> { "foo" };
>                        this.TestName = note;
>                        this.Ignored = true;
>
> The test is executed(contrary to Ignored==true).
> There are no categories in the NUinit GUI.
> The test is not renamed.
>
> What I expect:
> The test is flagged as ignore.
> There is a category "foo".
> The test is named after the string value in TestName.
>
> NUnit 2.5.7.
> Nunit.exe (GUI)
>
> ** Affects: nunitv2
>     Importance: Undecided
>         Status: New
>
> --
> TestCaseSource does not use Arguments, Categories etc as described in documentation for 2.5.7
> https://bugs.launchpad.net/bugs/633884
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
>

-- 
TestCaseSource does not use Arguments, Categories etc as described in documentation for 2.5.7
https://bugs.launchpad.net/bugs/633884
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: New

Bug description:
What happens:

Created a class X that is returned as an IEnumerable<X> in method M of class Z.  
This is used in [TestCaseSource(typeof(Z), "M"]

Class X has been given

		public string TestName { get; private set; }

		public IList<string> Categories { get; private set; }

		public bool Ignored;

In the constructor for X,  these have been initialised
			this.Categories = new List<string> { "foo" };
			this.TestName = note;
			this.Ignored = true;

The test is executed(contrary to Ignored==true).
There are no categories in the NUinit GUI.
The test is not renamed.

What I expect:
The test is flagged as ignore.
There is a category "foo".
The test is named after the string value in TestName.

NUnit 2.5.7.
Nunit.exe (GUI)





References