Obsolete TestPathUtilities (dotnet/extensions#1698)

\n\nCommit migrated from da5dee978f
This commit is contained in:
Nate McMaster 2019-05-21 14:18:22 -07:00 committed by GitHub
parent e4f03d9696
commit 213076ff4b
2 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,7 @@ using System.IO;
namespace Microsoft.AspNetCore.Testing
{
[Obsolete("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/aspnet/Extensions/issues/1697 for details.")]
public class TestPathUtilities
{
public static string GetRepoRootDirectory()

View File

@ -9,6 +9,9 @@ namespace Microsoft.AspNetCore.Testing
{
public class TestPathUtilitiesTest
{
// Entire test pending removal - see https://github.com/aspnet/Extensions/issues/1697
#pragma warning disable 0618
[Fact]
public void GetSolutionRootDirectory_ResolvesSolutionRoot()
{
@ -27,5 +30,6 @@ namespace Microsoft.AspNetCore.Testing
var exception = Assert.Throws<Exception>(() => TestPathUtilities.GetSolutionRootDirectory("NotTesting"));
Assert.Equal($"Solution file NotTesting.sln could not be found in {AppContext.BaseDirectory} or its parent directories.", exception.Message);
}
#pragma warning restore 0618
}
}