nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #00543
[Bug 487878] Re: Tests in generic class without proper TestFixture attribute should be reported as invalid
** Changed in: nunit-3.0
Milestone: 2.9.4 => None
--
Tests in generic class without proper TestFixture attribute should be reported as invalid
https://bugs.launchpad.net/bugs/487878
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
Status in NUnit Test Framework: Triaged
Status in NUnit V2 Test Framework: Fix Released
Bug description:
There are two cases that NUnit should report invalid tests but it doesn't:
1) without TestFixtureAttribute
// forgot [TestFixture(typeof(string))]
public class GenericTestFixture<T>
{
[Test] public void TestOnGenericFixture() {}
}
2) with inherited TestFixtureAttribute but no type paramter.
[TestFixture]
public class ThirdPartyFixture
{
}
// forgot [TestFixture(typeof(string))]
public class GenericTestFixture<T> : ThirdPartyFixture
{
[Test] public void TestOnGenericFixture() {}
}
See http://groups.google.com/group/nunit-discuss/msg/de708a9c9b0be103
References