From 5fc548eb781fe90e299e9d39b669577a042535a8 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Tue, 4 Sep 2018 18:31:52 +0530 Subject: [PATCH] Attributes like Description should not inherit from TestPropertyAttribute, as eventually TestPropertyAttributes are treated as traits. --- .../MSTest.Core/Attributes/VSTestAttributes.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/TestFramework/MSTest.Core/Attributes/VSTestAttributes.cs b/src/TestFramework/MSTest.Core/Attributes/VSTestAttributes.cs index 474499fbbc..e868ad203b 100644 --- a/src/TestFramework/MSTest.Core/Attributes/VSTestAttributes.cs +++ b/src/TestFramework/MSTest.Core/Attributes/VSTestAttributes.cs @@ -182,8 +182,6 @@ public sealed class AssemblyCleanupAttribute : Attribute { } - #region Description attributes - /// /// Test Owner /// @@ -234,14 +232,13 @@ public PriorityAttribute(int priority) /// Description of the test /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] - public sealed class DescriptionAttribute : TestPropertyAttribute + public sealed class DescriptionAttribute : Attribute { /// /// Initializes a new instance of the class to describe a test. /// /// The description. public DescriptionAttribute(string description) - : base("Description", description) { this.Description = description; } @@ -256,14 +253,13 @@ public DescriptionAttribute(string description) /// CSS Project Structure URI /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] - public sealed class CssProjectStructureAttribute : TestPropertyAttribute + public sealed class CssProjectStructureAttribute : Attribute { /// /// Initializes a new instance of the class for CSS Project Structure URI. /// /// The CSS Project Structure URI. public CssProjectStructureAttribute(string cssProjectStructure) - : base("CssProjectStructure", cssProjectStructure) { this.CssProjectStructure = cssProjectStructure; } @@ -278,14 +274,13 @@ public CssProjectStructureAttribute(string cssProjectStructure) /// CSS Iteration URI /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] - public sealed class CssIterationAttribute : TestPropertyAttribute + public sealed class CssIterationAttribute : Attribute { /// /// Initializes a new instance of the class for CSS Iteration URI. /// /// The CSS Iteration URI. public CssIterationAttribute(string cssIteration) - : base("CssIteration", cssIteration) { this.CssIteration = cssIteration; } @@ -300,14 +295,13 @@ public CssIterationAttribute(string cssIteration) /// WorkItem attribute; used to specify a work item associated with this test. /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - public sealed class WorkItemAttribute : TestPropertyAttribute + public sealed class WorkItemAttribute : Attribute { /// /// Initializes a new instance of the class for the WorkItem Attribute. /// /// The Id to a work item. public WorkItemAttribute(int id) - : base("WorkItem", id.ToString(CultureInfo.CurrentCulture)) { this.Id = id; } @@ -318,8 +312,6 @@ public WorkItemAttribute(int id) public int Id { get; private set; } } - #endregion - /// /// Timeout attribute; used to specify the timeout of a unit test. ///