Public bug reported: NUnit 2.6.2 I have a custom attribute for my property
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] internal class NeedRecreateDataAttribute : PropertyAttribute { public const string PROPERTY_NAME = "NeedRecreateData"; public NeedRecreateDataAttribute() : base(true) { } } It is applied ok when used with [Test] attribute: [Test] [NeedRecreateData] public void Test_Assign_String() { ... } [TearDown] public void TestTeadDown() { if (TestContext.CurrentContext.Test.Properties.Contains(NeedRecreateDataAttribute.PROPERTY_NAME)) { PrepareFixtureData(); } } But when paired with [TestCase] attribute, the property is not applied (TestContext.CurrentContext.Test.Properties.Contains(NeedRecreateDataAttribute.PROPERTY_NAME) == false) ** Affects: nunitv2 Importance: Undecided Status: New -- You received this bug notification because you are a member of NUnit Developers, which is subscribed to NUnit V2. https://bugs.launchpad.net/bugs/1208356 Title: Properties are not applied for parameterized tests Status in NUnit V2 Test Framework: New Bug description: NUnit 2.6.2 I have a custom attribute for my property [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] internal class NeedRecreateDataAttribute : PropertyAttribute { public const string PROPERTY_NAME = "NeedRecreateData"; public NeedRecreateDataAttribute() : base(true) { } } It is applied ok when used with [Test] attribute: [Test] [NeedRecreateData] public void Test_Assign_String() { ... } [TearDown] public void TestTeadDown() { if (TestContext.CurrentContext.Test.Properties.Contains(NeedRecreateDataAttribute.PROPERTY_NAME)) { PrepareFixtureData(); } } But when paired with [TestCase] attribute, the property is not applied (TestContext.CurrentContext.Test.Properties.Contains(NeedRecreateDataAttribute.PROPERTY_NAME) == false) To manage notifications about this bug go to: https://bugs.launchpad.net/nunitv2/+bug/1208356/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~nunit-core Post to : nunit-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~nunit-core More help : https://help.launchpad.net/ListHelp