Exemple #1
0
        /// <inheritdoc/>
        public override bool IsTestIgnored(TestFrameworkTestSelection testSelection, MethodDefinition method, out string ignoreMessage)
        {
            SafeDebug.AssumeNotNull(testSelection, "testSelection");
            SafeDebug.AssumeNotNull(method, "method");

            var fact = method.DeclaredAttributes
                       .FirstOrDefault(a => a.Constructor.SerializableName == XunitTestFrameworkMetadata.Ctor_FactAttribute);

            if (fact != null)
            {
                var skip = fact.NamedArguments.FirstOrDefault(na => na.Name == "Skip");
                if (skip != null)
                {
                    ignoreMessage = ((MetadataExpression.StringExpression)skip.Value).Value;
                    return(true);
                }
            }

            ignoreMessage = null;
            return(false);
        }
        /// <inheritdoc/>
        public override bool IsTestIgnored(TestFrameworkTestSelection testSelection, MethodDefinition method, out string ignoreMessage)
        {
            SafeDebug.AssumeNotNull(testSelection, "testSelection");
            SafeDebug.AssumeNotNull(method, "method");

            var fact = method.DeclaredAttributes
                             .FirstOrDefault(a => a.Constructor.SerializableName == XunitTestFrameworkMetadata.Ctor_FactAttribute);

            if (fact != null)
            {
                var skip = fact.NamedArguments.FirstOrDefault(na => na.Name == "Skip");
                if (skip != null)
                {
                    ignoreMessage = ((MetadataExpression.StringExpression)skip.Value).Value;
                    return true;
                }
            }

            ignoreMessage = null;
            return false;
        }
 /// <inheritdoc/>
 public override bool IsFixtureIgnored(TestFrameworkTestSelection testSelection, TypeEx fixtureType, out string ignoreMessage)
 {
     // xUnit.net does not support skipping test classes
     ignoreMessage = null;
     return false;
 }
Exemple #4
0
 /// <inheritdoc/>
 public override bool IsFixtureIgnored(TestFrameworkTestSelection testSelection, TypeEx fixtureType, out string ignoreMessage)
 {
     // xUnit.net does not support skipping test classes
     ignoreMessage = null;
     return(false);
 }