public bool IsTest(MemberReference reference)
        {
            var refer = reference as MethodReference;
            var field = reference as FieldReference;
            MethodDefinition resolved = null;

            if (refer != null)
            {
                resolved = refer.ThreadSafeResolve();
            }
            var containingType = reference.DeclaringType;
            var resolvedtype   = containingType.ThreadSafeResolve();

            if (resolved != null && resolvedtype != null && (resolvedtype.IsAbstract || resolved.IsAbstract))
            {
                return(false);
            }
            if ((refer == null && field != null && field.FieldType.Name == "It"))
            {
                return(true);
            }

            if (refer == null || resolved == null)
            {
                return(false);
            }

            var ret = MSpecTranslator.TranslateGeneratedMethod(resolved);

            if (ret == null)
            {
                return(false);
            }
            return(ret.FieldType.Name == "It");
        }
        public string GetSpecificallyMangledName(MethodReference target)
        {
            if (!IsTest(target))
            {
                return(null);
            }
            var ret = MSpecTranslator.TranslateGeneratedMethod(target.ThreadSafeResolve());

            return(ret == null ? null : ret.GetCacheName());
        }
        public bool IsSetup(MethodReference target)
        {
            if (!IsInFixture(target))
            {
                return(false);
            }
            var field = MSpecTranslator.TranslateGeneratedMethod(target.Resolve());

            if (field == null)
            {
                return(false);
            }
            return(field.FieldType.Name == "Establish" || field.FieldType.Name == "Because");
        }