Example #1
0
        private static bool IsTestIgnored(IMethodSymbol method)
        {
            if (method.IsMsTestOrNUnitTestIgnored())
            {
                return(true);
            }

            // Checking whether an Xunit test is ignore or not needs to be done at the syntax level i.e. language-specific
            var factAttributeSyntax = method.FindXUnitTestAttribute()
                                      ?.ApplicationSyntaxReference.GetSyntax() as AttributeSyntax;

            return(factAttributeSyntax?.ArgumentList != null &&
                   factAttributeSyntax.ArgumentList.Arguments.Any(x => x.NameEquals.Name.Identifier.ValueText == "Skip"));
        }