make GivenDotnetUsesDotnetTools test optional based on AspNetCore availability (#207)

This commit is contained in:
Tomas Weinfurt 2018-12-14 20:08:38 -08:00 committed by Nick Guerrera
parent 4538e052e4
commit e1e6c25c1b
3 changed files with 29 additions and 1 deletions

View file

@ -0,0 +1,20 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Xunit;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public class RequiresAspNetCore : FactAttribute
{
public RequiresAspNetCore()
{
var repoDirectoriesProvider = new RepoDirectoriesProvider();
if (repoDirectoriesProvider.Stage2AspNetCore == null)
{
this.Skip = $"This test requires a AspNetCore but it isn't present.";
}
}
}
}