public static bool IsContext(this IMetadataTypeInfo type)
 {
     return(!type.IsAbstract &&
            !type.IsStruct() &&
            type.GenericParameters.Length == 0 &&
            !type.HasCustomAttribute(FullNames.BehaviorsAttribute) &&
            (type.GetSpecifications().Any() || type.GetBehaviors().Any()));
 }
Exemple #2
0
        private static bool HasTestFixtureAttribute(IMetadataTypeInfo typeInfo)
        {
            if (typeInfo.HasCustomAttribute(TestFixtureAttribute.ClrName))
            {
                return(true);
            }

            IMetadataClassType baseType = typeInfo.Base;

            if (baseType != null)
            {
                return(HasTestFixtureAttribute(baseType.Type));
            }

            return(false);
        }