Skip to content

Commit

Permalink
Don't make TestDataSourceDiscoveryOption obsolete (microsoft#4366)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Dec 17, 2024
1 parent a6a49ce commit 31b9598
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/Adapter/MSTest.TestAdapter/Helpers/ReflectHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ internal static TestIdGenerationStrategy GetTestIdGenerationStrategy(Assembly as
/// Gets TestDataSourceDiscovery assembly level attribute.
/// </summary>
/// <param name="assembly"> The test assembly. </param>
[Obsolete]
internal static TestDataSourceDiscoveryOption? GetTestDataSourceDiscoveryOption(Assembly assembly)
=> PlatformServiceProvider.Instance.ReflectionOperations.GetCustomAttributes(assembly, typeof(TestDataSourceDiscoveryAttribute))
.OfType<TestDataSourceDiscoveryAttribute>()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.ComponentModel;

namespace Microsoft.VisualStudio.TestTools.UnitTesting;

/// <summary>
/// Specifies how to discover <see cref="ITestDataSource"/> tests.
/// </summary>
[AttributeUsage(AttributeTargets.Assembly)]
#if NET6_0_OR_GREATER
[Obsolete("Attribute is obsolete and will be removed in v4, instead use 'TestDataSourceOptionsAttribute'.", DiagnosticId = "MSTESTOBS")]
#else
[Obsolete("Attribute is obsolete and will be removed in v4, instead use 'TestDataSourceOptionsAttribute'.")]
#endif
[EditorBrowsable(EditorBrowsableState.Never)]
public class TestDataSourceDiscoveryAttribute : Attribute
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.ComponentModel;

namespace Microsoft.VisualStudio.TestTools.UnitTesting;

/// <summary>
/// The supported discovery modes for <see cref="ITestDataSource"/> tests.
/// </summary>
#if NET6_0_OR_GREATER
[Obsolete("Type is obsolete and will be removed in v4, instead use 'TestDataSourceUnfoldingStrategy'.", DiagnosticId = "MSTESTOBS")]
#else
[Obsolete("Type is obsolete and will be removed in v4, instead use 'TestDataSourceUnfoldingStrategy'.")]
#endif
[EditorBrowsable(EditorBrowsableState.Never)]
public enum TestDataSourceDiscoveryOption
{
/// <summary>
Expand Down

0 comments on commit 31b9598

Please sign in to comment.