Skip to content

Commit 45d2f41

Browse files
authored
Description, WorkItem, CssIteration, CssProjectStructure should *NOT* be treated as traits. (#482)
Attributes like Description should not inherit from TestPropertyAttribute, as eventually TestPropertyAttributes are treated as traits.
1 parent bfc8e1d commit 45d2f41

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/TestFramework/MSTest.Core/Attributes/VSTestAttributes.cs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ public sealed class AssemblyCleanupAttribute : Attribute
182182
{
183183
}
184184

185-
#region Description attributes
186-
187185
/// <summary>
188186
/// Test Owner
189187
/// </summary>
@@ -234,14 +232,13 @@ public PriorityAttribute(int priority)
234232
/// Description of the test
235233
/// </summary>
236234
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
237-
public sealed class DescriptionAttribute : TestPropertyAttribute
235+
public sealed class DescriptionAttribute : Attribute
238236
{
239237
/// <summary>
240238
/// Initializes a new instance of the <see cref="DescriptionAttribute"/> class to describe a test.
241239
/// </summary>
242240
/// <param name="description">The description.</param>
243241
public DescriptionAttribute(string description)
244-
: base("Description", description)
245242
{
246243
this.Description = description;
247244
}
@@ -256,14 +253,13 @@ public DescriptionAttribute(string description)
256253
/// CSS Project Structure URI
257254
/// </summary>
258255
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
259-
public sealed class CssProjectStructureAttribute : TestPropertyAttribute
256+
public sealed class CssProjectStructureAttribute : Attribute
260257
{
261258
/// <summary>
262259
/// Initializes a new instance of the <see cref="CssProjectStructureAttribute"/> class for CSS Project Structure URI.
263260
/// </summary>
264261
/// <param name="cssProjectStructure">The CSS Project Structure URI.</param>
265262
public CssProjectStructureAttribute(string cssProjectStructure)
266-
: base("CssProjectStructure", cssProjectStructure)
267263
{
268264
this.CssProjectStructure = cssProjectStructure;
269265
}
@@ -278,14 +274,13 @@ public CssProjectStructureAttribute(string cssProjectStructure)
278274
/// CSS Iteration URI
279275
/// </summary>
280276
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
281-
public sealed class CssIterationAttribute : TestPropertyAttribute
277+
public sealed class CssIterationAttribute : Attribute
282278
{
283279
/// <summary>
284280
/// Initializes a new instance of the <see cref="CssIterationAttribute"/> class for CSS Iteration URI.
285281
/// </summary>
286282
/// <param name="cssIteration">The CSS Iteration URI.</param>
287283
public CssIterationAttribute(string cssIteration)
288-
: base("CssIteration", cssIteration)
289284
{
290285
this.CssIteration = cssIteration;
291286
}
@@ -300,14 +295,13 @@ public CssIterationAttribute(string cssIteration)
300295
/// WorkItem attribute; used to specify a work item associated with this test.
301296
/// </summary>
302297
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
303-
public sealed class WorkItemAttribute : TestPropertyAttribute
298+
public sealed class WorkItemAttribute : Attribute
304299
{
305300
/// <summary>
306301
/// Initializes a new instance of the <see cref="WorkItemAttribute"/> class for the WorkItem Attribute.
307302
/// </summary>
308303
/// <param name="id">The Id to a work item.</param>
309304
public WorkItemAttribute(int id)
310-
: base("WorkItem", id.ToString(CultureInfo.CurrentCulture))
311305
{
312306
this.Id = id;
313307
}
@@ -318,8 +312,6 @@ public WorkItemAttribute(int id)
318312
public int Id { get; private set; }
319313
}
320314

321-
#endregion
322-
323315
/// <summary>
324316
/// Timeout attribute; used to specify the timeout of a unit test.
325317
/// </summary>

0 commit comments

Comments
 (0)