mirror of https://github.com/dotnet/tye.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
999 B
33 lines
999 B
// Copyright (c) .NET Foundation. All rights reserved.
|
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
|
|
using System;
|
|
|
|
namespace Microsoft.AspNetCore.Testing
|
|
{
|
|
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
|
|
public class FrameworkSkipConditionAttribute : Attribute, ITestCondition
|
|
{
|
|
private readonly RuntimeFrameworks _excludedFrameworks;
|
|
|
|
public FrameworkSkipConditionAttribute(RuntimeFrameworks excludedFrameworks)
|
|
{
|
|
_excludedFrameworks = excludedFrameworks;
|
|
}
|
|
|
|
public bool IsMet
|
|
{
|
|
get
|
|
{
|
|
return CanRunOnThisFramework(_excludedFrameworks);
|
|
}
|
|
}
|
|
|
|
public string SkipReason { get; set; } = "Test cannot run on this runtime framework.";
|
|
|
|
private static bool CanRunOnThisFramework(RuntimeFrameworks excludedFrameworks)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|